Skip to content

LS-GEN-001: Generic API Key

Severity MEDIUM
Blast radius Unknown service API access
Rotate at https://vasishta03.github.io/leakscan/rules/

If this leaks

An unidentified API key. If valid, it likely grants programmatic access to whatever service it belongs to, scoped however that service's keys are normally scoped.

What to do

  1. Rotate or revoke the credential at https://vasishta03.github.io/leakscan/rules/.
  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

(?i)(?:api_key|apikey|api-key)\s*[=:]\s*['\"]?([0-9a-zA-Z\-_]{16,})['\"]?

Suppress

On one line: # leakscan:ignore LS-GEN-001. For the whole project:

disable_rules: [LS-GEN-001]