LS-HEROKU-002: Heroku Legacy API Key¶
| Severity | HIGH |
| Blast radius | Deployment pipeline and secrets compromise |
| Rotate at | https://dashboard.heroku.com/account |
If this leaks¶
Allows deploying apps, reading config vars (which hold other secrets) and running one-off dynos.
What to do¶
- Rotate or revoke the credential at https://dashboard.heroku.com/account.
- 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)(?:heroku)[\w.\-]{0,25}['\"]?\s*(?::=|=>|[=:])\s*['\"]?([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})(?![A-Za-z0-9])
Suppress¶
On one line: # leakscan:ignore LS-HEROKU-002. For the whole project:
disable_rules: [LS-HEROKU-002]