Skip to contentSkip to conversation

support/scripts/pkg-stats: properly ignore CVEs in <pkg>_IGNORE_CVES

PATCH New Thomas Petazzoni 3 participants 3 messages Feb 18, 2020 – Feb 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/scripts/pkg-stats: properly ignore CVEs in <pkg>_IGNORE_CVES

It seems like throughout the series that the CVE pkg-stats support went through, the support for ignoring CVEs in the per-package <pkg>_IGNORE_CVES variable was forgotten.

Let's re-introduce this, which is now very simple thanks to the CVE class, its .identifier() propertly and the .is_cve_ignored() method of the Package class

Cc Titouan Christophe <[email protected]>
---
 support/scripts/pkg-stats | 3 +++
 1 file changed, 3 insertions(+)
support/scripts/pkg-stats +3 -0
index 920a2be158..c113cf9606 100755
@@ -259,6 +259,9 @@ class CVE:
         True if the Buildroot Package object passed as argument is affected
         by this CVE.
         """
+        if br_pkg.is_cve_ignored(self.identifier):
+            return False
+
         for product in self.each_product():
             if product['product_name'] != br_pkg.name:
                 continue
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 support/scripts/pkg-stats: properly ignore CVEs in <pkg>_IGNORE_CVES

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

It seems like throughout the series that the CVE pkg-stats support went through, the support for ignoring CVEs in the per-package <pkg>_IGNORE_CVES variable was forgotten.

Quoted 6 lines

Let's re-introduce this, which is now very simple thanks to the CVE class, its .identifier() propertly and the .is_cve_ignored() method of the Package class

Cc Titouan Christophe <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 support/scripts/pkg-stats: properly ignore CVEs in <pkg>_IGNORE_CVES

In reply to Thomas Petazzoni

Hello Thomas,

Quoted 3 lines · Thomas Petazzoni

It seems like throughout the series that the CVE pkg-stats support went through, the support for ignoring CVEs in the per-package <pkg>_IGNORE_CVES variable was forgotten.

Indeed, I'm very sorry for that.

Quoted 4 lines

Let's re-introduce this, which is now very simple thanks to the CVE class, its .identifier() propertly and the .is_cve_ignored() method of the Package class

Thank you !

Quoted 13 lines
Cc Titouan Christophe <[email protected]>
---
  support/scripts/pkg-stats | 3 +++
  1 file changed, 3 insertions(+)
support/scripts/pkg-stats +0 -0
index 920a2be158..c113cf9606 100755

support/scripts/pkg-stats class CVE: · line 267

Quoted 9 lines
support/scripts/pkg-stats +3 -0
@@ -259,6 +259,9 @@ class CVE:
          True if the Buildroot Package object passed as argument is affected
          by this CVE.
          """
+        if br_pkg.is_cve_ignored(self.identifier):
+            return False
+
          for product in self.each_product():
              if product['product_name'] != br_pkg.name:
                  continue

Regards,

Titouan