Skip to content

Commit

Permalink
fix: update kexec-tools checker (intel#2825)
Browse files Browse the repository at this point in the history
kexec-tools_project:kexec-tools is a valid CPE ID for kexec-tools:
https://nvd.nist.gov/products/cpe/search/results?namingFormat=2.3&keyword=cpe%3A2.3%3Aa%3Akexec-tools_project%3Akexec-tools

Without this CPE, CVE-2021-20269 will be missed

While at it, add an openWRT test package and drop empty other_products

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine authored Mar 16, 2023
1 parent 68e64f9 commit 8749b8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cve_bin_tool/checkers/kexectools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
CVE checker for kexec-tools
https://www.cvedetails.com/product/27100/?q=Kexec-tools
https://www.cvedetails.com/product/121743/Kexec-tools-Project-Kexec-tools.html?vendor_id=28449
"""
from __future__ import annotations
Expand All @@ -17,4 +18,4 @@ class KexectoolsChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS = [r"kexec"]
VERSION_PATTERNS = [r"kexec-tools ([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("redhat", "kexec-tools")]
VENDOR_PRODUCT = [("kexec-tools_project", "kexec-tools"), ("redhat", "kexec-tools")]
Binary file not shown.
7 changes: 6 additions & 1 deletion test/test_data/kexectools.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"package_name": "kexec-tools_2.0.16-1ubuntu1_amd64.deb",
"product": "kexec-tools",
"version": "2.0.16",
"other_products": [],
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/base/",
"package_name": "kexec_2.0.16-2_x86_64.ipk",
"product": "kexec-tools",
"version": "2.0.16",
},
]

0 comments on commit 8749b8b

Please sign in to comment.