Skip to content

Commit 2c16aff

Browse files
authored
feat(checker): add fetchmail checker (#5387)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 49225f5 commit 2c16aff

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"faad2",
113113
"fastd",
114114
"fastnetmon",
115+
"fetchmail",
115116
"ffmpeg",
116117
"file",
117118
"firefox",

cve_bin_tool/checkers/fetchmail.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for fetchamil
7+
8+
https://www.cvedetails.com/product/9667/Fetchmail-Fetchmail.html?vendor_id=5710
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class FetchmailChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [
20+
r"([0-9]+\.[0-9]+\.[0-9]+)[A-Za-z0-9/%():@=>' \"\.\-\t\r\n]*fetchmail"
21+
]
22+
VENDOR_PRODUCT = [("fetchmail", "fetchmail")]
20.9 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/fetchmail.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "fetchmail",
7+
"version": "6.4.1",
8+
"version_strings": ["6.4.1\nfetchmail"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "https://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/f/",
14+
"package_name": "fetchmail-6.5.4-2.fc43.aarch64.rpm",
15+
"product": "fetchmail",
16+
"version": "6.5.4",
17+
},
18+
{
19+
"url": "http://ftp.debian.org/debian/pool/main/f/fetchmail/",
20+
"package_name": "fetchmail_6.4.16-4+deb11u1_amd64.deb",
21+
"product": "fetchmail",
22+
"version": "6.4.16",
23+
},
24+
{
25+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
26+
"package_name": "fetchmail-6.4.1-r1.apk",
27+
"product": "fetchmail",
28+
"version": "6.4.1",
29+
"other_products": ["gcc"],
30+
},
31+
]

0 commit comments

Comments
 (0)