From: Alexander Dahl via ptxdist <ptxdist@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>, Ralf Glaser <glaser@iotmaxx.de>,
Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [ptxdist] [PATCH 2/3] report: spdx_sbom: Fix externalPackageRef type in category SECURITY
Date: Mon, 14 Sep 2026 13:23:10 +0200 [thread overview]
Message-ID: <20260914112311.93693-3-ada@thorsis.com> (raw)
In-Reply-To: <20260914112311.93693-1-ada@thorsis.com>
pyspdxtools -i image-root-tgz-spdx-sbom.json gives the following error:
externalPackageRef type in category SECURITY must be one of ['cpe22Type', 'cpe23Type', 'advisory', 'fix', 'url', 'swid'], but is: http://spdx.org/rdf/references/cpe23Type
Could not find any location in spec which requires that URL in the
referenceType field.
Link: https://spdx.github.io/spdx-spec/v2.3/package-information/#721-external-reference-field
Link: https://spdx.github.io/spdx-spec/v2.3/external-repository-identifiers/#f2-security
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
scripts/report/spdx_sbom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/report/spdx_sbom.py b/scripts/report/spdx_sbom.py
index f39b37487..7c4f1c6bb 100644
--- a/scripts/report/spdx_sbom.py
+++ b/scripts/report/spdx_sbom.py
@@ -121,7 +121,7 @@ class SpdxSbomGenerator(SbomGenerator):
for cpe_id in self.create_cpe_ids(pkg):
cpe = spdx.SPDXExternalReference()
cpe.referenceCategory = "SECURITY"
- cpe.referenceType = "http://spdx.org/rdf/references/cpe23Type"
+ cpe.referenceType = "cpe23Type"
cpe.referenceLocator = cpe_id
spdx_pkg.externalRefs.append(cpe)
--
2.47.3
next prev parent reply other threads:[~2026-09-14 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 11:23 [ptxdist] [PATCH 0/3] report: spdx_sbom: Assorted minor improvements Alexander Dahl via ptxdist
2026-09-14 11:23 ` [ptxdist] [PATCH 1/3] report: spdx_sbom: Fixed "created" field format Alexander Dahl via ptxdist
2026-09-14 11:23 ` Alexander Dahl via ptxdist [this message]
2026-09-14 11:23 ` [ptxdist] [PATCH 3/3] report: spdx_sbom: Convert pkg_name into valid idstring Alexander Dahl via ptxdist
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=20260914112311.93693-3-ada@thorsis.com \
--to=ptxdist@pengutronix.de \
--cc=ada@thorsis.com \
--cc=glaser@iotmaxx.de \
--cc=m.olbrich@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