diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index bab000ccb3..b3da5a7a28 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -112,6 +112,7 @@ "faad2", "fastd", "fastnetmon", + "fetchmail", "ffmpeg", "file", "firefox", diff --git a/cve_bin_tool/checkers/fetchmail.py b/cve_bin_tool/checkers/fetchmail.py new file mode 100644 index 0000000000..09454ed5ba --- /dev/null +++ b/cve_bin_tool/checkers/fetchmail.py @@ -0,0 +1,22 @@ +# Copyright (C) 2025 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for fetchamil + +https://www.cvedetails.com/product/9667/Fetchmail-Fetchmail.html?vendor_id=5710 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class FetchmailChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [ + r"([0-9]+\.[0-9]+\.[0-9]+)[A-Za-z0-9/%():@=>' \"\.\-\t\r\n]*fetchmail" + ] + VENDOR_PRODUCT = [("fetchmail", "fetchmail")] diff --git a/test/condensed-downloads/fetchmail-6.4.1-r1.apk.tar.gz b/test/condensed-downloads/fetchmail-6.4.1-r1.apk.tar.gz new file mode 100644 index 0000000000..4f23d74744 Binary files /dev/null and b/test/condensed-downloads/fetchmail-6.4.1-r1.apk.tar.gz differ diff --git a/test/condensed-downloads/fetchmail-6.5.4-2.fc43.aarch64.rpm.tar.gz b/test/condensed-downloads/fetchmail-6.5.4-2.fc43.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..0d4739acd8 Binary files /dev/null and b/test/condensed-downloads/fetchmail-6.5.4-2.fc43.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/fetchmail_6.4.16-4+deb11u1_amd64.deb.tar.gz b/test/condensed-downloads/fetchmail_6.4.16-4+deb11u1_amd64.deb.tar.gz new file mode 100644 index 0000000000..1705ad741e Binary files /dev/null and b/test/condensed-downloads/fetchmail_6.4.16-4+deb11u1_amd64.deb.tar.gz differ diff --git a/test/test_data/fetchmail.py b/test/test_data/fetchmail.py new file mode 100644 index 0000000000..1d45c2c298 --- /dev/null +++ b/test/test_data/fetchmail.py @@ -0,0 +1,31 @@ +# Copyright (C) 2025 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "fetchmail", + "version": "6.4.1", + "version_strings": ["6.4.1\nfetchmail"], + } +] +package_test_data = [ + { + "url": "https://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/f/", + "package_name": "fetchmail-6.5.4-2.fc43.aarch64.rpm", + "product": "fetchmail", + "version": "6.5.4", + }, + { + "url": "http://ftp.debian.org/debian/pool/main/f/fetchmail/", + "package_name": "fetchmail_6.4.16-4+deb11u1_amd64.deb", + "product": "fetchmail", + "version": "6.4.16", + }, + { + "url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/", + "package_name": "fetchmail-6.4.1-r1.apk", + "product": "fetchmail", + "version": "6.4.1", + "other_products": ["gcc"], + }, +]