Trivy: use GHCR DB source, add ECR fallback, update codeql-action to v4#22
Merged
Conversation
The GCR mirror (mirror.gcr.io/aquasec/trivy-db) returns 404 intermittently. Set TRIVY_DB_REPOSITORY=ghcr.io/aquasecurity/trivy-db on all four Trivy steps (two trivy-action SARIF steps, two run: blocking steps) to bypass the mirror. Also updates github/codeql-action/upload-sarif from v3 to v4 ahead of the December 2026 v3 deprecation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
If ghcr.io/aquasecurity/trivy-db is unavailable, Trivy will fall back to public.ecr.aws/aquasecurity/trivy-db before failing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Fixes the post-merge pipeline failure from PR #20 where
mirror.gcr.io/aquasec/trivy-dbreturned 404, preventingv2.5.2from being published.TRIVY_DB_REPOSITORY=ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-dbon all four Trivy steps. Trivy tries GHCR first, falls back to AWS ECR Public if unavailable, before failing.codeql-action/upload-sarifv3 → v4: Addresses the deprecation warning logged during the failed run (v3 deprecated December 2026).Test plan
scanjob completes successfully with Trivy DB downloaded from GHCRmergejob runs and v2.5.2 tags published correctly🤖 Generated with Claude Code