diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-29 11:51:59 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-04 12:16:59 +0100 |
| commit | 898aedf585443654e859d480d63d5227a1c3713d (patch) | |
| tree | b4c5985c1532da997f6564ca1eb61047e571416b /meta | |
| parent | cc3cefdb43dadb9108bc1929b3a7589f4c97b11e (diff) | |
| download | poky-898aedf585443654e859d480d63d5227a1c3713d.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: d009233f36fb866f6bdaa12fb6deedf5e253e9c9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1054d3366ba528f2ad52585cf951e508958c5c68)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
(cherry picked from commit 8fd6a9f521ea6b1e10c80fe33968943db30991ba)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/cve-check.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 29b276e491..0111ec6ba8 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
| @@ -48,6 +48,7 @@ CVE_CHECK_COPY_FILES ??= "1" | |||
| 48 | CVE_CHECK_CREATE_MANIFEST ??= "1" | 48 | CVE_CHECK_CREATE_MANIFEST ??= "1" |
| 49 | 49 | ||
| 50 | CVE_CHECK_REPORT_PATCHED ??= "1" | 50 | CVE_CHECK_REPORT_PATCHED ??= "1" |
| 51 | CVE_CHECK_SHOW_WARNINGS ??= "1" | ||
| 51 | 52 | ||
| 52 | # Provide text output | 53 | # Provide text output |
| 53 | CVE_CHECK_FORMAT_TEXT ??= "1" | 54 | CVE_CHECK_FORMAT_TEXT ??= "1" |
| @@ -472,7 +473,7 @@ def cve_write_data_text(d, patched, unpatched, whitelisted, cve_data): | |||
| 472 | write_string += "VECTOR: %s\n" % cve_data[cve]["vector"] | 473 | write_string += "VECTOR: %s\n" % cve_data[cve]["vector"] |
| 473 | write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve) | 474 | write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve) |
| 474 | 475 | ||
| 475 | if unpatched_cves: | 476 | if unpatched_cves and d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1": |
| 476 | bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file)) | 477 | bb.warn("Found unpatched CVE (%s), for more information check %s" % (" ".join(unpatched_cves),cve_file)) |
| 477 | 478 | ||
| 478 | if write_string: | 479 | if write_string: |
