You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sbom): build purls with packageurl-python and add upstream source identification
Use the packageurl-python library to construct purls instead of manual
string building. Introduce a PurlConfig model that consolidates all
purl-related per-package settings into a single field. When set to a
string, it is used as the full downstream purl. When set to a PurlConfig
object, individual fields (type, namespace, name, version,
repository_url, upstream) override specific purl components
while defaulting the rest from global SbomSettings.
Add upstream source identification to the SBOM. Each document now
contains two package entries linked by a GENERATED_FROM relationship:
- SPDXRef-wheel: the downstream wheel with repository_url qualifier
- SPDXRef-upstream: the original source package without qualifiers
The upstream purl is auto-derived by stripping repository_url from the
downstream purl. For packages sourced from GitHub/GitLab, an explicit
upstream purl can be set via PurlConfig.upstream.
Add repository_url to SbomSettings as a global purl qualifier
(e.g. ?repository_url=https://packages.redhat.com) added to every
downstream purl. Per-package PurlConfig.repository_url overrides it.
Refactored tests to use static test data for both global and
per-package settings files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Martin Prpič <mprpic@redhat.com>
0 commit comments