]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cve-check: Allow warnings to be disabled
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 29 May 2022 10:51:59 +0000 (11:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 29 May 2022 22:57:58 +0000 (23:57 +0100)
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).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cve-check.bbclass

index 3bb924ba344691f10bab11b86d5027b0ee92f85e..c80a3658195ea021392abb36ae2c96af17ecc46b 100644 (file)
@@ -48,6 +48,7 @@ CVE_CHECK_COPY_FILES ??= "1"
 CVE_CHECK_CREATE_MANIFEST ??= "1"
 
 CVE_CHECK_REPORT_PATCHED ??= "1"
+CVE_CHECK_SHOW_WARNINGS ??= "1"
 
 # Provide text output
 CVE_CHECK_FORMAT_TEXT ??= "1"
@@ -436,7 +437,7 @@ def cve_write_data_text(d, patched, unpatched, ignored, cve_data):
         write_string += "VECTOR: %s\n" % cve_data[cve]["vector"]
         write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
 
-    if unpatched_cves:
+    if unpatched_cves and d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
         bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file))
 
     if write_string: