LS-GH-005: GitHub Fine-Grained Token¶
| Severity | HIGH |
| Blast radius | Source code and CI/CD compromise |
| Rotate at | https://github.com/settings/tokens?type=beta |
--verify |
GET https://api.github.com/user |
If this leaks¶
Grants the repository and organization permissions selected when the token was created, often including contents write and Actions secrets.
What to do¶
- Rotate or revoke the credential at https://github.com/settings/tokens?type=beta.
- 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¶
\bgithub_pat_[0-9a-zA-Z]{22}_[0-9a-zA-Z]{59}\b
Suppress¶
On one line: # leakscan:ignore LS-GH-005. For the whole project:
disable_rules: [LS-GH-005]