T08 · Insecure Dependencies
- Location
SKILL.md:264- Finding
Mutable GitHub Action Reference Creates a CI Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 264
Vulnerability Type: Unpinned third-party CI dependency
Risk Level: HighVulnerable Code:
yaml - name: Trivy vulnerability scan uses: aquasecurity/trivy-action@master with: image-ref: ${{ env.IMAGE }} format: 'sarif' output: 'trivy-results.sarif' severity: 'CRITICAL,HIGH' exit-code: '1' ignore-unfixed: true trivyignores: '.trivyignore.yaml'Technical Analysis
The GitHub Actions example references
aquasecurity/trivy-actionthrough the mutablemasterbranch. A branch reference does not identify an immutable, previously reviewed version of the action. Its effective implementation may change whenever the upstream branch is updated.If the upstream repository, maintainer account, or branch-protection process is compromised, an attacker could replace the referenced action code. Workflows that subsequently use this recommendation would automatically execute the modified code in their GitHub Actions runner.
This is a supply-chain weakness rather than evidence that the current upstream action is malicious.
Attack Path
- A user copies the recommended workflow into a repository.
- The upstream action repository or a maintainer account is compromised.
- An attacker modifies the commit referenced by the
masterbranch. - The repository triggers the workflow through a push, pull request, schedule, or manual invocation.
- GitHub Actions downloads and executes the attacker-controlled action.
- The malicious action accesses available source files, workflow credentials, artifacts, network resources, or other permissions granted to the runner.
Impact Assessment
Successful exploitation permits arbitrary code execution in the CI runner under the workflow's security context. Depending on workflow permissions and GitHub environment configuration, the attacker could:
- Read or modi ...[truncated 527 chars]
- Remediation
View remediation
Remediation Suggestions
Pin the action to a reviewed, immutable full commit SHA rather than a branch or mutable tag:
yaml - name: Trivy vulnerability scan uses: aquasecurity/trivy-action@FULL_REVIEWED_COMMIT_SHA with: image-ref: ${{ env.IMAGE }} format: 'sarif' output: 'trivy-results.sarif' severity: 'CRITICAL,HIGH' exit-code: '1' ignore-unfixed: true trivyignores: '.trivyignore.yaml'Additional hardening should include:
- Verify the selected commit against an official upstream release.
- Review action changes before updating the pinned SHA.
- Use Dependabot or Renovate to propose controlled action updates.
- Grant the workflow only the minimum required
permissions. - Avoid exposing deployment or signing secrets to scanning jobs.
- Prefer GitHub-hosted isolated runners where practical.
- Apply environment approval controls to privileged release operations.
