DependencyTrack / DependencyTrack/dependency-track
Allow overriding existing vulnerability severity with Trivy-reported severity
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
In the current implementation of the Trivy analyser integration:
When Trivy reports a vulnerability, we:
1. Check if the reported `vulnId` exists in Dependency-Track's database.
2. If it exists:
* Check if it's already associated with a component.
* If yes, no further action is taken.
* If no, a `FindingAnalysis` is created for that component.
* **Severity and other metadata of the vulnerability are not updated.**
3. If it does not exist:
* A new vulnerability is created in the DB, and the **severity reported by Trivy is stored**.
### Proposed Behavior
* A new flag in the UI under:
`Administration → Analyzer → Trivy`
Labelled as **"Ignore severity reported by Trivy scan"**
* This flag will be enabled by default (i.e., severity is ignored).
* When disabled, the analyser **overwrites the existing severity of a vulnerability** with the value reported by Trivy.
This enhancement helps in scenarios where teams want to rely on the upstream scanner-provided severity to stay in sync with upstream vulnerability databases.
However, I want to ensure this is a direction aligned with the project’s architecture and expectations. I'd appreciate feedback on the following points:
1. **Is overriding stored severity a valid design in DTrack’s context?**
* What are the implications for downstream systems or consumers of vulnerability data?
2. **Are there known side effects or conflicts with tasks like NDV mirroring?**
3. **Would a better architectural approach be to track multiple severity sources?**
I have created two PRs to support the enhancement where the severity reported by Trivy can optionally be used to **override existing vulnerability severity**.
**Related PRs:**
* \[[Frontend PR link](https://github.com/DependencyTrack/frontend/pull/1268)]
* \[[Backend PR link](https://github.com/DependencyTrack/dependency-track/pull/5026)]
Looking forward to the community's feedback on this approach and any suggestions for improvement!
### Checklist
- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this enhancement was already requested
Contributor guide
Assessment
This issue has not been assessed yet.