From: Simone Weiß Date: Sat, 24 Feb 2024 08:18:38 +0000 (+0000) Subject: cve-check: Log if CVE_STATUS set but not reported for component X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1b3c3856c2bdf2d9d6dfbaccfce549396a8630a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cve-check: Log if CVE_STATUS set but not reported for component Log if the CVE_STATUS is set for a CVE, but the cve is not reported for a component. This should hopefully help to clean up not needed CVE_STATUS settings. Signed-off-by: Simone Weiß Signed-off-by: Richard Purdie (cherry picked from commit 013d531a84fa08b6ae8a47bdf3ba1fa8f18ba270) Signed-off-by: Steve Sakoman --- diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 5191d043030..56ba8bceefc 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -418,6 +418,9 @@ def check_cves(d, patched_cves): cves_status.append([product, False]) conn.close() + diff_ignore = list(set(cve_ignore) - set(cves_ignored)) + if diff_ignore: + oe.qa.handle_error("cve_status_not_in_db", "Found CVE (%s) with CVE_STATUS set that are not found in database for this component" % " ".join(diff_ignore), d) if not cves_in_recipe: bb.note("No CVE records for products in recipe %s" % (pn))