Check ID:
Provider: GCP
Service:
Severity: HIGH
Categories:
Resource type:
apikeys_api_restrictions_configuredProvider: GCP
Service:
apikeysSeverity: HIGH
Categories:
secrets, identity-accessResource type:
apikeys.googleapis.com/KeyWhat this check verifies
Google Cloud API keys have API restrictions limiting calls to specific services. The finding checks that keys are restricted to named Google APIs and do not include the broadcloudapis.googleapis.com, indicating keys are scoped only to intended use.
Risk
Unrestricted keys-or ones allowingcloudapis.googleapis.com-expand attack surface. A leaked key can call many APIs without identity, enabling data exposure, unintended changes on permissive endpoints, and quota/billing exhaustion, impacting confidentiality, integrity, and availability.
Recommendation
Apply least privilege: restrict each API key to only the specific APIs it must access and never includecloudapis.googleapis.com. Add application restrictions (referrers, IPs, app IDs), rotate keys, and monitor usage. Prefer service accounts or short-lived tokens for production as part of defense in depth.
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://cloud.google.com/docs/authentication/api-keys
- https://cloud.google.com/docs/authentication/api-keys-best-practices
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = apikeys_api_restrictions_configured. 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