A gentle reminder

>-----Original Message-----
>From: [email protected] <[email protected]>
>Sent: Sunday, March 3, 2024 11:23 PM
>To: [email protected]
>Cc: xe-linux-external(mailer list) <[email protected]>; Dhairya
>Nagodra -X (dnagodra - E-INFO CHIPS INC at Cisco) <[email protected]>
>Subject: [master] [PATCH] cve-check: Add provision to exclude classes
>
>From: Dhairya Nagodra <[email protected]>
>
>- There are times when exluding a package that inherits a particular
>  class/classes may be desired.
>- This provides the framework for that via the variable:
>  CVE_CHECK_CLASS_EXCLUDELIST
>
>Signed-off-by: Dhairya Nagodra <[email protected]>
>---
> meta/classes/cve-check.bbclass | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
>diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
>index 56ba8bceef..6d459642fe 100644
>--- a/meta/classes/cve-check.bbclass
>+++ b/meta/classes/cve-check.bbclass
>@@ -100,6 +100,8 @@ CVE_CHECK_LAYER_EXCLUDELIST ??= ""
> # Layers to be included
> CVE_CHECK_LAYER_INCLUDELIST ??= ""
>
>+# Classes to be excluded
>+CVE_CHECK_CLASS_EXCLUDELIST ??= ""
>
> # set to "alphabetical" for version using single alphabetical character as
>increment release  CVE_VERSION_SUFFIX ??= ""
>@@ -466,6 +468,7 @@ def cve_write_data_text(d, patched, unpatched,
>ignored, cve_data):
>
>     include_layers = d.getVar("CVE_CHECK_LAYER_INCLUDELIST").split()
>     exclude_layers = d.getVar("CVE_CHECK_LAYER_EXCLUDELIST").split()
>+    exclude_classes = d.getVar("CVE_CHECK_CLASS_EXCLUDELIST").split()
>
>     report_all = d.getVar("CVE_CHECK_REPORT_PATCHED") == "1"
>
>@@ -475,6 +478,10 @@ def cve_write_data_text(d, patched, unpatched,
>ignored, cve_data):
>     if include_layers and layer not in include_layers:
>         return
>
>+    for excluded in exclude_classes:
>+        if bb.data.inherits_class(excluded, d):
>+            return
>+
>     # Early exit, the text format does not report packages without CVEs
>     if not patched+unpatched+ignored:
>         return
>@@ -581,6 +588,7 @@ def cve_write_data_json(d, patched, unpatched,
>ignored, cve_data, cve_status):
>
>     include_layers = d.getVar("CVE_CHECK_LAYER_INCLUDELIST").split()
>     exclude_layers = d.getVar("CVE_CHECK_LAYER_EXCLUDELIST").split()
>+    exclude_classes = d.getVar("CVE_CHECK_CLASS_EXCLUDELIST").split()
>
>     report_all = d.getVar("CVE_CHECK_REPORT_PATCHED") == "1"
>
>@@ -590,6 +598,10 @@ def cve_write_data_json(d, patched, unpatched,
>ignored, cve_data, cve_status):
>     if include_layers and layer not in include_layers:
>         return
>
>+    for excluded in exclude_classes:
>+        if bb.data.inherits_class(excluded, d):
>+            return
>+
>     unpatched_cves = []
>
>     product_data = []
>--
>2.35.6

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197078): 
https://lists.openembedded.org/g/openembedded-core/message/197078
Mute This Topic: https://lists.openembedded.org/mt/104706824/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to