fix: pin trivy-action and setup-trivy to commit SHAs#3035
Merged
Conversation
Pin to immutable commit hashes instead of mutable tags to mitigate supply-chain risk from the Trivy security incident (2026-03-19). - trivy-action: 57a97c7e (v0.35.0) - setup-trivy: 3fb12ec1 (v0.2.6) Ref: aquasecurity/trivy#10425
Upgrade trivy binary from v0.69.1 to v0.69.3 (latest safe release). Pin all remaining GitHub Actions to immutable commit SHAs to prevent supply chain attacks via mutable tag refs. Ref: GHSA-69fq-xp46-6x23
Pin all third-party GitHub Actions to immutable commit SHAs in docker-image-build.yml and ecr-image-build-alpine.yml to prevent supply chain attacks via mutable tag references.
Enable weekly automated PRs for GitHub Actions version updates to keep SHA pins current.
| uses: aquasecurity/setup-trivy@v0.2.6 | ||
| uses: aquasecurity/setup-trivy@3fb12ec12f41e471780db15c232d5dd185dcb514 # v0.2.6 | ||
| with: | ||
| version: v0.69.1 |
Member
There was a problem hiding this comment.
@kelvin-muchiri This is the latest version and hash for setup-trivy, see https://github.com/aquasecurity/setup-trivy/releases/tag/v0.2.6.
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| with: | ||
| version: "v0.69.1" |
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| with: | ||
| version: "v0.69.1" |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/setup-trivy@3fb12ec12f41e471780db15c232d5dd185dcb514 # v0.2.6 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: v0.69.1 |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" |
.github/workflows/ci.yml
Outdated
| uses: aquasecurity/setup-trivy@3fb12ec12f41e471780db15c232d5dd185dcb514 # v0.2.6 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: v0.69.1 |
|
|
||
| - name: Install Trivy | ||
| uses: aquasecurity/setup-trivy@v0.2.6 | ||
| uses: aquasecurity/setup-trivy@3fb12ec12f41e471780db15c232d5dd185dcb514 # v0.2.6 |
|
|
||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 |
|
|
||
| - name: Run Trivy vulnerability scanner (HTML report) | ||
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 |
…n-v2 Fix/trivy supply chain remediation v2
ukanga
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pin to immutable commit hashes instead of mutable tags to mitigate supply-chain risk from the Trivy security incident (2026-03-19).
Ref: aquasecurity/trivy#10425