Skip to content

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

  1. Rotate or revoke the credential at https://console.cloud.google.com/apis/credentials.
  2. Check the provider's audit logs for use you don't recognise.
  3. 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]