From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <rybczynska@gmail.com>, <steve@sakoman.com>,
<Peter.Marko@siemens.com>, <ross.burton@arm.com>,
<skandigraun@gmail.com>,
Daniel Turull <daniel.turull@ericsson.com>,
Peter Marko <peter.marko@siemens.com>
Subject: [PATCH v2 4/6] cve-check: move message outsite check_cves and sort
Date: Mon, 28 Apr 2025 15:42:03 +0200 [thread overview]
Message-ID: <20250428134205.900354-5-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20250428134205.900354-1-daniel.turull@ericsson.com>
From: Daniel Turull <daniel.turull@ericsson.com>
When adding corrections from multiple sources of CVEs, the
message showing standing CVES should be at the end. Also sort them.
CC: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
meta/classes/cve-check.bbclass | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 86ddfaae5f..12159a98d2 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -173,6 +173,12 @@ python do_cve_check () {
if len(cve_data) or (d.getVar("CVE_CHECK_COVERAGE") == "1" and status):
get_cve_info(d, cve_data)
cve_write_data(d, cve_data, status)
+
+ if d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
+ unpatched_cves = [cve for cve in cve_data if cve_data[cve]["abbrev-status"] == "Unpatched"]
+ if unpatched_cves:
+ bb.warn("Found unpatched CVE (%s)" % " ".join(sorted(unpatched_cves)))
+
else:
bb.note("No CVE database found, skipping CVE check")
@@ -422,10 +428,6 @@ def check_cves(d, cve_data):
if not cves_in_recipe:
bb.note("No CVE records for products in recipe %s" % (pn))
- if d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
- unpatched_cves = [cve for cve in cve_data if cve_data[cve]["abbrev-status"] == "Unpatched"]
- if unpatched_cves:
- bb.warn("Found unpatched CVE (%s)" % " ".join(unpatched_cves))
return (cve_data, cves_status)
next prev parent reply other threads:[~2025-04-28 13:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 13:41 [PATCH v2 0/6] Check compiled files to filter kernel CVEs daniel.turull
2025-04-28 13:42 ` [PATCH v2 1/6] linux-vulns: fetch kernel.org CNA info daniel.turull
2025-04-28 13:42 ` [PATCH v2 2/6] cve-check: fix debug message daniel.turull
2025-04-28 13:42 ` [PATCH v2 3/6] kernel: add support to extract compiled files daniel.turull
2025-04-28 14:24 ` [OE-core] " Bruce Ashfield
2025-04-28 14:28 ` Daniel Turull
2025-04-28 13:42 ` daniel.turull [this message]
2025-04-28 13:42 ` [PATCH v2 5/6] cve-check, vex, spdx: use metadata from linux-vulns to enhance CVE reporting daniel.turull
2025-04-28 13:42 ` [PATCH v2 6/6] spdx: add option to include only compiled kernel files daniel.turull
2025-04-28 13:57 ` Joshua Watt
2025-04-28 13:59 ` Marko, Peter
2025-04-28 14:12 ` Daniel Turull
2025-04-28 14:44 ` Joshua Watt
2025-04-28 14:25 ` Daniel Turull
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=20250428134205.900354-5-daniel.turull@ericsson.com \
--to=daniel.turull@ericsson.com \
--cc=Peter.Marko@siemens.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.com \
--cc=rybczynska@gmail.com \
--cc=skandigraun@gmail.com \
--cc=steve@sakoman.com \
/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