From patchwork Thu Feb 11 09:29:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1439377 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EeKMPMHB; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbrvT4pc8z9rx6 for ; Thu, 11 Feb 2021 20:30:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BB0756F554 for ; Thu, 11 Feb 2021 09:30:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eCySBHqQJq9c for ; Thu, 11 Feb 2021 09:30:06 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 3FA8E6F5DE; Thu, 11 Feb 2021 09:30:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id DC8456F501; Thu, 11 Feb 2021 09:29:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BB3B91BF681 for ; Thu, 11 Feb 2021 09:29:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B7DB2862BC for ; Thu, 11 Feb 2021 09:29:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4nPjsSnHyFRT for ; Thu, 11 Feb 2021 09:29:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by whitealder.osuosl.org (Postfix) with ESMTPS id B8D4887364 for ; Thu, 11 Feb 2021 09:29:46 +0000 (UTC) Received: by mail-wm1-f53.google.com with SMTP id w4so4786126wmi.4 for ; Thu, 11 Feb 2021 01:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6x+xGvIYNUCLTSISJNdwJ7oc7C//ISry+dsjo01Ltcg=; b=EeKMPMHB8RonHGAgayVYPhNshO2lnHLVyUwUB1dxA7uVTtK6CjjTrL7suJu+amkfxL YSTeV9H4XcNyKEqV650OwH+0nhdeNLXfvSnj6wHxb4GwQxoYeqFJkJMrks+Uwuk+ik9r 8N3IU3hQfGV+UvlQBZ2uJCiHyKqF8UNJOrdu3J7Tdwb+XNVf5ZrIeqFrq017jSd0FNwB Zwr1LHy7r37t84Q9l5UMBlb70FTWZok7vXjPyfKh0tRaMsuM3oFwQJUnKjqL8w0MWi5W TIHInPOgdiE+VIUt820ImjfRastWmQrV0an2HYgRaeZSrtpTY/I12Qb94jYnRmfUhpwc SA5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6x+xGvIYNUCLTSISJNdwJ7oc7C//ISry+dsjo01Ltcg=; b=Eh4S/H0pgX1kFY8AVRPqzUQ6hUX/J5y0mtuMXC0yMaQOgvoFHKo9b7WeocKy27RLeU aN1yVl/Y1Mb+TNltaJ6Q8o3efHftPEA3+GBEImSjmCH3CLu7+yR2F+X1usDVCFo7Nej9 Bjt8MZQ/uswaufIt08xA3eCJMLY4PCCw3I/Ribwu6iYmOPegH6wMwGTlUsh/AZZZUdED wg1sZLOtQvHj/c1RxXU8agtDE6lH2OOE4BLJq81kVNHoaLm0bQZtKyiP8pdwvDnOn/eJ RPhVksMEgWh4JwOUNHyJraKLr0iz3vnxTNzvnTqBMIwY2IlETMD9p3fNSQYTxotHssXP 0TLg== X-Gm-Message-State: AOAM531ECqpkbLn0+I36K8A4smw0q3JGvqNf/Nih876vbPET6+PKdRIS r4yzIA0i4gWkURAgXKho+H3BYJjbXF4esw== X-Google-Smtp-Source: ABdhPJye2ia+CfoW37cQ5rSesclXtwWlttwGplqAHkAD9yFHMnR4v0ElX/TNm6AzBtoOFLpHi7ehAQ== X-Received: by 2002:a7b:c2aa:: with SMTP id c10mr4273694wmk.101.1613035785006; Thu, 11 Feb 2021 01:29:45 -0800 (PST) Received: from hthiery.fritz.box (ip1f1322f8.dynamic.kabel-deutschland.de. [31.19.34.248]) by smtp.gmail.com with ESMTPSA id t15sm8388996wmi.48.2021.02.11.01.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 01:29:44 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Thu, 11 Feb 2021 10:29:10 +0100 Message-Id: <20210211092910.2108-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] support/scripts/pkg-stats: add ignored_cves to json output X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add the list of _IGNORE_CVES to the json output to show that we have a known cause (available patch or the CVE is not valid for our package configuration) that a affected CVE is not reported. Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 404903e48f..6f3ddc561f 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -100,6 +100,7 @@ class Package: self.url_worker = None self.cpeid = None self.cves = list() + self.ignored_cves = list() self.latest_version = {'status': RM_API_STATUS_ERROR, 'version': None, 'id': None} self.status = {} @@ -253,12 +254,11 @@ class Package: self.status['pkg-check'] = ("error", "{} warnings".format(self.warnings)) return - @property - def ignored_cves(self): + def set_ignored_cves(self): """ Give the list of CVEs ignored by the package """ - return list(self.all_ignored_cves.get(self.pkgvar(), [])) + self.ignored_cves = list(self.all_ignored_cves.get(self.pkgvar(), [])) def set_developers(self, developers): """ @@ -1107,6 +1107,7 @@ def __main__(): pkg.set_current_version() pkg.set_cpeid() pkg.set_url() + pkg.set_ignored_cves() pkg.set_developers(developers) print("Checking URL status") loop = asyncio.get_event_loop()