Fix false positives in Java dependencies#328
Open
vgaidarji wants to merge 1 commit intoneuvector:mainfrom
Open
Fix false positives in Java dependencies#328vgaidarji wants to merge 1 commit intoneuvector:mainfrom
vgaidarji wants to merge 1 commit intoneuvector:mainfrom
Conversation
See neuvector/neuvector#2205 for more details.
Author
|
@williamlin-suse hi. would you mind reviewing proposed fix? CI is currently also blocked until you formally approve, not sure if CI even passes. Thank you. |
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 has been done
Fixed false positives in Java dependencies caused by jar: shortcut logic
See neuvector/neuvector#2205 for more details.
How to test
Build scanner with the fix from PR.
Run scanner against dockerized demo Java project https://github.com/vgaidarji/demo-java-service-neuvector-issue/blob/main/README.md#how-to-reproduce-the-issue-locally.
Confirm no false positives are reported. False positives can be found in https://github.com/vgaidarji/demo-java-service-neuvector-issue/blob/main/neuvector-scanner-patch/neuvector-scan-report.md#jar-level-vulnerabilities-all-false-positives
False Positive example:
jar:common-- 4 JARs flaggedopentelemetry-common-1.59.0.jario.opentelemetry:opentelemetry-commonjar:commonopentelemetry-exporter-common-1.59.0.jario.opentelemetry:opentelemetry-exporter-commonjar:commonopentelemetry-exporter-otlp-common-1.59.0.jario.opentelemetry:opentelemetry-exporter-otlp-commonjar:commonopentelemetry-sdk-common-1.59.0.jario.opentelemetry:opentelemetry-sdk-commonjar:commonCVEs incorrectly matched:
Why it's false: These OpenTelemetry JARs lack
pom.properties. The scanner falls back to MANIFEST.MF, extracts the genericImplementation-Title"common", defaults the vendor to "jar", producing the lookup keyjar:common. This collides with the CVE database shortcut keyjar:commongenerated from a completely unrelated DataEase artifact.