dependency-check / dependency-check/DependencyCheck
Reduce multiplicities in .NET scans
- Dominant language
- Java
- Stars
- 7.7k
- Forks
- 1.4k
- Avg merge
- 9d 22h
- Merged PRs (30d)
- 13
Description
ODC groups libraries by file content (actually by hashes). This works well in Java world.
This is unfortunately not the case in the .NET world. When I resolve libraries using Nuget and perform a scan on it, I usually get many files for one library:
1. The nupkg file.
2. DLLs for multiple .NET versions in the nuget file
3. The same DLLs extracted (Easiest to get rid of, and ODC handles them well, because they are duplicates.)
My goal is to get rid of multiplied items in the reports. I can perform some preprocessing or modify the ODC code. What is the best approach for that? My preferred idea how to implement it:
Don't treat nupkg as a standard ZIP. Files in nupkg archive would be analyzed, but the evidence would be added to the nupkg bundle. This does not skip the extracted DLLs (the #3), but they might be addressed in multiple ways, e.g. by blacklisting hashes of files (maybe just DLLs) found in a nupkg archive or by removing the lib directory before running ODC.
I was also thinking about some special mode that treats a directory as a single item (with some Merkle-tree-based hashing), which should achieve similar results as grouping by nupkg, but this approach would be more complex and more general. While the increased complexity is rather obvious (not only for the Merkle-tree hashing, but mainly for deciding which directories to group), I am not sure if it has any real benefits.
Should I start implementing the nupkg grouping?
Original thread: https://groups.google.com/forum/#!topic/dependency-check/bOsmmCmKfnM
Contributor guide
Assessment
This issue has not been assessed yet.