Skip to content

SBOM - Add the namespace, pref and qualifiers to the purl#18993

Open
ErniGH wants to merge 4 commits into
conan-io:develop2from
ErniGH:erni/pref-and-qualifiers-in-purl
Open

SBOM - Add the namespace, pref and qualifiers to the purl#18993
ErniGH wants to merge 4 commits into
conan-io:develop2from
ErniGH:erni/pref-and-qualifiers-in-purl

Conversation

@ErniGH

@ErniGH ErniGH commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Changelog: Fix: Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX

Add the pref and qualifiers to the purl
Add namespace support to the purl

close: #18971
close: #19246

blocked by: package-url/purl-spec#705

Comment thread conan/tools/sbom/cyclonedx.py Outdated
if hasattr(component, "conanfile"):
purl_qualifier = "".join(f"&{qualifier}={component.conanfile.settings.get_safe(qualifier)}" for qualifier in qualifiers)
return (f"pkg:conan/{component.name}@{component.ref.version}"
f"?rref={component.ref.revision}&pref={component.pref.package_id}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have discussed that this should be rrev, but we have decided to do that in a different PR

Comment thread test/functional/sbom/test_cyclonedx.py Outdated
Co-authored-by: Abril Rincón Blanco <5364255+AbrilRBS@users.noreply.github.com>
@ErniGH ErniGH marked this pull request as ready for review October 2, 2025 10:15
@memsharded

Copy link
Copy Markdown
Member

There is a ticket in the purl-spec org to check with the experts there: package-url/purl-spec#705

@ErniGH ErniGH changed the title SBOM - Add the pref and qualifiers to the purl SBOM - Add the namespace, pref and qualifiers to the purl Nov 17, 2025
@ErniGH ErniGH added this to the 2.X milestone Mar 23, 2026
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.

[feature] Set component's group/namespace in SBOM [question] SBOM Optional PURL fields

3 participants