Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/9] support/scripts: Turn CVE check into a module
Date: Thu, 09 Jul 2020 09:34:08 +0200	[thread overview]
Message-ID: <871rll9m6n.fsf@FE-laptop> (raw)
In-Reply-To: <20200708185427.6f536ad6@windsurf>

Hello Thomas,

> On Wed,  8 Jul 2020 18:39:58 +0200
> Gregory CLEMENT <gregory.clement@bootlin.com> wrote:
>
>> In order to be able to do CVE checking outside of pkg-stat, move the
>> CVE class in a module that can be used by other scripts.
>> 
>> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>> ---
>>  support/scripts/cve.py    | 141 ++++++++++++++++++++++++++++++++++++++
>>  support/scripts/pkg-stats | 115 +------------------------------
>>  2 files changed, 144 insertions(+), 112 deletions(-)
>>  create mode 100755 support/scripts/cve.py
>> 
>> diff --git a/support/scripts/cve.py b/support/scripts/cve.py
>> new file mode 100755
>> index 0000000000..874ab4482d
>> --- /dev/null
>> +++ b/support/scripts/cve.py
>> @@ -0,0 +1,141 @@
>> +#!/usr/bin/env python
>> +
>> +# Copyright (C) 2009 by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> +# Copyright (C) 2020 by Gregory CLEMENT <gregory.clement@bootlin.com>
>> +#
>> +# This program is free software; you can redistribute it and/or modify
>> +# it under the terms of the GNU General Public License as published by
>> +# the Free Software Foundation; either version 2 of the License, or
>> +# (at your option) any later version.
>> +#
>> +# This program is distributed in the hope that it will be useful,
>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> +# General Public License for more details.
>> +#
>> +# You should have received a copy of the GNU General Public License
>> +# along with this program; if not, write to the Free Software
>> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>> +
>> +import datetime
>> +import os
>> +import re
>> +import requests  # URL checking
>> +import json
>> +import ijson
>> +import distutils.version
>> +import time
>> +import gzip
>> +import sys
>
> Are you able to drop some of these imports from the pkg-stats script ?
> For example, isn't ijson only used by cve.py now ? Same for gzip, for
> distutils.version. Perhaps others ?

I removed some import in the cve.py but not in this file. I can do it,
indeed.

Gregory

>
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2020-07-09  7:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 16:39 [Buildroot] [PATCH 0/9] Improving CVE reporting Gregory CLEMENT
2020-07-08 16:39 ` [Buildroot] [PATCH 1/9] support/scripts: Turn CVE check into a module Gregory CLEMENT
2020-07-08 16:54   ` Thomas Petazzoni
2020-07-09  7:34     ` Gregory CLEMENT [this message]
2020-07-08 16:39 ` [Buildroot] [PATCH 2/9] support/scripts/cve.py: Switch to JSON 1.1 Gregory CLEMENT
2020-07-08 16:40 ` [Buildroot] [PATCH 3/9] package/pkg-utils: show-info: report the list of the CVEs ignored Gregory CLEMENT
2020-07-08 16:53   ` Thomas Petazzoni
2020-07-08 16:40 ` [Buildroot] [PATCH 4/9] package/pkg-utils: Make CVE class independent of the Pacakage class Gregory CLEMENT
2020-07-08 16:40 ` [Buildroot] [PATCH 5/9] support/scripts: Add a per configuration CVE checker Gregory CLEMENT
2020-07-08 18:30   ` Matthew Weber
2020-07-09  8:41     ` Gregory CLEMENT
2020-07-09  9:03       ` Gregory CLEMENT
2020-07-09 11:46   ` Matthew Weber
2020-07-08 16:40 ` [Buildroot] [PATCH 6/9] package/pkg-utils: cve.py: Handle exception when version comparison fails Gregory CLEMENT
2020-07-09  8:52   ` Thomas Petazzoni
2020-07-08 16:40 ` [Buildroot] [PATCH 7/9] support/script/pkg-stats: Manage the CVEs that need to be check Gregory CLEMENT
2020-07-09  9:00   ` Thomas Petazzoni
2020-07-08 16:40 ` [Buildroot] [PATCH 8/9] support/script/cve-checker: " Gregory CLEMENT
2020-07-08 16:40 ` [Buildroot] [PATCH 9/9] package/pkg-utils/cve.py: Manage case when package version doesn't exist Gregory CLEMENT
  -- strict thread matches above, loose matches on Subject: below --
2020-07-10 11:22 [Buildroot] [PATCH 0/9] Improving CVE reporting Gregory CLEMENT
2020-07-10 11:22 ` [Buildroot] [PATCH 1/9] support/scripts: Turn CVE check into a module Gregory CLEMENT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rll9m6n.fsf@FE-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox