Changes to VPC networks should raise an alert through a log-based metric
This check looks for a log-based metric that matches VPC network changes and an alerting policy attached to it. The safe setting is that every network create, change or delete notifies someone.
Why it matters
A VPC network defines what can talk to what. A new network, a peering added, or a network deleted changes your exposure, and it should be a visible event rather than something found weeks later. Google's audit logs record these admin changes: the Compute Engine documentation lists methods such as v1.compute.networks.insert, v1.compute.networks.patch, v1.compute.networks.delete, v1.compute.networks.addPeering and v1.compute.networks.removePeering.
Log-based metrics are Cloud Monitoring metrics derived from log entries, and an alerting policy can notify on them. Together they turn an audit log entry into a notification. Sources: Google Cloud documentation on Compute Engine audit logging and on log-based metrics.
How to check it yourself
In the Google Cloud console open Logging > Log-based Metrics and look for a counter metric whose filter matches Compute Engine network methods, then open Monitoring > Alerting and confirm a policy uses that metric and has a notification channel. Read-only listing from the command line:
gcloud logging metrics list --project my-project-id --format="table(name,filter)"A project with no metric that matches network changes, or a metric with no alerting policy, is a finding. Keep in mind that user-defined metrics count only entries received after the metric exists.
How to fix it
Create a counter log-based metric under Logging > Log-based Metrics with a filter on the network methods, for example one that matches the v1.compute.networks.* method names listed above. Then in the console open the metric's menu, choose Create alert from metric, set a threshold, a rolling window long enough to absorb ingestion delay, and select the notification channels you set up beforehand, then name and create the policy.
Configure how the policy handles missing data, because time series for rare events have gaps. Agree the filter with your network team so legitimate changes are not buried in noise. ConfigCobra itself is read-only and never changes your Google Cloud; your administrators create the metric and policy.
What changes when you fix it
No workload or traffic is affected; the change adds a metric and an alerting policy. The people affected are whoever receives the notifications, typically the network or security team, who will start getting a message every time a VPC network is created, changed or deleted.
Planned network work will also trigger alerts, so tell the team when changes are planned and decide who acknowledges them. Metrics apply per project, so repeat the setup for each project in scope. There is no change to who can create or edit networks; the alert only reports it.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Google Cloud Platform Foundation v5.0.0 | 2.10 | Level 2 |
More checks in Logging and Monitoring
- Configure Cloud Audit Logging across all services and usersCIS 2.1
- Enable Workspace/Cloud Identity data sharing for admin audit loggingCIS 2.2
- Configure sinks to export copies of all log entriesCIS 2.3
- Apply Bucket Lock retention policies to log-export storage bucketsCIS 2.4
- Alert on project-ownership assignments/changes via log metric filterCIS 2.5
Go further
- Logging and Monitoring17 controls in this section
- CIS Google Cloud Platform Foundation v5.0.093 controls
- CIS Google Cloud Platform Foundation checklistEvery control in one list, as CSV
- RemediationSee what a fix changes in your tenant before you apply it, then use the generated script
- Monitoring & DriftScheduled scans, drift detection and email alerts when a control regresses
Check this on your Google Cloud
ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.