aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-02-19 00:35:26 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2020-02-19 08:22:09 +0100
commit60f2de1f12a7e87dd8b9daff2aa4efd53d26165b (patch)
treeee9bceb5ea34da544b912c8460a41fca4a6c713d
parent40c83693cdb1261de2b65ffad642c8be18298071 (diff)
downloadbuildroot-60f2de1f12a7e87dd8b9daff2aa4efd53d26165b.tar.gz
buildroot-60f2de1f12a7e87dd8b9daff2aa4efd53d26165b.tar.bz2
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 <titouan.christophe@railnova.eu> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xsupport/scripts/pkg-stats3
1 files changed, 3 insertions, 0 deletions
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 920a2be158..c113cf9606 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -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