LS-GH-004: GitHub Refresh Token¶
| Severity | HIGH |
| Blast radius | Long-lived account and source code access |
| Rotate at | https://github.com/settings/applications |
If this leaks¶
Can be exchanged for new access tokens indefinitely, giving an attacker long-lived access to the authorizing user's account and repositories.
What to do¶
- Rotate or revoke the credential at https://github.com/settings/applications.
- 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¶
\bghr_[0-9a-zA-Z]{76}\b
Suppress¶
On one line: # leakscan:ignore LS-GH-004. For the whole project:
disable_rules: [LS-GH-004]