AAK-GHA-IMMUTABLE-001: Third-party GitHub Action not pinned by full commit SHA
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/gha_hardening.py- Auto-fixable
- No.
- SARIF name
GhaNonShaPin
What it detects
A workflow in .github/workflows/ uses a third-party Action (owner/action@ref) where ref is a tag or branch name instead of a 40-character commit SHA. A repo-takeover of the Action's publisher can re-point the tag to a malicious revision — the downstream repo consuming it will happily run the new code with GITHUB_TOKEN and write permissions. GitHub's April 2026 Security Roadmap ships Immutable Actions and makes SHA pinning the default policy.
How to fix
Repin third-party Actions to a 40-character commit SHA and add a # v1.2.3-style trailing comment for humans. First-party Actions under actions/ and github/ are exempt (they now ship Immutable Actions). Dependabot will auto-bump SHA pins when update-type: all is set.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-GHA-IMMUTABLE-001
Limitations
Reads the uses: entries of the files directly inside .github/workflows and reports an owner/action@ref whose ref is not a 40-character commit SHA, except for the owners actions and github, local ./ actions and docker:// images. A third-party action referenced from a local composite action (.github/actions/setup/action.yml) is not read, and neither is an actions/ or github/ action pinned to a branch (actions/checkout@main) or a docker:// image tag. A workflow file over 1 MB is not read.
References
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-02 (Unpinned Package)
- Incidents and advisories: GHA-IMMUTABLE-2026-04
- CSA AI Controls Matrix (AICM): STA-02, CCC-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-GHA-IMMUTABLE-001.md: the page then shows that text, with the registry reference appended under it.