From patchwork Sat Mar 7 07:56:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1250848 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=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=E77us+J6; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48ZGzM2TZnz9sPR for ; Sat, 7 Mar 2020 18:57:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9240B2281E; Sat, 7 Mar 2020 07:57:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 92VpOCC79fzM; Sat, 7 Mar 2020 07:57:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5D75120419; Sat, 7 Mar 2020 07:57:00 +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 2286A1BF42C for ; Sat, 7 Mar 2020 07:56:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1FD8187666 for ; Sat, 7 Mar 2020 07:56:52 +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 FakkcWJdeZP6 for ; Sat, 7 Mar 2020 07:56:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 684F187660 for ; Sat, 7 Mar 2020 07:56:51 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id f7so297669wml.4 for ; Fri, 06 Mar 2020 23:56:51 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=rI6WA2u5yo1PFRLqCbKI42nurvCD22FOHGd+PDzhnTE=; b=E77us+J6K+5qz/okl6ZEoCMwWLFY7UAZ2dBATLzZtZmd2zSux5623p9tu+VWUjW2kt sZ7ecdEDdxxI8RbPaujOFIgLTk70YOVVMndeGkmdnFGuKRfY8tZyvJAD9gfwpWGskLlr MLWvbeTWF8OTt9bciM/PWrFZGQCG5Hl7pGuj+wBHDMjFNY4olMGIvbK2Eu143k/g0qSE M0evM0yCBo/VzuBTOQ0Upfej5v0J83avCPdlsq7v7mMDyxTgS8xNhOjgS3YhdKcWPpHm ArlIi80JK3868/jJUgrgbLBKjzCexOSITX/JFe3PYBHccU38FjFb26MEX4CV0Za3ChQ0 cOZQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=rI6WA2u5yo1PFRLqCbKI42nurvCD22FOHGd+PDzhnTE=; b=CHBvd4Ltm9HlgIr3p/51X+G6cgL6h3mCnw5PVAs2sEPASDyB0Ak/hUAAROxXKfL3AW 8/YU5k6VFXMdSvLG7lq6B0rEqO5IqLicuHhdgNdxhv/WNPCacKy6Kgr1295iCVeQqC0u obPU8MCHYFbfG+xTcowHyBHO1zDdvGXysSrv4pm4QiwAJYUiYdCKIUSAr+QGOaQej+u+ def7qVJY6kEsV21iK9sIhX8epyTknhaK11bmuJtedcOBHYtwrdMR2hd7mKAb+t/D778Y TjJ3nTIH4Hd5cg6jMLppLidnyBo6kTgh2yNx+BBwhvlTyNF+4D6alcOxVfl0e1T1PQ4c nq7w== X-Gm-Message-State: ANhLgQ2kj64NW6hqy526pjgexPxlsFbzqWC6ZNoVBaQEW4LcOe0owzD8 PgxgbUH6PxdYpmlirVeqhvdDqlhN X-Google-Smtp-Source: ADFU+vu+tvI3ytMiBkQ3aCImUmJYgKAaPQj4ChBGCWJL7m7FES5tSoAR7k/3IVWrSKqxwjqjFgRYIQ== X-Received: by 2002:a7b:cc95:: with SMTP id p21mr8018783wma.184.1583567809669; Fri, 06 Mar 2020 23:56:49 -0800 (PST) Received: from t450s.fritz.box (ip5f58981a.dynamic.kabel-deutschland.de. [95.88.152.26]) by smtp.gmail.com with ESMTPSA id g129sm19189071wmg.12.2020.03.06.23.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 23:56:49 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Sat, 7 Mar 2020 08:56:33 +0100 Message-Id: <20200307075633.7514-13-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200307075633.7514-1-heiko.thiery@gmail.com> References: <20200307075633.7514-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v5 12/12] support/scripts/pkg-stats: add status for cve check 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 , Thomas Petazzoni , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 15aa48180e..985a0fd079 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -622,6 +622,12 @@ def check_package_cves(nvd_path, packages): if pkg_name in packages and cve.affects(packages[pkg_name]): packages[pkg_name].cves.append(cve.identifier) + for pkg_name, pkg in packages.items(): + if len(pkg.cves) > 0: + pkg.status['cve'] = ('error', 'affected by cve') + else: + pkg.status['cve'] = ('ok', 'no cve found') + def calculate_stats(packages): stats = defaultdict(int)