Repository navigation
fix(amazon): scan Amazon Corretto packages built for Amazon Linux - #11774
Open
luiacuaniello wants to merge 1 commit into
Open
luiacuaniello wants to merge 1 commit into
luiacuaniello wants to merge 1 commit into
Conversation
luiacuaniello
requested review from
DmitriyLewen and
knqyf263
as code owners
November 27, 2026 14:44
Corretto RPMs built for Amazon Linux have the vendor "Amazon", which doesn't match osVendors, so they were classified as third-party and skipped even though ALAS covers them. Treat packages with "amzn" in the release and an empty or "Amazon" vendor as official, and bump the rpm analyzer version so that cached layers are analyzed again.
luiacuaniello
force-pushed
the
fix/rpm-amazon-corretto-vendor
branch
from
November 27, 2026 14:46
1efab62 to
26cc507
Compare
This branch has not been deployed
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.
Description
Fixes the problem reported in #11773: the Corretto RPMs built for Amazon Linux have
Vendor: Amazon, which doesn't matchAmazon LinuxorAmazon.cominosVendors. Trivy classified them as third-party and dropped them before detection, so none of their ALAS advisories were reported.packageProvidedByVendoralready treats a package with no vendor andamznin the release as official (#5887). I extended the same check to theAmazonvendor. The discussion suggests not relying on theamznrelease alone, and this change doesn't: a package needs both theAmazonvendor andamznin the release. Corretto's generic RPMs don't haveamznin the release (amazoncorretto:21-al2has21.0.12.12-1), so they're still third-party.I also bumped the rpm analyzer version to 5. Without that, layers already in the cache keep the old third-party class.
Before, on
amazoncorretto:21.0.12-al2023:After:
The 224 new findings are in the four Corretto packages, 56 CVEs in total, including CVE-2026-114938, which ALAS fixes in
1:21.0.13.1.2-1.amzn2023.1.amazoncorretto:21.0.13-al2023, which has the fix, still reports nothing, andamazoncorretto:21.0.12-al2stays at 32. I scanned each image with both builds, the same DB and an empty cache directory.In
Test_rpmPkgAnalyzer_listPkgs, the new case for a Corretto package built for Amazon Linux fails without the change, and a second case checks that the generic RPM stays third-party. golangci-lint v2.14.0 reports no issues.Related issues
Checklist