]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-check: Allow multiple entries in CVE_PRODUCT
authorGrygorii Tertychnyi <gtertych@cisco.com>
Mon, 29 Oct 2018 15:13:10 +0000 (17:13 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Oct 2018 17:00:34 +0000 (17:00 +0000)
There are both "curl" and "libcurl" CPEs in NVD.
All "curl" CVEs are currently missing in the reports.

Hence, switch "CVE_PRODUCT" to a space separated list.
It is useful for recipes generating several packages,
that have different product names in NVD.

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

index 12ad3e5c5c303bc22b3622b7c57950d4dcd4426e..743bc08a4f9c2f5a5bf3d107bbccbb5e18d36ea9 100644 (file)
@@ -190,7 +190,8 @@ def check_cves(d, patched_cves):
         # Write the faux CSV file to be used with cve-check-tool
         fd, faux = tempfile.mkstemp(prefix="cve-faux-")
         with os.fdopen(fd, "w") as f:
-            f.write("%s,%s,%s," % (bpn, pv, cves))
+            for pn in bpn.split():
+                f.write("%s,%s,%s,\n" % (pn, pv, cves))
         cmd.append(faux)
 
         output = subprocess.check_output(cmd).decode("utf-8")