diff options
Diffstat (limited to 'poky/meta/classes/cve-check.bbclass')
-rw-r--r-- | poky/meta/classes/cve-check.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass index 25cefda92..d843e7c4a 100644 --- a/poky/meta/classes/cve-check.bbclass +++ b/poky/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) |