Skip to content

Commit 3276a4e

Browse files
authored
Merge pull request #21 from geezyx/role-name-paths
Support pathed role names
2 parents 533e0fa + 10fcba8 commit 3276a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/managed-kubernetes-auditing-toolkit/eks/role_relationships.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,5 +237,5 @@ func getRoleDisplayName(role *role_relationships.IAMRole) string {
237237

238238
func getRoleName(role *role_relationships.IAMRole) string {
239239
parsedArn, _ := arn.Parse(role.Arn)
240-
return strings.Split(parsedArn.Resource, "/")[1]
240+
return strings.TrimPrefix(parsedArn.Resource, "role/")
241241
}

0 commit comments

Comments
 (0)