Skip to content

Commit 9d54ef9

Browse files
authored
fix: update procps-ng checker (#5081)
Update procps-ng pattern to catch version in old version of procps (e.g., version 3.2.8) Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent a5a749d commit 9d54ef9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

cve_bin_tool/checkers/procps_ng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
class ProcpsNgChecker(Checker):
1818
CONTAINS_PATTERNS: list[str] = []
1919
FILENAME_PATTERNS: list[str] = []
20-
VERSION_PATTERNS = [r"procps-ng ([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VERSION_PATTERNS = [r"procps(?:-ng| version) ([0-9]+\.[0-9]+\.[0-9]+)"]
2121
VENDOR_PRODUCT = [("procps_project", "procps"), ("procps-ng_project", "procps-ng")]

test/test_data/procps_ng.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
mapping_test_data = [
5-
{"product": "procps-ng", "version": "4.0.0", "version_strings": ["procps-ng 4.0.0"]}
5+
{
6+
"product": "procps-ng",
7+
"version": "4.0.0",
8+
"version_strings": ["procps-ng 4.0.0"],
9+
},
10+
{
11+
"product": "procps-ng",
12+
"version": "3.2.8",
13+
"version_strings": ["procps version 3.2.8"],
14+
},
615
]
716
package_test_data = [
817
{

0 commit comments

Comments
 (0)