Other Articles
- Cloud SQL – Configure Private IP
- Cloud SQL – Monitor CPU Utilization
- Cloud SQL – Enable Deletion Protection
- Cloud SQL – Enable Disk Encryption
- Cloud SQL – Enable Automated Backups
- Cloud SQL – Enable Log Export
- Cloud SQL – Enforce Password Validation
- Cloud SQL – Protect From Internet Access
- Cloud SQL – Enforce Secure Transport
- Compute Engine – Block Project-Wide SSH Keys
- Compute Engine – Disable IP Forwarding
- Compute Engine – Disable Public IP Addresses
- Compute Engine – Disable Serial Port Access
- Compute Engine – Enable Confidential Computing
- Compute Engine – Enable OS Login
- Compute Engine – Enable Shielded VM
- Compute Engine – Restrict Default Service Account
- General – Deny Public Access to KMS Keys
- General – Enforce Duties Separation
- General – Enforce KMS Key Rotation
- General – Restrict Admin Roles on Service Accounts
- Cloud Run – Configure Timeout Settings
- Cloud Storage – Enable Bucket Encryption
- Cloud Storage – Enable Bucket Logging
- Cloud Storage – Enable Bucket Versioning
- Cloud Storage – Enforce Uniform Bucket-Level Access
- Cloud Storage – Restrict Public Access
- IAM Users – Enforce GCP-Managed Keys
- IAM Users – Rotate External User-Managed Service Account Keys
- GKE – Enable Private Nodes
- GKE – Restrict Control Plane Access
- GKE – Enable Workload Identity
- GKE – Disable Legacy ABAC
- GKE – Enable Network Policy
- GKE – Enable Shielded Nodes
- GKE – Enable Node Auto-Upgrade and Auto-Repair
- GKE Cluster – Enable Cluster Logging
- General – Enable Cloud Audit Logs
- General – Configure Log Bucket Retention
- Cloud SQL – Enable High Availability
- Cloud SQL – Configure Maintenance Window
- Cloud Storage – Configure Bucket Retention or Lifecycle
- General – Enable Security Command Center
- Compute Engine – Enable Instance Deletion Protection
- VPC Firewall – Restrict Public SSH and RDP Access
- VPC Firewall – Restrict Public Database Access
- VPC Network – Avoid the Default Network
- VPC Network – Enable Subnet Flow Logs
General – Configure a Log Sink
Secure Configuration Checks > GCP
This check ensures that the project has an enabled user-defined log sink with a destination.
The built-in _Default and _Required sinks do not count.
Check Details
- Resource: Google Cloud Project
- Check: Configure a log sink
- Risk: Without a log sink, logs stay in the project and expire after the default retention period. You cannot keep them for audits or send them to a security tool.
Remediation via Google Cloud Console
-
Log in to the Google Cloud Console and navigate to
Monitoring > Log Router.
- Click Create sink.
-
Enter a Sink name and a description.
Click Next.
-
Under Sink destination, select a service, such as a
Cloud Storage bucket, and select the destination.
Click Next.
- Under Choose logs to include in sink, leave the filter empty to include all logs. Click Next.
- Click Create sink.
- If a user-defined sink already exists but is disabled, click More actions next to it and select Enable sink.
Remediation via Google Cloud CLI
-
Open the Google Cloud Console and launch
Cloud Shell.
-
Create a log sink that sends logs to a Cloud Storage bucket:
gcloud logging sinks create <SINK_NAME> \ storage.googleapis.com/<BUCKET_NAME>
Replace
<SINK_NAME>with a name for the sink and<BUCKET_NAME>with your bucket name. For BigQuery, usebigquery.googleapis.com/projects/<PROJECT_ID>/datasets/<DATASET>. For Pub/Sub, usepubsub.googleapis.com/projects/<PROJECT_ID>/topics/<TOPIC>. -
Allow the sink to write to the bucket:
WRITER=$(gcloud logging sinks describe <SINK_NAME> \ --format="value(writerIdentity)") gcloud storage buckets add-iam-policy-binding gs://<BUCKET_NAME> \ --member="$WRITER" \ --role="roles/storage.objectCreator"
For BigQuery, grant
roles/bigquery.dataEditoron the dataset. For Pub/Sub, grantroles/pubsub.publisheron the topic. -
If the sink already exists but is disabled, enable it:
gcloud logging sinks update <SINK_NAME> --no-disabled
-
Verify the sinks of the project:
gcloud logging sinks list --format="table(name,destination,disabled)"
The list shows your sink next to
_Defaultand_Required. Your sink must have a destination and must not be disabled.
Default Value
Every project has the built-in _Required and _Default sinks.
They route logs to the project's own log buckets.
No user-defined sink exists unless you create one.
Updated on 09 November, 2026