Skip to content

Commit 367173e

Browse files
committed
improve roledefinition.id detection
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent a65ebc1 commit 367173e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

auditor/auditor.enrich.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ func (auditor *AzureAuditor) enrichAzureObjectsWithSubscription(ctx context.Cont
8080
}
8181

8282
// enrich with roledefinition information
83-
if val, ok := (*row)["roledefinition.id"].(string); ok && val != "" {
84-
if roleDefinition, ok := roleDefinitionList[val]; ok {
83+
if roleDefinitionId, ok := (*row)["roledefinition.id"].(string); ok && roleDefinitionId != "" {
84+
roleDefinitionId = strings.ToLower(roleDefinitionId)
85+
if roleDefinition, ok := roleDefinitionList[strings.ToLower(roleDefinitionId)]; ok {
8586
obj["roledefinition.name"] = to.String(roleDefinition.RoleName)
8687
obj["roledefinition.type"] = to.String(roleDefinition.RoleType)
8788
obj["roledefinition.description"] = to.String(roleDefinition.Description)

0 commit comments

Comments
 (0)