dependency-check / dependency-check/DependencyCheck

Tags are not all shown in the references section of reports (v9.0.0 onwards)

Open
#6,234 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
7.7k
Forks
1.4k
Avg merge
9d 22h
Merged PRs (30d)
13

Description

**Is your feature request related to a problem? Please describe.**
With dependency-check-maven version 9.x the reference name in the reports is not pulling from the tags instead of the refspec which was available in the nvd definitions in json format. However looking at the code it seems that the logic only picks the first item in a sorted list as seen [here](https://github.com/jeremylong/DependencyCheck/blob/main/core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveDB.java#L1232), which means that a reference which may have more than one tag only shows one in the dependency check report. Honestly not sure whether this is a feature request or a bug but since it's only been introduced in v9 quite recently maybe it can be amended slightly without too much effort.

**Describe the solution you'd like**
While having the report show a list of all tags in a tags field would be ideal in my opinion, perhaps a quick simple solution here would be to list them all in a comma separated format in the name field. programmatically one can easily split by comma and get all tags for that reference. I made the necessary code change [here](https://github.com/clayton-piscopo/DependencyCheck/commit/4238c7a3b03383d106af3e24f2d17a33fd92b6a0) and can open a PR if this is to your satisfaction.

**Additional context**
One needs to keep in mind that with my suggestion, the DB needs to be rebuilt since anything already added will keep it's current format/value. Also while I don't mind the formatting in json or xml files, I'm not really fond of how it looks in html reports, so maybe some formatting on the html report is needed, maybe on a template level:

JSON Report:
![image](https://github.com/jeremylong/DependencyCheck/assets/17902323/525a9417-b0d0-4cef-9a00-1c93c84a0740)

HTML Report:
![image](https://github.com/jeremylong/DependencyCheck/assets/17902323/d81f5010-fd19-494d-a4f0-25e5b15884a6)

Contributor guide

Open the contributing guide

Research direction

Start at core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveDB.java around line 1232, where the sorted references list selects one item. Compare the JSON, XML, and HTML report output shown in the issue, and check how existing database records are rebuilt. Done means all tags for a reference are retained and displayed acceptably across the affected report formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.