From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/3] python3-sbom-cve-check: fix the version attribute in the Yocto-style JSON
Date: Thu, 9 Apr 2026 17:26:21 +0100 [thread overview]
Message-ID: <20260409162622.3307731-2-ross.burton@arm.com> (raw)
In-Reply-To: <20260409162622.3307731-1-ross.burton@arm.com>
The type of the version was an integer, but it should be a string.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
...-correct-type-for-the-version-attrib.patch | 31 +++++++++++++++++++
.../python3-sbom-cve-check_1.2.0.bb | 2 ++
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-devtools/sbom-cve-check/files/0001-export_yocto-use-correct-type-for-the-version-attrib.patch
diff --git a/meta/recipes-devtools/sbom-cve-check/files/0001-export_yocto-use-correct-type-for-the-version-attrib.patch b/meta/recipes-devtools/sbom-cve-check/files/0001-export_yocto-use-correct-type-for-the-version-attrib.patch
new file mode 100644
index 00000000000..392f0b99ea7
--- /dev/null
+++ b/meta/recipes-devtools/sbom-cve-check/files/0001-export_yocto-use-correct-type-for-the-version-attrib.patch
@@ -0,0 +1,31 @@
+From 1a5ae49c520d3569ed12f0c6373b4223d428f92b Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Thu, 9 Apr 2026 11:55:19 +0100
+Subject: [PATCH] export_yocto: use correct type for the version attribute
+
+This should be a string, not an integer:
+
+https://git.openembedded.org/openembedded-core/tree/meta/classes/cve-check.bbclass?h=yocto-5.2.4#n235
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ src/sbom_cve_check/export/export_yocto.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sbom_cve_check/export/export_yocto.py b/src/sbom_cve_check/export/export_yocto.py
+index c8261f4..78d72c0 100644
+--- a/src/sbom_cve_check/export/export_yocto.py
++++ b/src/sbom_cve_check/export/export_yocto.py
+@@ -172,7 +172,7 @@ class YoctoCveCheckExport(BaseExport):
+ :return: Generator context.
+ """
+ yield
+- json_obj = {"version": 1, "package": self._packages}
++ json_obj = {"version": "1", "package": self._packages}
+ with self._open_output_as_text() as f:
+ json.dump(json_obj, f, indent=2)
+
+--
+2.43.0
+
diff --git a/meta/recipes-devtools/sbom-cve-check/python3-sbom-cve-check_1.2.0.bb b/meta/recipes-devtools/sbom-cve-check/python3-sbom-cve-check_1.2.0.bb
index 070e8789713..2a09d8ea4c3 100644
--- a/meta/recipes-devtools/sbom-cve-check/python3-sbom-cve-check_1.2.0.bb
+++ b/meta/recipes-devtools/sbom-cve-check/python3-sbom-cve-check_1.2.0.bb
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=570a9b3749dd0463a1778803b12a6dce"
PYPI_PACKAGE = "sbom_cve_check"
SRC_URI[sha256sum] = "0b01474c541fb4b9d29d36f86fae6d0f27ff2b991fcb59b2fbeb70c1eaa09664"
+SRC_URI += "file://0001-export_yocto-use-correct-type-for-the-version-attrib.patch"
+
inherit pypi python_hatchling
RDEPENDS:${PN} += " \
--
2.43.0
next prev parent reply other threads:[~2026-04-09 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 16:26 [PATCH 1/3] python3-sbom-cve-check: move from devtools/python to devtools/sbom-cve-check Ross Burton
2026-04-09 16:26 ` Ross Burton [this message]
2026-04-09 16:26 ` [PATCH 3/3] classes/sbom-cve-check: add variable to control the scope of the CVE scan Ross Burton
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=20260409162622.3307731-2-ross.burton@arm.com \
--to=ross.burton@arm.com \
--cc=openembedded-core@lists.openembedded.org \
/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