From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [OE-core][PATCH] lib: spdx30_tasks: Handle patched CVEs
Date: Thu, 6 Mar 2025 14:20:07 -0700 [thread overview]
Message-ID: <20250306212007.44880-1-JPEWhacker@gmail.com> (raw)
The code to iterate over patched CVEs (e.g. those patched by a .patch
file in SRC_URI) was accidentally omitted when writing the SPDX 3
handling. Add it in now
[YOCTO #15789]
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/lib/oe/spdx30_tasks.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index e3e5dbc7427..e20bb0c86f3 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -498,6 +498,16 @@ def create_spdx(d):
# Add CVEs
cve_by_status = {}
if include_vex != "none":
+ for cve in oe.cve_check.get_patched_cves(d):
+ spdx_cve = build_objset.new_cve_vuln(cve)
+ build_objset.set_element_alias(spdx_cve)
+
+ cve_by_status.setdefault("Patched", {})[cve] = (
+ spdx_cve,
+ "patched",
+ "",
+ )
+
for cve in d.getVarFlags("CVE_STATUS") or {}:
decoded_status = oe.cve_check.decode_cve_status(d, cve)
--
2.47.1
next reply other threads:[~2025-03-06 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 21:20 Joshua Watt [this message]
2025-03-11 13:01 ` [OE-core][PATCH] lib: spdx30_tasks: Handle patched CVEs Richard Purdie
2025-03-11 13:17 ` Joshua Watt
2025-03-11 13:46 ` Mikko Rapeli
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=20250306212007.44880-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.