scancode.io icon indicating copy to clipboard operation
scancode.io copied to clipboard

Improve SPDX import by generating generic PURLs when missing and marking inferred identity

Open dikshaa2909 opened this issue 9 months ago • 2 comments

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:generic PURLs using SPDX name and version when missing.
  • Add extra_data.identity metadata 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

dikshaa2909 avatar Mar 03 '26 14:03 dikshaa2909

Hi @pombredanne @tdruez can u pls review !

dikshaa2909 avatar Mar 04 '26 09:03 dikshaa2909

Hi @tdruez @pombredanne can u pls review it when u have time ! Thanks !

dikshaa2909 avatar Mar 09 '26 06:03 dikshaa2909