diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 9f4a8a2868..772de420f0 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -184,6 +184,7 @@ "libmicrohttpd", "libmodbus", "libnss", + "libopenmpt", "libpcap", "libraw", "librsvg", diff --git a/cve_bin_tool/checkers/libopenmpt.py b/cve_bin_tool/checkers/libopenmpt.py new file mode 100644 index 0000000000..f4502457f3 --- /dev/null +++ b/cve_bin_tool/checkers/libopenmpt.py @@ -0,0 +1,20 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for libopenmpt + +https://www.cvedetails.com/product/38959/Openmpt-Libopenmpt.html?vendor_id=16722 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class LibopenmptChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [r"libopenmpt-([0-9]+\.[0-9]+\.[0-9]+)"] + VENDOR_PRODUCT = [("openmpt", "libopenmpt")] diff --git a/test/condensed-downloads/libopenmpt-0.7.8-1.fc41.aarch64.rpm.tar.gz b/test/condensed-downloads/libopenmpt-0.7.8-1.fc41.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..1d6cb0f1ef Binary files /dev/null and b/test/condensed-downloads/libopenmpt-0.7.8-1.fc41.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/libopenmpt0_0.4.3-1+deb10u1_amd64.deb.tar.gz b/test/condensed-downloads/libopenmpt0_0.4.3-1+deb10u1_amd64.deb.tar.gz new file mode 100644 index 0000000000..5a668f295e Binary files /dev/null and b/test/condensed-downloads/libopenmpt0_0.4.3-1+deb10u1_amd64.deb.tar.gz differ diff --git a/test/test_data/libopenmpt.py b/test/test_data/libopenmpt.py new file mode 100644 index 0000000000..c407d6734f --- /dev/null +++ b/test/test_data/libopenmpt.py @@ -0,0 +1,24 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "libopenmpt", + "version": "0.4.3", + "version_strings": ["libopenmpt-0.4.3"], + } +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/l/", + "package_name": "libopenmpt-0.7.8-1.fc41.aarch64.rpm", + "product": "libopenmpt", + "version": "0.7.8", + }, + { + "url": "http://ftp.fr.debian.org/debian/pool/main/libo/libopenmpt/", + "package_name": "libopenmpt0_0.4.3-1+deb10u1_amd64.deb", + "product": "libopenmpt", + "version": "0.4.3", + }, +]