Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scan): CPE matching for OpenJDK packages #583

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

luhring
Copy link
Contributor

@luhring luhring commented Jan 28, 2024

Syft and Grype don't seem to be handling OpenJDK properly, such that we miss valid vulnerability matches (i.e. false negatives) in our openjdk-* APKs when using Syft and Grype in wolfictl to scan the APK.

This PR implements a potentially viable workaround that lets us discover these vulnerabilities after all.

Before

$ wolfictl scan --disable-sbom-cache =(curl -sS https://packages.wolfi.dev/os/aarch64/openjdk-21-21.0.1-r0.apk)
🔎 Scanning "/tmp/zshp5wsUm"
✅ No vulnerabilities found

After

$ wolfictl scan --disable-sbom-cache =(curl -sS https://packages.wolfi.dev/os/aarch64/openjdk-21-21.0.1-r0.apk)
🔎 Scanning "/tmp/zshryD2h3"
└── 📄 /.PKGINFO
        📦 openjdk-21 21.0.1-r0 (apk)
            High CVE-2024-20918
            Medium CVE-2024-20926
            High CVE-2024-20952

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
@luhring luhring marked this pull request as ready for review January 29, 2024 01:03
@luhring luhring requested a review from pdeslaur January 29, 2024 01:04
@luhring luhring merged commit 9d776ba into wolfi-dev:main Jan 29, 2024
3 checks passed
@luhring luhring deleted the i-spy-openjdk branch January 29, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants