Check ID:
Provider: GCP
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudsql_instance_postgres_log_error_verbosity_flagProvider: GCP
Service:
cloudsqlSeverity: MEDIUM
Categories:
loggingResource type:
sqladmin.googleapis.com/InstanceWhat this check verifies
Cloud SQL for PostgreSQL evaluates thelog_error_verbosity database flag and expects the value default.
Configurations using terse or verbose are flagged as deviations.
Risk
Withverbose, logs may reveal SQLSTATE, code paths, and function details, aiding recon and leaking metadata (confidentiality). With terse, missing DETAIL/HINT/CONTEXT hinders detection and forensics, reducing integrity of investigations and availability of operational insight.
Recommendation
Setlog_error_verbosity to default to balance data minimization and observability.
- Avoid
verbosein production; restrict log access (least privilege) - Avoid
terseexcept briefly to curb noise - Centralize logs with retention and tamper protection for defense in depth
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_error_verbosity_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