Repository navigation
fix: use current MCR Trivy database repository - #9872
Merged
Merged
Conversation
Remove the stale MCR mirror from the database source list. Keep GHCR as the first source and public ECR as the fallback. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9aaa7127-6cc0-4c70-830e-c4e04f9fa5bf
Contributor
Windows Unit Test Results 3 files 18 suites 1m 3s ⏱️ Results for commit 5a29519. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The single-line change preserves existing upstream sources and their order, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Updates Linux VHD vulnerability scanning to use upstream Trivy databases instead of the stale MCR mirror.
Changes:
- Removes MCR from the database source list.
- Keeps GHCR first and public ECR as fallback, without changing scanner versions or image-scan cache reuse.
| File | Description |
|---|---|
vhdbuilder/packer/trivy-scan.sh |
Removes the MCR mirror from Trivy database sources. |
Review effort: Balanced
Contributor
|
Replace the retired mirror path with oss/v2/aquasecurity/trivy-db. Verified its archive metadata is from October 22; retain GHCR and ECR fallbacks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9aaa7127-6cc0-4c70-830e-c4e04f9fa5bf
Nishchay (awesomenix)
approved these changes
Oct 22, 2026
Contributor
Contributor
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.
What this PR does / why we need it:
Replace the stale MCR mirror path with the current MCR database repository. Keep GHCR and public ECR as fallbacks. Scanner versions and image-scan cache reuse remain unchanged.
Evidence
UpdatedAt=2026-06-29T13:59:42.600856471Z. Trivy accepts the first successful download without rejecting its age.metadata.json: schema 2,UpdatedAt=2026-10-22T19:12:23.943296885Z,NextUpdate=2026-10-23T19:12:23.943296554Z. Layer:sha256:82b284315ed95860ecc6eb7bce47a720d90551d598762820a67900bdfa0a94fb.UpdatedAt=2026-10-22T19:14:47.059491382Z. The MCR snapshot is about 2 minutes 23 seconds earlier, not byte-identical to upstream. It is a fresh October 22 database, not the stale June archive.shellspec --shell bash --format d spec/vhdbuilder/packer/trivy_scan_spec.sh— passed, 25 examples, on the revised configuration.ignored=$(sed -n '/^IGNORED="/,/^"$/p' .pipelines/scripts/verify_shell.sh | sed '1d;$d' | paste -sd, -); shellcheck --exclude="$ignored" vhdbuilder/packer/trivy-scan.sh— passed.shellcheck --shell=sh --include=SC3010,SC3014 vhdbuilder/packer/trivy-scan.sh— passed.bash -n vhdbuilder/packer/trivy-scan.shandgit diff --check— passed.CI and scan evidence
5a295195cfis pushed and its signature is Verified. Fresh GitHub checks are running; they are not yet green.31c85988e0, not the new MCR-first commit. Its fresh database detectedCVE-2026-111943and other findings missing from the June database. Those results are not end-to-end validation of the revised MCR source.TestLivePatchingUsesVHDInsteadOfCustomDatasize check: 87404 encoded characters against a limit of 87380.go test ./pkg/agent -run '^TestLivePatchingUsesVHDInsteadOfCustomData$' -count=2 -vin isolated archives confirmed the cause: parent1dd236944fpassed twice at 86820; SSH-disable commitf3163c3013(#9091) failed twice at 87988. This PR does not change or weaken the assertion.Merge danger: two-way change, limited to Linux VHD scanning. MCR remains the primary registry; only its repository path changes. This does not add a database-age gate or fix the vulnerabilities detected by the refreshed database. Required CI is not yet green.
Which issue(s) this PR fixes:
N/A — discovered while checking VHD scan database freshness.