Skip to content

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

Open
dikshaa2909 wants to merge 1 commit intoaboutcode-org:mainfrom
dikshaa2909:fix/spdx-purl-resolution
Open

Improve SPDX import by generating generic PURLs when missing and marking inferred identity#2075
dikshaa2909 wants to merge 1 commit intoaboutcode-org:mainfrom
dikshaa2909:fix/spdx-purl-resolution

Conversation

@dikshaa2909
Copy link

Issues

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

  • I have read the contributing guidelines
  • I have linked an existing issue above
  • I have added unit tests covering the new code
  • I have reviewed and understood every line of this PR

@dikshaa2909 dikshaa2909 force-pushed the fix/spdx-purl-resolution branch 3 times, most recently from 027762e to 6abf6ae Compare March 3, 2026 15:45
…inferred identity metadata

Signed-off-by: dikshaa2909 <dikshadeware@gmail.com>
@dikshaa2909 dikshaa2909 force-pushed the fix/spdx-purl-resolution branch from 6abf6ae to 66546f9 Compare March 3, 2026 15:51
@dikshaa2909
Copy link
Author

Hi @pombredanne @tdruez can u pls review !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve SPDX import from Python SBOMs

1 participant