DependencyTrack / DependencyTrack/dependency-track
Scan import overwriting user-specified data (eg licences)
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Issue Type: Defect
### Current Behavior:
When a project is created in Dependency-Track v3.3.1 and a CycloneDX BOM is uploaded, then the project will be populated with components and the components will have licenses assigned where the BOM provides such info.
When a fresh BOM is uploaded then Dependency-Track is overwriting all existing license information. Specifically:
- Components where the license had been unknown and I had performed research and manually assigned a license. After the fresh import, the license in DT is now "unknown" again if that is what is in the new BOM.
- Variant: components where the license had been displayed as text (no link) and I had performed research to double-check and manually assigned a license (ie, license now has link). After the fresh import, the license in DT is now reverted from link to text.
- Variant: not a problem. components where the license had **not** been included in the cyclonedx-maven-plugin v1.2.0 BOM and then included in the v1.3.0 BOM (the version which now "...takes into consideration the entire inheritance tree of every single direct and transitive dependency") does result in the updating of the license in DT (displaying as text).
### Steps to Reproduce (if defect):
1. Create a project manually
2. Generate a BOM using cyclonedx-maven-plugin v1.2.0
3. Generate a BOM using cyclonedx-maven-plugin v1.3.0
4. Compare the two BOM to ensure that license count increases between 1.2.0 and 1.3.0 BOMs (even if the increase is just 1 or 2).
5. Upload the cyclonedx-maven-plugin v1.2.0 BOM.
6. Within DT, assign a couple of licences where DT is displaying "-"
7. Within DT, assign a couple of licenses where DT is displaying text (eg such that "The Apache Software License, Version 2.0" becomes "Apache-2.0" (with link)).
8. Upload the cyclonedx-maven-plugin v1.3.0 BOM.
9. Check what has happened to licenses tweaked in steps 6 and 7.
### Expected Behavior:
BOM processing should not overwrite licenses where "license" has been transformed to "resolvedLicense", at least not using current system that does not yet have formal audit process.
Contributor guide
Assessment
This issue has not been assessed yet.