diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 293baa18f4..be32539680 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -77,6 +77,7 @@ "darkhttpd", "dav1d", "davfs2", + "dcmtk", "dbus", "debianutils", "dhclient", diff --git a/cve_bin_tool/checkers/dcmtk.py b/cve_bin_tool/checkers/dcmtk.py new file mode 100644 index 0000000000..c053e358e3 --- /dev/null +++ b/cve_bin_tool/checkers/dcmtk.py @@ -0,0 +1,20 @@ +# Copyright (C) 2025 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for dcmtk + +https://www.cvedetails.com/product/27867/Offis-Dcmtk.html?vendor_id=13397 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class DcmtkChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [r"dcmtk-([0-9]+\.[0-9]+\.[0-9]+)"] + VENDOR_PRODUCT = [("offis", "dcmtk")] diff --git a/test/condensed-downloads/dcmtk-3.6.9-2.fc43.aarch64.rpm.tar.gz b/test/condensed-downloads/dcmtk-3.6.9-2.fc43.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..73e70a1159 Binary files /dev/null and b/test/condensed-downloads/dcmtk-3.6.9-2.fc43.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/dcmtk_3.6.4-2.1_amd64.deb.tar.gz b/test/condensed-downloads/dcmtk_3.6.4-2.1_amd64.deb.tar.gz new file mode 100644 index 0000000000..9d5b04b778 Binary files /dev/null and b/test/condensed-downloads/dcmtk_3.6.4-2.1_amd64.deb.tar.gz differ diff --git a/test/test_data/dcmtk.py b/test/test_data/dcmtk.py new file mode 100644 index 0000000000..17cdc14907 --- /dev/null +++ b/test/test_data/dcmtk.py @@ -0,0 +1,21 @@ +# Copyright (C) 2025 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + {"product": "dcmtk", "version": "3.6.4", "version_strings": ["dcmtk-3.6.4"]} +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/d/", + "package_name": "dcmtk-3.6.9-2.fc43.aarch64.rpm", + "product": "dcmtk", + "version": "3.6.9", + "other_products": ["libjpeg"], + }, + { + "url": "http://ftp.debian.org/debian/pool/main/d/dcmtk/", + "package_name": "dcmtk_3.6.4-2.1_amd64.deb", + "product": "dcmtk", + "version": "3.6.4", + }, +]