Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] cve-check: allow recipes to override the product name
@ 2016-12-07 16:50 Ross Burton
  2016-12-07 16:50 ` [PATCH 2/3] tiff: set CVE_PRODUCT Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ross Burton @ 2016-12-07 16:50 UTC (permalink / raw)
  To: openembedded-core

Add a new variable CVE_PRODUCT for the product name to look up in the NVD
database.  Default this to BPN, but allow recipes such as tiff (which is libtiff
in NVD) to override it.

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

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index b0febfb..75b8fa9 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -20,6 +20,10 @@
 # the only method to check against CVEs. Running this tool
 # doesn't guarantee your packages are free of CVEs.
 
+# The product name that the CVE database uses.  Defaults to BPN, but may need to
+# be overriden per recipe (for example tiff.bb sets CVE_PRODUCT=libtiff).
+CVE_PRODUCT ?= "${BPN}"
+
 CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
 CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
 
@@ -144,7 +148,7 @@ def check_cves(d, patched_cves):
 
     cves_patched = []
     cves_unpatched = []
-    bpn = d.getVar("BPN", True)
+    bpn = d.getVar("CVE_PRODUCT")
     pv = d.getVar("PV", True).split("git+")[0]
     cves = " ".join(patched_cves)
     cve_db_dir = d.getVar("CVE_CHECK_DB_DIR", True)
-- 
2.8.1



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

end of thread, other threads:[~2016-12-07 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 16:50 [PATCH 1/3] cve-check: allow recipes to override the product name Ross Burton
2016-12-07 16:50 ` [PATCH 2/3] tiff: set CVE_PRODUCT Ross Burton
2016-12-07 16:50 ` [PATCH 3/3] curl: " Ross Burton
2016-12-07 17:05 ` [PATCH 1/3] cve-check: allow recipes to override the product name Mariano Lopez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox