Skip to content

LS-GH-001: GitHub Personal Token

Severity HIGH
Blast radius Source code and CI/CD compromise
Rotate at https://github.com/settings/tokens
Validation github_checksum_ok (matches that fail are dropped)
--verify GET https://api.github.com/user

If this leaks

Grants API access to every repository, organization, and setting the token's scopes allow, including private source code and the ability to push commits.

What to do

  1. Rotate or revoke the credential at https://github.com/settings/tokens.
  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

\bghp_[0-9a-zA-Z]{36}\b

Suppress

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

disable_rules: [LS-GH-001]