T08 · Insecure Dependencies
- Location
SKILL.md:68- Finding
Mutable Third-Party GitHub Action Reference
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 68
Vulnerability Type: Unpinned third-party CI dependency
Risk Level: MediumVulnerable Code:
yaml - name: Security scan uses: aquasecurity/trivy-action@masterTechnical Analysis
The example workflow references
aquasecurity/trivy-actionthrough the mutablemasterbranch rather than a reviewed, immutable commit SHA. Consequently, the code executed by future workflow runs can change without any corresponding change to this project.GitHub Actions run within the workflow job's security context. Depending on the generated workflow configuration, an action can interact with the checked-out repository, workspace files, artifacts, GitHub token, and credentials made available to the job. If the upstream repository or branch is compromised, force-updated, or modified maliciously, the workflow could execute attacker-controlled code.
Attack Path
- An attacker compromises the upstream action repository, a maintainer account, or the mutable
masterbranch. - The attacker modifies the action code referenced by
aquasecurity/trivy-action@master. - A repository uses the sample or generated workflow and triggers it through a push, pull request, or tag.
- GitHub resolves
@masterto the attacker-controlled revision and executes it on the runner. - The malicious action accesses resources available to the job, potentially including source files, workflow tokens, registry credentials, or build artifacts.
- The attacker may exfiltrate accessible credentials, modify artifacts, or tamper with a container image before publication.
Impact Assessment
Successful exploitation could permit arbitrary code execution within the CI runner and access to all resources granted to that workflow step. The precise scope depends on repository settings, event type, token permissions, and secret exposure.
Potential consequences include source-code t ...[truncated 311 chars]
- An attacker compromises the upstream action repository, a maintainer account, or the mutable
- Remediation
View remediation
Remediation Suggestions
Pin the third-party action to a full, reviewed commit SHA:
yaml - name: Security scan uses: aquasecurity/trivy-action@FULL_REVIEWED_COMMIT_SHAAdditionally:
- Record the release tag corresponding to the pinned SHA in a comment for maintainability.
- Review dependency updates before replacing the SHA.
- Use an automated dependency-update tool that proposes reviewed SHA updates.
- Pin every third-party GitHub Action generated by the Skill, not only Trivy.
- Define explicit, least-privilege workflow
permissions. - Expose registry credentials and other secrets only to steps that require them.
- Separate scanning from image publication where practical, and require successful scans and protected-environment approval before publishing.
