Check ID:
Provider: GCP
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudsql_instance_postgres_log_min_messages_flagProvider: GCP
Service:
cloudsqlSeverity: MEDIUM
Categories:
loggingResource type:
sqladmin.googleapis.com/InstanceWhat this check verifies
Cloud SQL for PostgreSQL instances are evaluated for thelog_min_messages flag being set to a sufficiently high severity. Instances with the flag missing or set below ERROR (e.g., DEBUG*, INFO, NOTICE) are identified.
Risk
Insufficientlog_min_messages severity degrades audit log integrity, causing real failures to be treated as non-errors or lack context. This delays detection and impairs forensics, enabling unnoticed data tampering or repeated faulty operations, impacting the integrity and availability of the service.
Recommendation
Setlog_min_messages to ERROR or stricter to ensure error statements are captured with context. Align with centralized logging, retention, and review processes. Prefer defense in depth by preserving actionable error telemetry, while balancing verbosity and cost per your logging policy.
Remediation
- CLI
- Terraform
- Dashboard steps
References
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudsql_instance_postgres_log_min_messages_flag. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GCP checks