LS-IAC-006: GitHub Actions Hardcoded Secret¶
| Severity | HIGH |
| Blast radius | Depends on the credential; treat as exposed |
| Rotate at | https://vasishta03.github.io/leakscan/rules/ |
| Applies to files matching | (?:^|/)\.github/workflows/[^/]+\.ya?ml$ |
If this leaks¶
A literal credential was found in a GitHub Actions workflow (use ${{ secrets.NAME }} instead). Anyone with read access to the file, the image or its history can reuse it. Move it to a secret store and inject it at runtime.
What to do¶
- Rotate or revoke the credential at https://vasishta03.github.io/leakscan/rules/.
- 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¶
(?i)^\s+\w*(?:TOKEN|SECRET|PASSWORD|API_?KEY)\w*:\s*['\"]?(?!\$\{\{)([^\s'\"#]{8,})
Suppress¶
On one line: # leakscan:ignore LS-IAC-006. For the whole project:
disable_rules: [LS-IAC-006]