A MySQL database instance allows anyone to connect with administrative privileges misconfiguration d
Rule Details
Cortex AppSec Rule ID
APPSEC2_GCP_7
Category - Subcategory
IAM - Overly Permissive
Provider
GCP
Severity
LOW
Framework
Terraform, Terraform Plan
Impact
It is recommended to set a password for the administrative user (root by default) to prevent unauthorized access to the SQL database instances. This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console. At the time of MySQL Instance creation, not providing an administrative password allows anyone to connect to the SQL database instance with administrative privileges. The root password should be set to ensure only authorized users have these privileges.
How to Fix
Resource: google_sql_database_instance
Arguments: google_sql_user [source,go]
resource "google_sql_user" "root_with_password" { name = "root" instance = google_sql_database_instance.db_instance.name host = "me.com"
password = "1234" }
Last updated
Was this helpful?
