Skip to content

Commit

Permalink
feat(iam-role-policy): filter out sso managed policies
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Oct 1, 2024
1 parent aee3915 commit dbbe474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/iam-role-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package resources

import (
"context"

"fmt"
"strings"

Expand Down Expand Up @@ -41,6 +40,9 @@ func (e *IAMRolePolicy) Filter() error {
if strings.HasPrefix(e.rolePath, "/aws-service-role/") {
return fmt.Errorf("cannot alter service roles")
}
if strings.HasPrefix(e.rolePath, "/aws-reserved/sso.amazonaws.com/") {
return fmt.Errorf("cannot alter sso roles")
}
return nil
}

Expand Down

0 comments on commit dbbe474

Please sign in to comment.