Skip to content

Commit

Permalink
including a check for verifying in line policy is mentioned or not, t…
Browse files Browse the repository at this point in the history
…hus solves the false positive issue #359
  • Loading branch information
harkirat22 committed Jan 9, 2021
1 parent 5a19951 commit bbc6e5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/policies/opa/rego/aws/aws_s3_bucket/s3EnforceUserACL.rego
Expand Up @@ -3,6 +3,9 @@ package accurics
{{.prefix}}s3EnforceUserACL[retVal] {
bucket := input.aws_s3_bucket[_]

#proceeding forward only if inline policy is not included
not bucket.config.policy

bucket_policies_set := { policy_id | policy_id := split(input.aws_s3_bucket_policy[_].id, "." )[1] }

not bucket_policies_set[split(bucket.id, ".")[1]]
Expand Down

0 comments on commit bbc6e5a

Please sign in to comment.