Skip to contentSkip to conversation

cve-check: Add allowlist that is same function of whitelist.

PATCH In review [email protected] 2 participants 3 messages Jun 22, 2021 – Jun 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cve-check: Add allowlist that is same function of whitelist.

The Linux team plan to removed references to racially-charged jargon from their code for more neutral and inclusive language.
So replace use of "whitelist" with "allowlist" in cve-check.

First, we add CVE_CHECK_ALLOWLIST and it is considered patched as well as CVE_CHECK_WHITELIST.
We plan to replace about other word later and eventualy, replace all "whitelist" to "allowlist".

---
 meta/classes/cve-check.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/cve-check.bbclass +2 -1
index 112ee3379d..5e3441a783 100644
@@ -52,6 +52,7 @@ CVE_CHECK_PN_WHITELIST ?= ""
 # CVE_CHECK_WHITELIST = 'CVE-2014-2524 CVE-2018-1234'
 #
 CVE_CHECK_WHITELIST ?= ""
+CVE_CHECK_ALLOWLIST ?= ""
 
 # Layers to be excluded
 CVE_CHECK_LAYER_EXCLUDELIST ??= ""
@@ -238,7 +239,7 @@ def check_cves(d, patched_cves):
     old_cve_whitelist =  d.getVar("CVE_CHECK_CVE_WHITELIST")
     if old_cve_whitelist:
         bb.warn("CVE_CHECK_CVE_WHITELIST is deprecated, please use CVE_CHECK_WHITELIST.")
-    cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
+    cve_whitelist = d.getVar("CVE_CHECK_ALLOWLIST").split() + d.getVar("CVE_CHECK_WHITELIST").split()
 
     import sqlite3
     db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")
Signature · 1 line
2.25.1
#1 lore raw

Thanks for the patch, you need to send to oe-core mailing list since this class is part of core metadata.

Quoted 40 lines · On 6/22/21 1:29 AM, [email protected] wrote:

The Linux team plan to removed references to racially-charged jargon from their code for more neutral and inclusive language.
So replace use of "whitelist" with "allowlist" in cve-check.

First, we add CVE_CHECK_ALLOWLIST and it is considered patched as well as CVE_CHECK_WHITELIST.
We plan to replace about other word later and eventualy, replace all "whitelist" to "allowlist".

---
  meta/classes/cve-check.bbclass | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/cve-check.bbclass +2 -1
index 112ee3379d..5e3441a783 100644
@@ -52,6 +52,7 @@ CVE_CHECK_PN_WHITELIST ?= ""
  # CVE_CHECK_WHITELIST = 'CVE-2014-2524 CVE-2018-1234'
  #
  CVE_CHECK_WHITELIST ?= ""
+CVE_CHECK_ALLOWLIST ?= ""
 
  # Layers to be excluded
  CVE_CHECK_LAYER_EXCLUDELIST ??= ""
@@ -238,7 +239,7 @@ def check_cves(d, patched_cves):
      old_cve_whitelist =  d.getVar("CVE_CHECK_CVE_WHITELIST")
      if old_cve_whitelist:
          bb.warn("CVE_CHECK_CVE_WHITELIST is deprecated, please use CVE_CHECK_WHITELIST.")
-    cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
+    cve_whitelist = d.getVar("CVE_CHECK_ALLOWLIST").split() + d.getVar("CVE_CHECK_WHITELIST").split()
 
      import sqlite3
      db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")
#2 lore raw

Hi Khem,

Sorry, I mistook send mailing list, and thank you for your advice.

Quoted 55 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Wednesday, June 23, 2021 1:35 AM
To: Ito, Yuichi/伊藤 有一 <[email protected]>; [email protected]
Subject: Re: [oe] [PATCH] cve-check: Add allowlist that is same function of whitelist.

Thanks for the patch, you need to send to oe-core mailing list since this class is part of core metadata.

Quoted 5 lines · On 6/22/21 1:29 AM, [email protected] wrote:

The Linux team plan to removed references to racially-charged jargon from their code for more neutral and inclusive language. So replace use of "whitelist" with "allowlist" in cve-check.

First, we add CVE_CHECK_ALLOWLIST and it is considered patched as

well

Quoted 22 lines

as CVE_CHECK_WHITELIST.
We plan to replace about other word later and eventualy, replace all "whitelist" to "allowlist".

---
  meta/classes/cve-check.bbclass | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/classes/cve-check.bbclass index 112ee3379d..5e3441a783 100644

meta/classes/cve-check.bbclass +1 -0
@@ -52,6 +52,7 @@ CVE_CHECK_PN_WHITELIST ?= ""
  # CVE_CHECK_WHITELIST = 'CVE-2014-2524 CVE-2018-1234'
  #
  CVE_CHECK_WHITELIST ?= ""
+CVE_CHECK_ALLOWLIST ?= ""
 
  # Layers to be excluded
  CVE_CHECK_LAYER_EXCLUDELIST ??= ""

meta/classes/cve-check.bbclass def check_cves(d, patched_cves): · line 241

Quoted 3 lines
meta/classes/cve-check.bbclass +0 -0
@@ -238,7 +239,7 @@ def check_cves(d, patched_cves):
      old_cve_whitelist =  d.getVar("CVE_CHECK_CVE_WHITELIST")
      if old_cve_whitelist:
          bb.warn("CVE_CHECK_CVE_WHITELIST is deprecated, please

use CVE_CHECK_WHITELIST.")

Quoted 11 lines
meta/classes/cve-check.bbclass +2 -1
-    cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
+    cve_whitelist = d.getVar("CVE_CHECK_ALLOWLIST").split() +
+ d.getVar("CVE_CHECK_WHITELIST").split()
 
      import sqlite3
      db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")