Skip to content

Commit

Permalink
fix: update strongswan checker
Browse files Browse the repository at this point in the history
Update strongswan pattern to avoid detecting strongswan 4.0.0 in
test/condensed-downloads/openswan-2.6.31-1.fc14.x86_64.rpm.tar.gz:

strongswan │ strongswan │ 4.0.0   │ Root 0 (see below) │ pluto

While at it, also add alpine, debian and openwrt test packages

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Feb 7, 2025
1 parent 979ff4a commit d43f66d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/strongswan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
class StrongswanChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS = [r"libcharon.so"]
VERSION_PATTERNS = [r"strongSwan ([0-9]+\.[0-9]+\.[0-9])"]
VERSION_PATTERNS = [r"\(strongSwan ([0-9]+\.[0-9]+\.[0-9])"]
VENDOR_PRODUCT = [("strongswan", "strongswan")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion test/test_data/openswan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
"package_name": "openswan-2.6.31-1.fc14.x86_64.rpm",
"product": "openswan",
"version": "2.6.31",
"other_products": ["strongswan"],
},
]
20 changes: 19 additions & 1 deletion test/test_data/strongswan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"product": "strongswan",
"version": "4.6.3",
"version_strings": ["strongSwan 4.6.3"],
"version_strings": ["(strongSwan 4.6.3"],
}
]
package_test_data = [
Expand All @@ -14,5 +14,23 @@
"package_name": "strongswan-4.6.2-1.fc16.x86_64.rpm",
"product": "strongswan",
"version": "4.6.2",
},
{
"url": "http://ftp.debian.org/debian/pool/main/s/strongswan/",
"package_name": "strongswan-charon_5.7.2-1+deb10u2_amd64.deb",
"product": "strongswan",
"version": "5.7.2",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "strongswan-charon_5.8.2-2_x86_64.ipk",
"product": "strongswan",
"version": "5.8.2",
},
{
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
"package_name": "strongswan-5.8.1-r2.apk",
"product": "strongswan",
"version": "5.8.1",
}
]

0 comments on commit d43f66d

Please sign in to comment.