@@ -173,6 +173,12 @@ python do_cve_check () {
if len(cve_data) or (d.getVar("CVE_CHECK_COVERAGE") == "1" and status):
get_cve_info(d, cve_data)
cve_write_data(d, cve_data, status)
+
+ if d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
+ unpatched_cves = [cve for cve in cve_data if cve_data[cve]["abbrev-status"] == "Unpatched"]
+ if unpatched_cves:
+ bb.warn("Found unpatched CVE (%s)" % " ".join(sorted(unpatched_cves)))
+
else:
bb.note("No CVE database found, skipping CVE check")
@@ -422,10 +428,6 @@ def check_cves(d, cve_data):
if not cves_in_recipe:
bb.note("No CVE records for products in recipe %s" % (pn))
- if d.getVar("CVE_CHECK_SHOW_WARNINGS") == "1":
- unpatched_cves = [cve for cve in cve_data if cve_data[cve]["abbrev-status"] == "Unpatched"]
- if unpatched_cves:
- bb.warn("Found unpatched CVE (%s)" % " ".join(unpatched_cves))
return (cve_data, cves_status)