Check ID:
Provider: GCP
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudsql_instance_sqlserver_user_options_flagProvider: GCP
Service:
cloudsqlSeverity: MEDIUM
Categories:
vulnerabilitiesResource type:
sqladmin.googleapis.com/InstanceWhat this check verifies
Cloud SQL for SQL Server instances are evaluated for theuser options database flag configured with any value.
This flag sets global defaults for session SET behaviors; the check identifies instances where this global override is present.
Risk
Globaluser options changes affect all sessions, impacting data integrity and availability. Disabling safe ANSI behaviors or enabling implicit transactions can alter NULL comparisons and error handling, leading to inconsistent results, lock contention, and application failures, reducing predictability and complicating auditing.
Recommendation
Leaveuser options unset at the instance level; keep default behavior. Control SET options explicitly at session or database scope.
- Enforce least privilege for flag management
- Use change control and testing before rollout
- Monitor for configuration drift as part of defense in depth
Remediation
- CLI
- Terraform
- Dashboard steps
gcloud sql instances patch <example_resource_name> —clear-database-flags
References
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/CloudSQL/user-options-flag-not-configured.html
- https://cloud.google.com/sql/docs/sqlserver/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_sqlserver_user_options_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