feat(html-reporter): show duplicate package versions in HTML report#845
Open
ELHart05 wants to merge 1 commit into
Open
feat(html-reporter): show duplicate package versions in HTML report#845ELHart05 wants to merge 1 commit into
ELHart05 wants to merge 1 commit into
Conversation
When the same vulnerable package is installed at more than one version, the findings table lists each install separately and there is no single place that surfaces the duplication. This adds a "Duplicate package versions" card above the findings table: it groups vulnerable findings by package name, keeps the ones present at two or more versions, and shows each version with its severity and where it comes from (a direct dependency, or the parent it is pulled in through). The card is computed at render time from the findings already in the report, so there is no scan-logic change and report.json keeps its current shape. It is omitted when nothing is installed at multiple versions. Closes OWASP#235
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.
Summary
When the same vulnerable package is installed at more than one version, the findings table lists each install on its own row and nothing ties them together. This adds a "Duplicate package versions" card above the findings table so you can see, in one place, which vulnerable packages exist at multiple versions and where each version comes from.
Why this change
Issue #235: the report had no consolidated view of a vulnerable package that appears at several versions across the tree. That is exactly the case where a single upgrade or an override can collapse several findings at once, but today you have to spot it by scanning the table yourself.
What changed
Validation
npm run build(stricttsc) passes.User-facing impact
Does this change:
Notes
The consolidation is a view over existing finding data, so it does not add a field to report.json; the raw per-version findings are already there. If you would rather also expose a computed duplicates array in report.json for tooling, I am happy to add that as a follow-up.
Closes #235