T08 · Insecure Dependencies
- Location
SKILL.md:297- Finding
GitHub Actions Dependencies Use Mutable Version Tags
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 297–314
Vulnerability Type: Supply-chain risk from mutable CI dependencies
Risk Level: MediumVulnerable Code
yaml - uses: actions/checkout@v4 - uses: hashicorp/setup-terraform@v3 with: { terraform_version: 1.7.5 } # ... - uses: actions/github-script@v7Technical Analysis
The skill presents this workflow as ready to commit, but its third-party GitHub Actions are referenced through mutable major-version tags. Unlike full commit SHAs, tags such as
v4,v3, andv7do not provide immutable dependency resolution.If an upstream action repository or release process is compromised, the referenced tag could resolve to modified code. That code would execute automatically on the GitHub-hosted runner with the workflow's available token permissions, environment, checked-out files, and generated Terraform artifacts.
Attack Path
- An attacker compromises an upstream action repository, maintainer account, or release process.
- The attacker causes one of the referenced major-version tags to resolve to a malicious commit.
- A repository adopts the generated workflow without replacing tags with reviewed commit SHAs.
- A matching pull-request event starts the workflow.
- GitHub resolves the mutable tag and executes the compromised action.
- The malicious action accesses repository files, Terraform plan artifacts, or capabilities granted through
GITHUB_TOKENand performs actions permitted by the workflow environment.
This path depends on compromise or malicious modification of an upstream action; no such compromise was observed in the audited project.
Impact Assessment
Potential impact is limited by the runner environment and workflow permissions, but could include:
- Reading checked-out repository content and Terraform configuration.
- Reading generated
plan.outandplan.jsonartifacts. - Accessing credenti ...[truncated 398 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every external GitHub Action to a reviewed full commit SHA:
yaml - uses: actions/checkout@<full-reviewed-commit-sha> - uses: hashicorp/setup-terraform@<full-reviewed-commit-sha> - uses: actions/github-script@<full-reviewed-commit-sha> -
Retain the release version in a comment for maintainability:
yaml - uses: actions/checkout@<full-reviewed-commit-sha> # v4.x.x -
Add an explicit least-privilege permissions policy. For example:
yaml permissions: contents: read pull-requests: writeReduce this further if a separate job or token can post the review.
-
Use Dependabot or Renovate to propose controlled SHA updates, and review upstream diffs before merging them.
-
Avoid exposing cloud credentials or repository secrets to pull-request workflows unless strictly required. Prefer short-lived, audience-restricted credentials and protected environments.
-
Enforce action allowlists and immutable-SHA policies at the organization level where available.
-
