buildroot/support
Thomas Petazzoni e3ef352ef6 support/scripts/{pkg-stats, cve.py}: support CPE ID based matching
This commit modifies cve.py, as well as its users cve-checker and
pkg-stats to support CPE ID based matching, for packages that have CPE
ID information.

One of the non-trivial thing is that we can't simply iterate over all
CVEs, and then iterate over all our packages to see which packages
have CPE ID information that match the CPEs affected by the
CVE. Indeed, this is an O(n^2) operation.

So instead, we do a pre-filtering of packages potentially affected. In
check_package_cves(), we build a cpe_product_pkgs dict that associates
a CPE product name to the packages that have this CPE product
name. The CPE product name is either derived from the CPE information
provided by the package if available, and otherwise we use the package
name, which is what was used prior to this patch.

And then, when we look at CVEs, we only consider the packages that
have a CPE product name matching the CPE products affected by the
CVEs. This is done in check_package_cve_affects().

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-01-04 21:38:20 +01:00
..
config-fragments support/config-fragments: add s390x z13 to autobuild configs 2020-09-30 21:33:25 +02:00
dependencies support/dependencies: set cmake version min to 3.15 2020-12-25 16:21:27 +01:00
docker support/docker: drop Python 2.x modules 2020-08-14 23:08:34 +02:00
download suport/download: fix git wrapper with submodules on older git versions 2020-06-17 22:58:22 +02:00
gnuconfig support/gnuconfig: fix previous version bump 2020-09-27 18:30:05 +02:00
kconfig support/kconfig/merge_config.sh: avoid false positive matches from comment lines 2018-11-24 10:11:15 +01:00
legal-info core/legal-info: update list of saved material in README 2020-01-18 18:38:42 +01:00
libtool support/libtool: add patch for newer versions 2014-12-21 13:21:56 +01:00
misc Update for 2020.11.1 2020-12-27 15:39:52 +01:00
scripts support/scripts/{pkg-stats, cve.py}: support CPE ID based matching 2021-01-04 21:38:20 +01:00
testing support/testing: fix flake8 issue in CPE ID test 2021-01-02 18:06:24 +01:00