Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Google Cloud Platform Foundation v5.0.0 · 2.6

Changes to audit configuration should raise an alert

  • Level 1
  • Logging and Monitoring

This check looks for a log-based metric that counts changes to a project's audit configuration, and an alerting policy attached to it. The safe setting is that both exist, so someone is told when audit logging is altered.

Why it matters

Audit logs are the record of who did what in a project. The audit settings live in the project's IAM policy, so anyone able to edit that policy can narrow what is logged. An attacker, or a well-meaning admin, switching logging off for a service leaves a gap exactly where you would later want evidence.

Google Cloud lets you turn log entries into a metric and alert on it. A user-defined log-based metric counts only entries received after it was created, so it has to be in place before the change happens.

Sources: Google Cloud documentation on log-based metrics and on configuring Data Access audit logs.

How to check it yourself

Console: Logging > Log-based Metrics, look for a user-defined metric whose filter matches audit configuration changes; then Monitoring > Alerting and confirm a policy uses that metric. Read-only commands:

gcloud logging metrics list --project=
gcloud alpha monitoring policies list --project=

Inspect the metric filter and the policy condition to confirm they refer to audit configuration changes.

How to fix it

Create a counter metric with a filter on SetIamPolicy calls that change auditConfigs (for example protoPayload.methodName="SetIamPolicy" AND protoPayload.serviceData.policyDelta.auditConfigDeltas:*), then in Monitoring create an alerting policy on that metric with a notification channel your team reads. Script (run by an admin, not by ConfigCobra):

gcloud logging metrics create audit-config-changes \
  --description="Audit configuration changes" \
  --log-filter='protoPayload.methodName="SetIamPolicy" AND protoPayload.serviceData.policyDelta.auditConfigDeltas:*'

Then add the alerting policy in the console. ConfigCobra itself never changes your Google Cloud projects; it reports the finding and suggests these steps. Check the filter against your own log entries before relying on it.

What changes when you fix it

Nothing about access or workloads changes. The change is that audit configuration edits now notify a channel, so the people on that channel get a new type of message and should know what to do with it. Legitimate edits, such as enabling a new data access log, will also alert, which is the intended effect. Metrics and alerting policies are billed under Cloud Monitoring and Logging like other usage, so check the projects involved. Security and platform owners are the audience.

Included in

BenchmarkCIS IDProfile
CIS Google Cloud Platform Foundation v5.0.02.6Level 1

Check this on your Google Cloud

ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial