Heroku Platform Key

ID

heroku_key

Severity

high

Vendor

Heroku

Family

API Token

Description

Heroku is a cloud platform as a service supporting several programming languages like Ruby, Java, Node.js, Scala, Clojure, Python, PHP, and Go.

The Heroku Platform Key is used to perform programmatic calls to the Heroku Platform API.

Security

Any hardcoded Heroku Platform Key is a potential secret reported by this detector.

Accidentally checking-in the token to source control repositories could compromise the Heroku account and data.

Examples

HEROKU_API_KEY=7ac1f8cf-af64-db92-c13d-acf23da6ef34

Mitigation / Fix

  1. Remove the Heroku Key from the source code or committed configuration file.

  2. Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). Go to Heroku Applications, find the specific key and delete it.

  3. If under a git repository, you may remove unwanted files from the repository history using tools like git filter-repo or BFG Repo-Cleaner. You may follow the procedure listed here for GitHub.

You should consider any sensitive data in commits with secrets as compromised.

Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories.