scancode.io
scancode.io copied to clipboard
Improve SPDX import by generating generic PURLs when missing and marking inferred identity
Issues
- Closes: #1914
Changes
Improve SPDX import in the load_sbom pipeline by generating a deterministic pkg:generic PURL when an SPDX package does not declare a PURL in externalRefs.
- Preserve declared PURLs unchanged.
- Generate
pkg:genericPURLs using SPDXnameandversionwhen missing. - Add
extra_data.identitymetadata only for inferred cases. - Add unit test coverage for inferred behavior.
This improves package typing for SPDX-based SBOM imports while keeping declared data and existing behavior intact.
Checklist
- [x] I have read the contributing guidelines
- [x] I have linked an existing issue above
- [x] I have added unit tests covering the new code
- [x] I have reviewed and understood every line of this PR
Hi @pombredanne @tdruez can u pls review !
Hi @tdruez @pombredanne can u pls review it when u have time ! Thanks !