diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index bb9cfb6030..a418199dc8 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -188,6 +188,7 @@ "libtiff", "libtomcrypt", "libupnp", + "libvips", "libvirt", "libvncserver", "libvorbis", diff --git a/cve_bin_tool/checkers/libvips.py b/cve_bin_tool/checkers/libvips.py new file mode 100644 index 0000000000..a67724d775 --- /dev/null +++ b/cve_bin_tool/checkers/libvips.py @@ -0,0 +1,20 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for libvips + +https://www.cvedetails.com/product/160947/Libvips-Libvips.html?vendor_id=32880 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class LibvipsChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[A-Za-z0-9./%: \-\(\)\r\n]*libvips"] + VENDOR_PRODUCT = [("libvips", "libvips")] diff --git a/test/condensed-downloads/libvips42_8.7.4-1%2Bdeb10u1_amd64.deb.tar.gz b/test/condensed-downloads/libvips42_8.7.4-1%2Bdeb10u1_amd64.deb.tar.gz new file mode 100644 index 0000000000..6b0958a806 Binary files /dev/null and b/test/condensed-downloads/libvips42_8.7.4-1%2Bdeb10u1_amd64.deb.tar.gz differ diff --git a/test/condensed-downloads/vips-8.15.1-2.fc40.aarch64.rpm.tar.gz b/test/condensed-downloads/vips-8.15.1-2.fc40.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..bef2ef1cc5 Binary files /dev/null and b/test/condensed-downloads/vips-8.15.1-2.fc40.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/vips_8.7.4-3_x86_64.ipk.tar.gz b/test/condensed-downloads/vips_8.7.4-3_x86_64.ipk.tar.gz new file mode 100644 index 0000000000..eff7a76ef9 Binary files /dev/null and b/test/condensed-downloads/vips_8.7.4-3_x86_64.ipk.tar.gz differ diff --git a/test/test_data/libvips.py b/test/test_data/libvips.py new file mode 100644 index 0000000000..2324a4ade9 --- /dev/null +++ b/test/test_data/libvips.py @@ -0,0 +1,26 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + {"product": "libvips", "version": "8.7.4", "version_strings": ["8.7.4\nlibvips"]} +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/v/", + "package_name": "vips-8.15.1-2.fc40.aarch64.rpm", + "product": "libvips", + "version": "8.15.1", + }, + { + "url": "http://ftp.fr.debian.org/debian/pool/main/v/vips/", + "package_name": "libvips42_8.7.4-1%2Bdeb10u1_amd64.deb", + "product": "libvips", + "version": "8.7.4", + }, + { + "url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/", + "package_name": "vips_8.7.4-3_x86_64.ipk", + "product": "libvips", + "version": "8.7.4", + }, +]