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