Skip to content

New Detector for Heroku #4177

@Chemo850

Description

@Chemo850

Description

Heroku OAuth2 tokens are used to authorize and grant access to Heroku accounts and applications. They allow third parties to provide services like monitoring and scaling applications, and they can also be used for personal scripts or integrations. The initial Heroku pattern was just a 128 bit UUID which made it difficult to identify. Heroku has since introduced two additional prefixed patterns. The current Trufflehog rule library only contains V1 pattern and does not contain either the V2 or V3 patterns for these Oauth2 tokens. The regex patterns below represent the exact pattern for both new token versions.

Heroku Version 2

HRKU-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Heroku Version 3

HRKU-[0-9a-zA-Z_-]{60}

Preferred Solution

New versions of the patterns be added to the existing rule to comprehensively scan for Heroku secrets.

References

https://devcenter.heroku.com/articles/oauth#prefixed-oauth-tokens

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions