diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 1a78bfbda7..00e8c85488 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -41,6 +41,7 @@ "memcached", "ncurses", "nessus", + "netpbm", "nginx", "node", "openafs", diff --git a/cve_bin_tool/checkers/netpbm.py b/cve_bin_tool/checkers/netpbm.py new file mode 100644 index 0000000000..06ec8c1c00 --- /dev/null +++ b/cve_bin_tool/checkers/netpbm.py @@ -0,0 +1,16 @@ +#!/usr/bin/python3 + +""" +CVE checker for netpbm + +https://www.cvedetails.com/product/2877/Netpbm-Netpbm.html?vendor_id=1666 + +""" +from . import Checker + + +class NetpbmChecker(Checker): + CONTAINS_PATTERNS = [] + FILENAME_PATTERNS = [r"libnetpbm.so"] + VERSION_PATTERNS = [r"Netpbm ([0-9]+\.[0-9]+\.[0-9]+)"] + VENDOR_PRODUCT = [("netpbm", "netpbm")] diff --git a/test/test_data/__init__.py b/test/test_data/__init__.py index b8b9877eee..2bfd925b01 100644 --- a/test/test_data/__init__.py +++ b/test/test_data/__init__.py @@ -30,6 +30,7 @@ "libjpeg-turbo", "libvirt", "memcached", + "netpbm", "nss", "tiff", "lighttpd", diff --git a/test/test_data/netpbm.py b/test/test_data/netpbm.py new file mode 100644 index 0000000000..10842b0ff4 --- /dev/null +++ b/test/test_data/netpbm.py @@ -0,0 +1,17 @@ +mapping_test_data = [ + {"product": "netpbm", "version": "10.35.32", "version_strings": ["Netpbm 10.35.32"]} +] +package_test_data = [ + { + "url": "https://kojipkgs.fedoraproject.org/packages/netpbm/10.35.46/1.fc10/x86_64/", + "package_name": "netpbm-10.35.46-1.fc10.x86_64.rpm", + "product": "netpbm", + "version": "10.35.46", + }, + { + "url": "http://vault.centos.org/4.9/os/x86_64/CentOS/RPMS/", + "package_name": "netpbm-10.35.58-6.el4.x86_64.rpm", + "product": "netpbm", + "version": "10.35.58", + }, +]