How to fix: CI workflow uses a third-party action by mutable tag
The exposed workflow references a third-party action with a tag or branch reference rather than a full commit SHA.
Why it matters
A git tag can be moved. Whoever controls that repository, or anyone who compromises the maintainer's account, can repoint the tag at different code, and the next pipeline run executes it with the workflow's full permissions: the repository token, every secret the job can read, and on a self-hosted runner, the runner machine itself. This is the exact mechanism behind several real supply-chain incidents in CI.
Actions published by GitHub itself are excluded here, since pinning those to a major-version tag is the documented convention and GitHub controls the tag. For everything else GitHub's own hardening guide says to pin to a full-length commit SHA. The SHA is not readable, which is the usual objection, so keep the version in a trailing comment and let Dependabot update both together.
How to fix it
- 1Replace each third-party action reference with owner/repo@<full 40-character SHA>, keeping the version in a comment.
- 2Enable Dependabot for github-actions so pinned SHAs are updated with a reviewable pull request.
- 3Set permissions on each job to the minimum the job needs, so a compromised action cannot use a broad default token.
- 4Restrict which actions may run at all through the repository or organisation actions policy.
Code examples
Pin to a commit SHA
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0Keep pins updated automatically
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weeklyReferences
Detected automatically by VulnRadar. The check id is supply-chain-github-action-unpinned-tag, stable across every scan so you can filter or diff on it.
More supply chain checks
- Mediumnpm/yarn Lock File Exposed
- MediumPython Requirements File Exposed
- MediumRuby Gemfile or Gemfile.lock Exposed
- MediumExternal CDN Script Without SRI Hash
- HighHTTP Script Loaded on HTTPS Page
- MediumPHP composer.json or composer.lock Exposed
- HighDockerfile or docker-compose.yml Exposed
- Critical.env File Exposed at Public URL
Questions
- How severe is CI workflow uses a third-party action by mutable tag?
- VulnRadar rates this medium severity in the supply chain category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id supply-chain-github-action-unpinned-tag, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does CI workflow uses a third-party action by mutable tag map to?
- It maps to CWE-1357. In the OWASP Top 10 it falls under A08:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.