diff options
author | akuster <akuster808@gmail.com> | 2021-02-08 05:51:29 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-09 08:56:10 +0000 |
commit | 29e280f7ee6d38910e6186948272d641e1511fdd (patch) | |
tree | 40ab7e496a600bb6a2b40aa27762d04622fca7a1 /meta | |
parent | 93775123c53c138889aeec402917e6a9f79a9db4 (diff) | |
download | poky-29e280f7ee6d38910e6186948272d641e1511fdd.tar.gz |
cve-check.bbclass: add layer to cve log
Lets include whcih layer a package belongs to and
add it to the cve logs
(From OE-Core rev: 00d965bb42dc427749a4c3985af56ceffff80457)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/cve-check.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index ed86403b6b..061af7a276 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -335,6 +335,9 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): | |||
335 | """ | 335 | """ |
336 | 336 | ||
337 | cve_file = d.getVar("CVE_CHECK_LOG") | 337 | cve_file = d.getVar("CVE_CHECK_LOG") |
338 | fdir_name = d.getVar("FILE_DIRNAME") | ||
339 | layer = fdir_name.split("/")[-3] | ||
340 | |||
338 | nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId=" | 341 | nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId=" |
339 | write_string = "" | 342 | write_string = "" |
340 | unpatched_cves = [] | 343 | unpatched_cves = [] |
@@ -344,6 +347,7 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): | |||
344 | is_patched = cve in patched | 347 | is_patched = cve in patched |
345 | if is_patched and (d.getVar("CVE_CHECK_REPORT_PATCHED") != "1"): | 348 | if is_patched and (d.getVar("CVE_CHECK_REPORT_PATCHED") != "1"): |
346 | continue | 349 | continue |
350 | write_string += "LAYER: %s\n" % layer | ||
347 | write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") | 351 | write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") |
348 | write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) | 352 | write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) |
349 | write_string += "CVE: %s\n" % cve | 353 | write_string += "CVE: %s\n" % cve |