Skip to content

Commit 07495da

Browse files
authored
fix: improve curl checker pattern (#5048)
Drop "/" from curl pattern to avoid wrongly detecting curl inside some proprietary binaries which hardcodes "curl/7.66.0" as their User-Agent. Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent ebc0fdc commit 07495da

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

cve_bin_tool/checkers/curl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ class CurlChecker(Checker):
3030
FILENAME_PATTERNS = [
3131
r"curl",
3232
]
33-
VERSION_PATTERNS = [r"\r?\ncurl[ -/]([678]+\.[0-9]+\.[0-9]+)"]
33+
VERSION_PATTERNS = [r"\r?\ncurl[ -]([678]+\.[0-9]+\.[0-9]+)"]
3434
VENDOR_PRODUCT = [("haxx", "curl")]

test/test_data/curl.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
mapping_test_data = [
55
{"product": "curl", "version": "7.34.0", "version_strings": ["curl 7.34.0"]},
66
{"product": "curl", "version": "7.34.0", "version_strings": ["curl-7.34.0"]},
7-
{"product": "curl", "version": "7.34.0", "version_strings": ["curl/7.34.0"]},
87
]
98
package_test_data = [
109
{

0 commit comments

Comments
 (0)