jeremylong / DependencyCheck

OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
https://owasp.org/www-project-dependency-check/
Apache License 2.0
6.13k stars 1.23k forks source link

False Positive on jenkins.war: LTS versions #3581

Open jeremylong opened 2 years ago

jeremylong commented 2 years ago

False positives exist due to how LTS versions are listed in the NVD. See https://github.com/jeremylong/DependencyCheck/issues/3364#issuecomment-888560473

haugsrud commented 2 years ago

Is there any way to get around this? I assume I have this issue for one of my applications where it lists 380 vulnerabilities all referring to an older Jenkins-version that I am actually running. When I run this project locally I get 0 vulnerabilities, and I guess that comes from me not running Jenkins locally?

image
aikebah commented 2 years ago

Is there any way to get around this? I assume I have this issue for one of my applications where it lists 380 vulnerabilities all referring to an older Jenkins-version that I am actually running. When I run this project locally I get 0 vulnerabilities, and I guess that comes from me not running Jenkins locally?

@haugsrud That's not the item that this issue is about. Your scan shows a false-positive match of some EJB-jar that, with the evidences encountered, is detected (with LOW confidence) as the Jenkins product. So your issue is a regular false-positive. The typical resolution for such a FP is to add a CPE suppression for jenkins to the suppression-filter in your project.

The most likely causes for a different results locally are either

This issue is about the fact that when DependencyCheck scans an actual war-file of Jenkins itself for an LTS version it does not detect the LTS nature of it and flags issues that are not applicable as the LTS version has been patched. Regular Jenkins versions follow major.minor model, LTS versions follow major.minor.lts-revision model, where major.minor is some selected older version of Jenkins.

Within the NVD the Jenkins versions are listed in two patterns for the versions that a CVE applies to

As Dependency-check doesn't currently support the LTS pattern that's used in the NVD it compares the LTS's majorX.minorY.revisionZ to the regular majorA.minorB and flags the LTS as vulnerable.

E.g. for https://nvd.nist.gov/vuln/detail/CVE-2021-21697 DependencyCheck currently flags LTS version 2.303.3 (which contains the patch) as vulnerable because 2.303.3 is not higher than 2.318 - the last of the weekly releases that still contains the vulnerability