Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Filter IAMRolePolicy resources related to SSO #1172

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions resources/iam-role-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func (e *IAMRolePolicy) Filter() error {
if strings.HasPrefix(aws.StringValue(e.role.Path), "/aws-service-role/") {
return fmt.Errorf("cannot alter service roles")
}
if strings.HasPrefix(aws.StringValue(e.role.Path), "/aws-reserved/sso.amazonaws.com/") {
return fmt.Errorf("cannot alter SSO roles")
}
return nil
}

Expand Down