fix(dependency_check): fold related dependency paths into description instead of emitting separate findings#14941
Open
valentijnscholten wants to merge 1 commit into
Conversation
Dependency-Check's DependencyBundlingAnalyzer merges co-grouped artifacts into one main dependency and lists the others under <relatedDependencies>. The vulnerability is attached only to the main dependency in the XML; related entries are metadata for other files in the same logical component. Previously the parser emitted one finding per related entry in addition to the main finding. This multiplied a single CVE into N findings sharing the same title, CVE, component name, and version — only the file path differed. Projects with Spring Boot, ActiveMQ, or other libraries whose CPE matches many sibling artifacts (DC bundling scenario 4) were hit hardest. Instead, emit one finding per vulnerability per main dependency and surface related file paths in the description under a "**Related Filepaths:**" block. The five DependencyBundlingAnalyzer bundling scenarios are documented in the new build_related_dependencies_block() helper, the parser docs page, and the 2.59.1 upgrade notes. Closes-style note: findings previously tagged `related` will be closed on the next reimport as they are no longer emitted. The `related` tag is not applied.
dogboat
approved these changes
Jun 2, 2026
Jino-T
approved these changes
Jun 2, 2026
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
<relatedDependency>in the report, in addition to the finding for the main vulnerable dependency. Because OWASP Dependency-Check attaches the vulnerability only to the main dependency in the XML and the related entries are metadata pointing to other files in the same logical component, this produced N findings sharing the same title, CVE, component name and component version — only the file path differed. Issues such as duplicated Spring Boot or ActiveMQ findings stem from this.**Related Filepaths:**block) and stops emitting one finding per related entry. Therelatedtag is no longer applied because no separate related findings are created.DependencyBundlingAnalyzerscenarios (hashesMatch,isShadedJar,isWebJar, CPE+base-path+vulns+filename sibling match, NPM same name+version) as a docstring on the new helper in the parser, in the parser documentation page, and in the 2.59.1 upgrade notes.multiple_vulnerabilities_has_multiple_findingsunit test from 11 findings to 9 and adds assertions for the**Related Filepaths:**block on the affected finding.docs/content/releases/os_upgrading/2.59.1.mdwith required-actions guidance (saved filters referencing therelatedtag will need updating; on the next reimport the previously createdrelatedfindings will be closed as no longer present).Background
Dependency-Check's
DependencyBundlingAnalyzer.evaluateDependenciesmerges co-grouped artifacts into a main dependency under five scenarios. Only scenario 1 (hashesMatch) represents the same vulnerable artifact at multiple deploy locations; scenarios 2-5 are different files representing one logical component. The XML attaches the vulnerability only to the main dependency in every case, so emitting per-related-dependency findings inflated a single CVE into N near-duplicates regardless of which scenario produced the bundling.Files
dojo/tools/dependency_check/parser.py— drop the per-related-dependency loop inget_findings; addbuild_related_dependencies_blockhelper; append the block to the main finding's description.unittests/tools/test_dependency_check_parser.py— adjust expected count from 11 to 9; add**Related Filepaths:**assertions on the affected finding; shift remaining item indices.docs/content/supported_tools/parsers/file/dependency_check.md— document the new behavior and the five bundling scenarios.docs/content/releases/os_upgrading/2.59.1.md— upgrade notes for the parser behavior change.