summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-29 11:51:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-07 11:53:26 +0100
commitcd12e92aabb35b9db5167eb1049c937177ab45c8 (patch)
treea37599b59f2e5df9e12f65f379a5bef86a97ad4a /meta/classes
parent5ab5cedbc553a5bae6f0e00ab826b5655b8bc1a0 (diff)
downloadpoky-cd12e92aabb35b9db5167eb1049c937177ab45c8.tar.gz
cve-check: Allow warnings to be disabled
When running CVE checks in CI we're usually not interested in warnings on the console for any CVEs present. Add a configuration option CVE_CHECK_SHOW_WARNINGS to allow this to be disabled (it is left enabled by default). (From OE-Core rev: 8fd6a9f521ea6b1e10c80fe33968943db30991ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1054d3366ba528f2ad52585cf951e508958c5c68) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/cve-check.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 3bb924ba34..c80a365819 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -48,6 +48,7 @@ CVE_CHECK_COPY_FILES ??= "1"
48CVE_CHECK_CREATE_MANIFEST ??= "1" 48CVE_CHECK_CREATE_MANIFEST ??= "1"
49 49
50CVE_CHECK_REPORT_PATCHED ??= "1" 50CVE_CHECK_REPORT_PATCHED ??= "1"
51CVE_CHECK_SHOW_WARNINGS ??= "1"
51 52
52# Provide text output 53# Provide text output
53CVE_CHECK_FORMAT_TEXT ??= "1" 54CVE_CHECK_FORMAT_TEXT ??= "1"
@@ -436,7 +437,7 @@ def cve_write_data_text(d, patched, unpatched, ignored, cve_data):
436 write_string += "VECTOR: %s\n" % cve_data[cve]["vector"] 437 write_string += "VECTOR: %s\n" % cve_data[cve]["vector"]
437 write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve) 438 write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
438 439
439 if unpatched_cves: 440 if unpatched_cves and d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
440 bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file)) 441 bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file))
441 442
442 if write_string: 443 if write_string: