Skip to content

Commit 0513d64

Browse files
committed
feat(checkers): Add SASL
1 parent c071b6d commit 0513d64

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@
330330
"runc",
331331
"rust",
332332
"samba",
333+
"sasl",
333334
"sane_backends",
334335
"sdl",
335336
"seahorse",

cve_bin_tool/checkers/sasl.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (C) 2025 Keysight Technologies
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for Cyrus SASL
7+
References:
8+
https://www.cvedetails.com/vulnerability-list/vendor_id-1321/product_id-2309/Cyrus-Sasl.html
9+
"""
10+
from cve_bin_tool.checkers import Checker
11+
12+
13+
class SaslChecker(Checker):
14+
CONTAINS_PATTERNS = []
15+
FILENAME_PATTERNS = []
16+
VERSION_PATTERNS = [
17+
r"Cyrus SASL\r?\n([0-9]+\.[0-9]+\.[0-9]+)\r?\n",
18+
]
19+
VENDOR_PRODUCT = [("cyrus", "sasl")]
Binary file not shown.

test/test_data/sasl.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (C) 2025 Keysight Technologies
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "sasl", "version": "2.1.28", "version_strings": ["Cyrus SASL\n2.1.28"]},
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://de.archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/",
10+
"package_name": "libsasl2-2_2.1.28+dfsg1-5ubuntu3_amd64.deb",
11+
"product": "sasl",
12+
"version": "2.1.28",
13+
},
14+
]

0 commit comments

Comments
 (0)