]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
spdx30_tasks: adapt CVE handling to new cve-check API
authorKamel Bouhara (Schneider Electric) <kamel.bouhara@bootlin.com>
Fri, 7 Nov 2025 13:14:49 +0000 (14:14 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 10 Nov 2025 15:03:45 +0000 (07:03 -0800)
commit55fdeea44ffbecb705f7900bfa85ab88e1191878
tree407e897e8b75a787ccb0e6e1c005a516332c92d0
parent551433c7a1eddf5090c87a243ea104bf091992b0
spdx30_tasks: adapt CVE handling to new cve-check API

Changes to cve-check (see poky commit fb3f440b7d8,
"cve-check: annotate CVEs during analysis") modified the
get_patched_cves() API to return a set of CVE IDs instead of a
dictionary of CVE metadata.

The SPDX 3 backport still expected a dictionary and attempted to call
.items(), leading to:

    AttributeError: 'set' object has no attribute 'items'

This patch updates the SPDX3 code to iterate directly over the CVE IDs
and use `oe.cve_check.decode_cve_status()` to retrieve the mapping,
detail, and description for each CVE. This restores compatibility with
the updated CVE API and matches the behavior of SPDX3 handling on
Walnascar.

A warning is logged if a CVE has missing or unknown status.

Signed-off-by: Kamel Bouhara (Schneider Electric) <kamel.bouhara@bootlin.com>
meta/lib/oe/spdx30_tasks.py