Support vulnerability matching against project-level CPEs
Current Behavior
Dependency-Track allows assigning a CPE to a project. However, vulnerabilities defined against that CPE do not appear to be matched to the project itself.
The vulnerability analysis documentation describes matching of components using CPEs and PURLs, but it is unclear whether project-level CPEs participate in vulnerability analysis.
Steps to Reproduce
- Create a project.
- Assign a unique CPE to the project.
- Create an internal vulnerability affecting that CPE.
- Trigger vulnerability analysis.
- Observe that the vulnerability is not associated with the project.
Proposed Behavior
If a project has an assigned CPE, Dependency-Track should be able to match vulnerabilities against that CPE, in the same way component CPEs are used during vulnerability analysis.
This is especially useful for:
- First-party products maintained within Dependency-Track
- Internal vulnerability tracking
- Products that are represented by a project rather than a dedicated component
Additional Context
As a user, the ability to assign a CPE to a project suggests that the CPE represents the identity of the project itself.
If project-level CPEs are intentionally excluded from vulnerability matching, this should be documented clearly. Otherwise, extending vulnerability matching to project CPEs would improve support for first-party products and internally managed vulnerabilities.
Dependency-Track Version
v5.1.0
Checklist
- [x] I have read and understand the contributing guidelines
- [x] I have checked the existing issues for whether this enhancement was already requested
Hi! I'd like to work on this issue, could you please assign it to me?
For context: I'm a university student taking a software maintenance course, where we contribute to real open source projects and our progress is tracked by the instructor, so being assigned helps show I'm actively working on it. Of course, the change should be judged purely on its merits.
I've looked into the v5 analysis pipeline and I think I understand why this
happens: PrepareVulnAnalysisActivity only selects rows from
COMPONENT, so the project's own CPE never reaches the analyzers. And on the
way back, ReconcileVulnAnalysisResultsActivity parses affects.ref as a
component ID, with findings stored in COMPONENTS_VULNERABILITIES /
FINDINGATTRIBUTION, which are keyed by component.
So supporting project CPEs isn't just a matter of adding the project to the BOM. A few directions I can see:
- Include the project as an additional BOM entry (with a distinguishable bomRef), only for analyzers that should see it (e.g. the internal analyzer, so project data isn't sent to external services), and then decide how to persist the match, which is the tricky part given the component-keyed finding tables.
- Introduce project-level findings, which would require schema, API and UI changes.
Is this something you'd like to support, and if so, which direction would you prefer? I'm happy to start with a test reproducing the scenario and go from there. Thanks!
/assign-me
Hi! Could someone please assign this issue to me directly? I need an assigned issue for my university course, otherwise it won't count and I'd have to look for a different one.