T08 · Insecure Dependencies
- Location
SKILL.md:1019- Finding
Mutable Third-Party CI Action Executes with Repository Runner Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 1019-1023
Vulnerability Type: Mutable third-party CI dependency
Risk Level: MediumVulnerable Code
yaml - name: Scan for vulnerabilities uses: aquasecurity/trivy-action@master with: image-ref: ghcr.io/${{ github.repository }}:${{ github.sha }} exit-code: 1 severity: CRITICAL,HIGHTechnical Analysis
The generated GitHub Actions workflow references
aquasecurity/trivy-actionthrough the mutablemasterbranch rather than an immutable, reviewed commit SHA. The code associated with this reference can change after the Skill and generated workflow have been reviewed.GitHub Actions execute third-party action code on the workflow runner. Depending on workflow permissions and surrounding steps, that code may be able to read checked-out repository content, inspect the runner environment, modify build artifacts, and use credentials exposed to the job. The surrounding workflow also authenticates to GitHub Container Registry using
secrets.GITHUB_TOKEN, increasing the potential consequences if the action or its upstream account is compromised.This is a supply-chain weakness; the audit did not identify evidence that the current upstream action is malicious.
Attack Path
- An attacker compromises the upstream repository, maintainer account, or mutable
masterbranch. - The attacker adds malicious commands to the action implementation.
- A repository uses the workflow generated from this Skill and triggers it through a push to
main. - GitHub resolves
aquasecurity/trivy-action@masterto the attacker-modified revision. - The modified action executes on the repository's CI runner.
- Subject to the job's configured permissions, the action can access repository files and runner data, tamper with artifacts, or abuse available GitHub token permissions.
Impact Assessment
The immediate execution scope is the GitHub Actions runner and the affected workflo ...[truncated 473 chars]
- An attacker compromises the upstream repository, maintainer account, or mutable
- Remediation
View remediation
Remediation Suggestions
-
Pin the action to a reviewed full commit SHA rather than a branch or mutable tag:
yaml - name: Scan for vulnerabilities uses: aquasecurity/trivy-action@FULL_REVIEWED_COMMIT_SHA with: image-ref: ghcr.io/${{ github.repository }}:${{ github.sha }} exit-code: 1 severity: CRITICAL,HIGH -
Record the corresponding release version in a comment so automated dependency tools can identify and update it safely.
-
Define explicit least-privilege workflow permissions. For example:
yaml permissions: contents: readGrant
packages: writeonly to the specific job or step that must publish an image. -
Separate image publication and vulnerability scanning into jobs with distinct permissions where practical. The scanning job should not receive package-write credentials.
-
Review dependency updates before changing the pinned SHA. Use Dependabot or Renovate to propose controlled updates without restoring mutable references.
-
