Overview
Centralized logging helps preserve forensic and audit evidence even if project-level settings drift or a project owner changes retention locally.
Why this matters
Security teams usually need at least one organization-level or folder-level sink that exports child-project logs to a central destination.
What this control should detect
Organization-level or folder-level log sinks that do not include child resources or do not point to a destination.
Remediation guidance
Google Cloud Remediation
Service-wide fix (recommended): manage org-level or folder-level sinks centrally and export audit and security logs to a dedicated logging project, bucket, SIEM, BigQuery dataset, or Pub/Sub topic.
When to use service-wide remediation
Use the service-wide path when multiple folders or projects need the same forensic logging baseline.
Google Cloud console
- Open
Cloud Loggingand switch scope to the organization or folder. - Open
Logs Router. - Create a new sink or update the existing sink.
- Enable
Include logs ingested by children. - Point the sink to an approved destination.
- Grant the sink writer identity permission to write to that destination.
Google Cloud CLI
Create an aggregated sink at organization scope:
gcloud logging sinks create <sink-name> <destination> \
--organization=<org-id> \
--include-children \
--log-filter='<filter>'
Update an existing sink so it includes child resources:
gcloud logging sinks update <sink-name> <destination> \
--organization=<org-id> \
--include-children \
--log-filter='<filter>'
Validate the sink:
gcloud logging sinks describe <sink-name> --organization=<org-id>
Operational notes
- If the sink writes to a destination outside the current project, grant the sink
writerIdentitypermission on that destination or export will fail. - If no organization-level or folder-level sink exists yet, create one first instead of only fixing project-level logging.
References
- https://cloud.google.com/logging/docs/export/configure_export_v2
- https://cloud.google.com/logging/docs/export/aggregated_sinks
- https://cloud.google.com/sdk/gcloud/reference/logging/sinks/create
- https://docs.cloud.google.com/sdk/gcloud/reference/logging/sinks/update
Query logic
These are the stored checks tied to this control.
Missing aggregated log sinks
Connectors
Covered asset types
Expected check: eq []
{ logSinks(where: { OR: [ { includeChildren: false }, { destination: "" } ] }) { ...AssetFragment } }
Google Cloud