Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Policy AC_GCP_0296 - Service Attachment with ACCEPT_AUTOMATIC #1147

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 docs/policies/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
| -------- | -------- | -------- | ----------- | ------------ | -- |
| Identity and Access Management | gcp | HIGH | Ensure oslogin is enabled for a Project | accurics.gcp.IAM.127 | AC_GCP_0291 |

### google_compute_service_attachment
| Category | Resource | Severity | Description | Reference ID | ID |
| -------- | -------- | -------- | ----------- | ------------ | -- |
| Infrastructure Security | gcp | MEDIUM | Service Attachment with connection_preference ACCEPT_AUTOMATIC allow any project to connect. | accurics.gcp.NS.134 | AC_GCP_0296 |

### google_compute_subnetwork
| Category | Resource | Severity | Description | Reference ID | ID |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "serviceAttachmentAcceptAutomatic",
"file": "serviceAttachmentAcceptAutomatic.rego",
"policy_type": "gcp",
"resource_type": "google_compute_service_attachment",
"template_args": null,
"severity": "MEDIUM",
"description": "Service Attachment with connection_preference ACCEPT_AUTOMATIC allow any project to connect.",
"reference_id": "accurics.gcp.NS.134",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_GCP_0296"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package accurics

serviceAttachmentAcceptAutomatic[saconf.id] {
saconf := input.google_compute_service_attachment[_]
saconf.config.connection_preference == "ACCEPT_AUTOMATIC"
}