diff options
author | Peter Marko <peter.marko@siemens.com> | 2024-11-24 21:13:41 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-02-12 06:29:33 -0800 |
commit | a1b7ded85a1e4791038ff69115635c01f36b4a74 (patch) | |
tree | 19e6ec19b93d03ab3dd44dbde58fc6163efc7fcd | |
parent | 3ca2b7ea9fc0bd3d82316c40762b26d5aa927cdf (diff) | |
download | poky-a1b7ded85a1e4791038ff69115635c01f36b4a74.tar.gz |
cve-check: restore CVE_CHECK_SHOW_WARNINGS functionality
Commit 05ef4f2a7b225c8d230eaca8d333ffb921729d79 removed this
functionality by accident. It was implemented in text exporter, while it
should have been a global feature independent on exporter type to avoid
such accidental deletion.
(From OE-Core rev: 3cf7c6bcd569cb19ac2b9c05f1134fdda6e9e714)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Cc: Marta Rybczynska <marta.rybczynska@ygreky.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2996b11596afca288a6b7f409a5287063d331f3b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes/cve-check.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 0c92b87f52..33d41b912d 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -422,6 +422,11 @@ def check_cves(d, cve_data): | |||
422 | if not cves_in_recipe: | 422 | if not cves_in_recipe: |
423 | bb.note("No CVE records for products in recipe %s" % (pn)) | 423 | bb.note("No CVE records for products in recipe %s" % (pn)) |
424 | 424 | ||
425 | if d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1": | ||
426 | unpatched_cves = [cve for cve in cve_data if cve_data[cve]["abbrev-status"] == "Unpatched"] | ||
427 | if unpatched_cves: | ||
428 | bb.warn("Found unpatched CVE (%s)" % " ".join(unpatched_cves)) | ||
429 | |||
425 | return (cve_data, cves_status) | 430 | return (cve_data, cves_status) |
426 | 431 | ||
427 | def get_cve_info(d, cve_data): | 432 | def get_cve_info(d, cve_data): |