Skip to content

Commit b78376a

Browse files
authored
fix: update strongswan checker (#5277)
Add missing + in strongswan pattern to avoid truncating latest digit of version (e.g, 5.9.1 instead of 5.9.13) This issue is present since the addition of the checker in 2020 Fix 071d876 Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 2c5b4d9 commit b78376a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

cve_bin_tool/checkers/strongswan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
class StrongswanChecker(Checker):
1717
CONTAINS_PATTERNS: list[str] = []
1818
FILENAME_PATTERNS = [r"libcharon.so"]
19-
VERSION_PATTERNS = [r"\(strongSwan ([0-9]+\.[0-9]+\.[0-9])"]
19+
VERSION_PATTERNS = [r"\(strongSwan ([0-9]+\.[0-9]+\.[0-9]+)"]
2020
VENDOR_PRODUCT = [("strongswan", "strongswan")]
Binary file not shown.

test/test_data/strongswan.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@
3434
"version": "5.8.1",
3535
"other_products": ["gcc"],
3636
},
37+
{
38+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.20/main/aarch64/",
39+
"package_name": "strongswan-5.9.13-r1.apk",
40+
"product": "strongswan",
41+
"version": "5.9.13",
42+
},
3743
]

0 commit comments

Comments
 (0)