Skip to content

Commit 18eaccc

Browse files
authored
fix: update gcc checker (#5001)
Fix gcc pattern to detect the following pattern: GCC: (crosstool-NG git+9f5f159-dirty) 4.8.3 Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 86f4274 commit 18eaccc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+59
-9
lines changed

cve_bin_tool/checkers/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class GccChecker(Checker):
3232
]
3333
FILENAME_PATTTERN = [r"gcc"]
3434
VERSION_PATTERNS = [
35-
r"GCC: \([a-zA-Z ,0-9]+\) ([0-9]+\.[0-9]+(\.[0-9]+)?)",
35+
r"GCC: \([a-zA-Z ,0-9_+\-\.]+\) ([0-9]+\.[0-9]+(\.[0-9]+)?)",
3636
# r"gcc ([0-9]+\.[0-9]+(\.[0-9]+)?)", # does not return correct version number on some packages
3737
]
3838
VENDOR_PRODUCT = [("gnu", "gcc")]

test/test_data/apr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
"package_name": "apr-1.7.0-r0.apk",
3333
"product": "portable_runtime",
3434
"version": "1.7.0",
35+
"other_products": ["gcc"],
3536
},
3637
]

test/test_data/axel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"package_name": "axel-2.17.6-r1.apk",
2323
"product": "axel",
2424
"version": "2.17.6",
25+
"other_products": ["gcc"],
2526
},
2627
]

test/test_data/bash.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"package_name": "bash_4.4.18-2ubuntu1_amd64.deb",
1717
"product": "bash",
1818
"version": "4.4.19",
19+
"other_products": ["gcc"],
1920
},
2021
]

test/test_data/cairo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
"package_name": "cairo-1.16.0-r3.apk",
3434
"product": "cairo",
3535
"version": "1.16.0",
36+
"other_products": ["gcc"],
3637
},
3738
]

test/test_data/cups_filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "cups-filters-1.26.0-r0.apk",
2727
"product": "cups-filters",
2828
"version": "1.26.0",
29+
"other_products": ["gcc"],
2930
},
3031
]

test/test_data/docker.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
"product": "docker",
1313
"version": "19.03.15",
1414
"package_name": "docker-19.03.15-1.mga8.armv7hl.rpm",
15-
"other_products": [
16-
"go",
17-
],
15+
"other_products": ["gcc", "go"],
1816
},
1917
{
2018
"url": "https://www.rpmfind.net/linux/openmandriva/cooker/repository/aarch64/main/release/",

test/test_data/ed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"package_name": "ed-1.15-r0.apk",
2424
"product": "ed",
2525
"version": "1.15",
26+
"other_products": ["gcc"],
2627
},
2728
]

test/test_data/firejail.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"package_name": "firejail-0.9.60-r0.apk",
2727
"product": "firejail",
2828
"version": "0.9.60",
29+
"other_products": ["gcc"],
2930
},
3031
]

test/test_data/gettext.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"package_name": "gettext-0.20.1-r2.apk",
4343
"product": "gettext",
4444
"version": "0.20.1",
45+
"other_products": ["gcc"],
4546
},
4647
]

0 commit comments

Comments
 (0)