CycloneDX / cyclonedx-core-java

CycloneDX SBOM Model and Utils for Creating and Validating BOMs
https://cyclonedx.org/
Apache License 2.0
81 stars 61 forks source link

Enhancement: make Vulnerability objects comparable by fields #463

Closed SaberStrat closed 3 months ago

SaberStrat commented 3 months ago

One way to fix https://github.com/DependencyTrack/dependency-track/issues/3834 and make vulnerabilities elements in BOMs and VEXs unique, is to make Vulnerability objects comparable to one another on a fields basis. To get this, we need custom equals and hashCode methods.

This would be part of the fix to the above issue I'm working on in the PR https://github.com/DependencyTrack/dependency-track/pull/3948.