GoogleCloudPlatform / GoogleCloudPlatform/config-validator

Duplicate violations

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
48
Forks
37
PR merge metrics
No merged PRs in 30d

Description

For the following input, FCV emits four duplicate violations when using the [world readable constraint template](https://github.com/forseti-security/policy-library/blob/master/policies/templates/gcp_storage_bucket_world_readable_v1.yaml). Oddly enough, when adding this same data to the policy-library testcases, duplicate violations are not surfaced. My guess is that the issue is appearing due to the FCV Constraint Framework target rego, the Constraint Framework rego, or the rego rewriter.

```
{
"name": "//storage.googleapis.com/test_all_authenticated_users",
"asset_type": "storage.googleapis.com/Bucket",
"iam_policy": {
"version": 1,
"etag": "BwWKsK1c7h0=",
"bindings": [
{
"role": "roles/storage.legacyBucketOwner",
"members": [
"projectEditor:xyz",
"projectOwner:xyz"
]
},
{
"role": "roles/storage.legacyBucketReader",
"members": [
"projectViewer:xyz"
]
},
{
"role": "roles/storage.objectViewer",
"members": [
"allAuthenticatedUsers"
]
}
]
},
"ancestors": [
"projects/1234",
"folders/1234",
"organizations/12345"
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.