dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

Use cpe and/or purl from cyclonedx metadata.component to set project cpe and/or purl.

Open savek-cc opened this issue 10 months ago • 1 comments

Current Behavior

When importing an SBOM that defines a CPE and/or PURL for the metadata.component, these fields are not populated for the project created. Other properties of the metadata.component have been fixed in the past, see e.g. https://github.com/DependencyTrack/dependency-track/pull/3179

Steps to Reproduce

  1. Import an SBOM with a metadata.component.cpe entry
  2. Review the project information - it's missing the data for the CPE field.

Expected Behavior

Imported project also populates CPE and PURL fields if present in the metadata.component.cpe/purl

Dependency-Track Version

4.10.0

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

savek-cc avatar Apr 25 '24 08:04 savek-cc

Already addressed in BomUploadProcessingTaskV2 which ships with DT v4.11:

https://github.com/DependencyTrack/dependency-track/blob/3efdd24570f16fc6bfb168795e66227cb8fece78/src/main/java/org/dependencytrack/tasks/BomUploadProcessingTaskV2.java#L339-L355

But not in the legacy BomUploadProcessingTask:

https://github.com/DependencyTrack/dependency-track/blob/3efdd24570f16fc6bfb168795e66227cb8fece78/src/main/java/org/dependencytrack/tasks/BomUploadProcessingTask.java#L115-L155

nscuro avatar Apr 25 '24 08:04 nscuro

Legacy BomUploadprocessingTask was dropped for v4.12. No further change necessary.

nscuro avatar Sep 16 '24 20:09 nscuro