Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions pkg/validators/iam/iam_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@
}

for _, result := range simResults {
// Not all simulation results will have this field (ie. when service control policies are not used).
if result.OrganizationsDecisionDetail == nil {
continue

Check warning on line 417 in pkg/validators/iam/iam_validator.go

View check run for this annotation

Codecov / codecov/patch

pkg/validators/iam/iam_validator.go#L417

Added line #L417 was not covered by tests
}
if !result.OrganizationsDecisionDetail.AllowedByOrganizations && result.EvalDecision != "allowed" {
// append SCP failure
scpFailures = append(scpFailures, fmt.Sprintf("Action: %s is denied due to an Organization level SCP policy for %s: %s", *result.EvalActionName, policySourceType, policySourceName))
Expand Down