Skip to content

Commit 5929985

Browse files
authored
feat(checkers): Add SASL (#4757)
1 parent 1290802 commit 5929985

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@
335335
"runc",
336336
"rust",
337337
"samba",
338+
"sasl",
338339
"sane_backends",
339340
"sdl",
340341
"seahorse",

cve_bin_tool/checkers/sasl.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 = [
20+
("cyrus", "sasl"),
21+
("cyrusimap", "cyrus-sasl"),
22+
("cyrusimap", "cyrus_sasl"),
23+
("carnegie_mellon_university", "cyrus-sasl"),
24+
("cmu", "cyrus-sasl"),
25+
]
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)