From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Ladislav Michl <oss-lists@triops.cz>
Subject: Re: [ptxdist] [APPLIED] report/sbom.py: raise exception on purl version mismatch
Date: Fri, 13 Nov 2026 09:38:35 +0100 [thread overview]
Message-ID: <20261113083835.1377716-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <atNKDS4Lmga2JbRk@lenoch>
Thanks, applied as 12c21a655e44f75cba3e205569d488f75e7928c0.
Michael
[sent from post-receive hook]
On Fri, 13 Nov 2026 09:38:35 +0100, Ladislav Michl <oss-lists@triops.cz> wrote:
> The ReportException for a PyPI source URL whose version does not match
> the package version is silently ignored, so a purl with the wrong version
> ends up in the SBoM.
>
> Signed-off-by: Ladislav Michl <ladis@triops.cz>
> Message-Id: <atNKDS4Lmga2JbRk@lenoch>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/scripts/report/sbom.py b/scripts/report/sbom.py
> index 1eb5763e8e5b..95a91c876a90 100644
> --- a/scripts/report/sbom.py
> +++ b/scripts/report/sbom.py
> @@ -36,7 +36,7 @@ class SbomGenerator(Generator):
> for url in pkg.get("url", []):
> if m := self.PYPI_RELEASE.match(url):
> if m.group(2) != pkg["version"]:
> - ReportException(
> + raise ReportException(
> f"{pkg['name']}: version mismatch: pkg: {pkg['version']} url: {m.group(2)}"
> )
> purls.append(f"pkg:pypi/{m.group(1)}@{m.group(2)}")
prev parent reply other threads:[~2026-11-13 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 10:12 [ptxdist] [PATCH] " Ladislav Michl
2026-11-13 8:38 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113083835.1377716-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=oss-lists@triops.cz \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox