Open ThomGeG opened 2 years ago
I've done some searching through the issues in DependencyCheck and found when this behavior seems to have been added and why; https://github.com/jeremylong/DependencyCheck/issues/4527
Looks like back in May Sonatype made some changes that weren't compatible with DependencyCheck, so to give them time to address it a temporary filter was applied to omit the offending entries when the requests were coming from DependencyCheck.
I'll post a question there as to what the plan was to remove the filtering, as it's still in place despite DependencyCheck having been updated.
Apologies, as this is almost certainly the wrong place to be raising this but I didn't find anywhere more appropriate.
I'm currently using the lovely DependencyCheck plugin in a number of projects of mine and have noticed a discrepancy in reported vulnerabilities for at least one dependency depending on the user-agent used to make the request.
javax.mail:mail:1.5.0-b01 has 1 reported vulnerability, sonatype-2017-0492. When you use the below curl to grab any/all vulnerabilities, you'll receive it no problem.
However if you add a user-agent starting with "dependency-check" then the response will no longer include the previously found vulnerability.
I've had a glance through the source code here in the hopes there's some piece of documentation that explains why the API server itself is being influenced in this manner by the user-agent but I haven't seen anything. My best guess is something around wanting to avoid reporting duplicate vulnerabilities for DependencyCheck since it's also going to search the NVD for them back when support for OSS was first added. In this case however, the vulnerability in question doesn't appear in the NVD.
Is anybody with access to the source for the API server or just a better background with this able to elaborate on the behavior? It's got me concerned there may be a small treasure trove of more reported vulnerabilities in the OSS Index I'm not seeing because I use DependencyCheck.
Cheers