All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] cve-check: show real PN/PV
@ 2020-11-19 10:38 Ross Burton
  2020-11-19 10:38 ` [PATCH 2/5] python3: add CVE-2007-4559 to whitelist Ross Burton
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ross Burton @ 2020-11-19 10:38 UTC (permalink / raw)
  To: openembedded-core

The output currently shows the remapped product and version fields,
which may not be the actual recipe name/version. As this report is about
recipes, use the real values.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes/cve-check.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 25cefda92eb..d843e7c4ace 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -208,6 +208,9 @@ def check_cves(d, patched_cves):
     """
     from distutils.version import LooseVersion
 
+    pn = d.getVar("PN")
+    real_pv = d.getVar("PV")
+
     cves_unpatched = []
     # CVE_PRODUCT can contain more than one product (eg. curl/libcurl)
     products = d.getVar("CVE_PRODUCT").split()
@@ -217,7 +220,7 @@ def check_cves(d, patched_cves):
     pv = d.getVar("CVE_VERSION").split("+git")[0]
 
     # If the recipe has been whitlisted we return empty lists
-    if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
+    if pn in d.getVar("CVE_CHECK_PN_WHITELIST").split():
         bb.note("Recipe has been whitelisted, skipping check")
         return ([], [], [])
 
@@ -286,12 +289,12 @@ def check_cves(d, patched_cves):
                         vulnerable = vulnerable_start or vulnerable_end
 
                 if vulnerable:
-                    bb.note("%s-%s is vulnerable to %s" % (product, pv, cve))
+                    bb.note("%s-%s is vulnerable to %s" % (pn, real_pv, cve))
                     cves_unpatched.append(cve)
                     break
 
             if not vulnerable:
-                bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve))
+                bb.note("%s-%s is not vulnerable to %s" % (pn, real_pv, cve))
                 # TODO: not patched but not vulnerable
                 patched_cves.add(cve)
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-20 11:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 10:38 [PATCH 1/5] cve-check: show real PN/PV Ross Burton
2020-11-19 10:38 ` [PATCH 2/5] python3: add CVE-2007-4559 to whitelist Ross Burton
2020-11-19 15:03   ` [OE-core] " Steve Sakoman
2020-11-20 11:10     ` Ross Burton
2020-11-19 10:38 ` [PATCH 3/5] sqlite3: add CVE-2015-3717 " Ross Burton
2020-11-19 15:04   ` [OE-core] " Steve Sakoman
2020-11-19 16:41     ` Mikko Rapeli
2020-11-20 11:13       ` Ross Burton
2020-11-20 11:13     ` Ross Burton
2020-11-19 10:38 ` [PATCH 4/5] gstreamer1.0-rtsp-server: set CVE_PRODUCT Ross Burton
2020-11-19 10:38 ` [PATCH 5/5] gstreamer1.0-plugins-base: " Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.