LS-GCP-002: Google API Key¶
| Severity | MEDIUM |
| Blast radius | API usage and billing abuse |
| Rotate at | https://console.cloud.google.com/apis/credentials |
--verify |
GET https://maps.googleapis.com/maps/api/geocode/json (address=test) |
If this leaks¶
Depending on which Google APIs are enabled for this key, an attacker may be able to use Maps, Places, or other billed APIs against the project's quota.
What to do¶
- Rotate or revoke the credential at https://console.cloud.google.com/apis/credentials.
- Check the provider's audit logs for use you don't recognise.
- Remove it from git history (
leakscan purge --help) and load it from an environment variable or secret manager instead.
Pattern¶
\bAIza[0-9A-Za-z\-_]{35}\b
Suppress¶
On one line: # leakscan:ignore LS-GCP-002. For the whole project:
disable_rules: [LS-GCP-002]