Skip to content

Commit 9e5dcb5

Browse files
authored
fix: Improve subversion detection logic (#4749)
1 parent 040a2f7 commit 9e5dcb5

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

cve_bin_tool/checkers/subversion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ class SubversionChecker(Checker):
3737
VERSION_PATTERNS = [
3838
r"subversion-([0-9]+\.[0-9]+\.[0-9]+)",
3939
r"([0-9]+\.[0-9]+\.[0-9]+) [A-Za-z0-9_>/'%;! \-\.\(\)\r\n]*subversion",
40+
r"@\(#\)([0-9]+\.[0-9]+\.[0-9]+) \(r[0-9]+\)\r?\n",
4041
]
4142
VENDOR_PRODUCT = [("subversion", "subversion"), ("apache", "subversion")]
Binary file not shown.

test/test_data/subversion.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
r"Working copy locked; if no other Subversion client is currently using the working copy, try running 'svn cleanup' without the --remove",
1111
r"Working copy locked; try running 'svn cleanup' on the root of the working copy ('%s') instead.",
1212
],
13-
}
13+
},
14+
{
15+
"product": "subversion",
16+
"version": "1.14.2",
17+
"version_strings": [
18+
r"@(#)1.14.2 (r1899510)",
19+
],
20+
},
1421
]
1522
package_test_data = [
1623
{
@@ -31,4 +38,11 @@
3138
"product": "subversion",
3239
"version": "1.12.2",
3340
},
41+
{
42+
"url": "https://mirror.msys2.org/msys/x86_64/",
43+
"package_name": "subversion-1.14.2-8-x86_64.pkg.tar.zst",
44+
"product": "subversion",
45+
"version": "1.14.2",
46+
"other_products": ["gcc"],
47+
},
3448
]

0 commit comments

Comments
 (0)