diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index c4640d99b3..54916b47cc 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -73,6 +73,7 @@ "dhclient", "dhcpcd", "dhcpd", + "djvulibre", "dlt_daemon", "dmidecode", "dnsmasq", diff --git a/cve_bin_tool/checkers/djvulibre.py b/cve_bin_tool/checkers/djvulibre.py new file mode 100644 index 0000000000..210e3f2d8d --- /dev/null +++ b/cve_bin_tool/checkers/djvulibre.py @@ -0,0 +1,17 @@ +# Copyright (C) 2025 Keysight Technologies +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for djvulibre +""" +from cve_bin_tool.checkers import Checker + + +class DjvulibreChecker(Checker): + CONTAINS_PATTERNS = [] + FILENAME_PATTERNS = [] + VERSION_PATTERNS = [ + r"DjVuLibre-([0-9]+\.[0-9]+\.[0-9]+[a-z]*)", + ] + VENDOR_PRODUCT = [("djvulibre_project", "djvulibre")] diff --git a/test/condensed-downloads/libdjvulibre21_3.5.28-2build4_amd64.deb.tar.gz b/test/condensed-downloads/libdjvulibre21_3.5.28-2build4_amd64.deb.tar.gz new file mode 100644 index 0000000000..bb658acf52 Binary files /dev/null and b/test/condensed-downloads/libdjvulibre21_3.5.28-2build4_amd64.deb.tar.gz differ diff --git a/test/test_data/djvulibre.py b/test/test_data/djvulibre.py new file mode 100644 index 0000000000..ea0c412ba8 --- /dev/null +++ b/test/test_data/djvulibre.py @@ -0,0 +1,18 @@ +# Copyright (C) 2025 Keysight Technologies +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "djvulibre", + "version": "3.5.27", + "version_strings": ["DjVuLibre-3.5.27"], + } +] +package_test_data = [ + { + "url": "http://archive.ubuntu.com/ubuntu/pool/main/d/djvulibre/", + "package_name": "libdjvulibre21_3.5.28-2build4_amd64.deb", + "product": "djvulibre", + "version": "3.5.28", + } +]