Check ID:
Provider: GCP
Service:
Severity: LOW
Categories:
Resource type:
cloudsql_instance_mysql_skip_show_database_flagProvider: GCP
Service:
cloudsqlSeverity: LOW
Categories:
identity-accessResource type:
sqladmin.googleapis.com/InstanceWhat this check verifies
Cloud SQL MySQL instances configure theskip_show_database database flag to on, limiting use of SHOW DATABASES to accounts with the SHOW DATABASES privilege.
Risk
Withoutskip_show_database set to on, database names can be exposed to unprivileged users, reducing confidentiality. Attackers can perform schema enumeration and targeted probing, enabling lateral movement and privilege escalation against specific datasets.
Recommendation
Setskip_show_database to on for all Cloud SQL MySQL instances. Enforce least privilege by granting SHOW DATABASES only when necessary and reviewing roles regularly. Use defense in depth: monitor access and admin actions, and plan changes in maintenance windows as flag updates may trigger restarts.
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/CloudSQL/enable-skip-show-database-flag.html
- https://cloud.google.com/sql/docs/mysql/flags
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_mysql_skip_show_database_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