mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
cve-check: add include/exclude layers
There are times when exluding or including a layer may be desired. This provide the framwork for that via two variables. The default is all layers in bblayers. CVE_CHECK_LAYER_INCLUDELIST CVE_CHECK_LAYER_EXCLUDELIST (From OE-Core rev: 5fdde65ef58b4c1048839e4f9462b34bab36fc22) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -53,6 +53,13 @@ CVE_CHECK_PN_WHITELIST ?= ""
|
|||||||
#
|
#
|
||||||
CVE_CHECK_WHITELIST ?= ""
|
CVE_CHECK_WHITELIST ?= ""
|
||||||
|
|
||||||
|
# Layers to be excluded
|
||||||
|
CVE_CHECK_LAYER_EXCLUDELIST ??= ""
|
||||||
|
|
||||||
|
# Layers to be included
|
||||||
|
CVE_CHECK_LAYER_INCLUDELIST ??= ""
|
||||||
|
|
||||||
|
|
||||||
# set to "alphabetical" for version using single alphabetical character as increament release
|
# set to "alphabetical" for version using single alphabetical character as increament release
|
||||||
CVE_VERSION_SUFFIX ??= ""
|
CVE_VERSION_SUFFIX ??= ""
|
||||||
|
|
||||||
@@ -334,10 +341,20 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data):
|
|||||||
CVE manifest if enabled.
|
CVE manifest if enabled.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
cve_file = d.getVar("CVE_CHECK_LOG")
|
cve_file = d.getVar("CVE_CHECK_LOG")
|
||||||
fdir_name = d.getVar("FILE_DIRNAME")
|
fdir_name = d.getVar("FILE_DIRNAME")
|
||||||
layer = fdir_name.split("/")[-3]
|
layer = fdir_name.split("/")[-3]
|
||||||
|
|
||||||
|
include_layers = d.getVar("CVE_CHECK_LAYER_INCLUDELIST").split()
|
||||||
|
exclude_layers = d.getVar("CVE_CHECK_LAYER_EXCLUDELIST").split()
|
||||||
|
|
||||||
|
if exclude_layers and layer in exclude_layers:
|
||||||
|
return
|
||||||
|
|
||||||
|
if include_layers and layer not in include_layers:
|
||||||
|
return
|
||||||
|
|
||||||
nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
|
nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
|
||||||
write_string = ""
|
write_string = ""
|
||||||
unpatched_cves = []
|
unpatched_cves = []
|
||||||
|
|||||||
Reference in New Issue
Block a user