Skip to content

Commit

Permalink
Add checker for netpbm (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurabhK122 committed Jul 23, 2020
1 parent c459cc1 commit e57d7fd
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"memcached",
"ncurses",
"nessus",
"netpbm",
"nginx",
"node",
"openafs",
Expand Down
16 changes: 16 additions & 0 deletions cve_bin_tool/checkers/netpbm.py
Original file line number Diff line number Diff line change
@@ -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")]
1 change: 1 addition & 0 deletions test/test_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"libvirt",
"mariadb",
"memcached",
"netpbm",
"nss",
"tiff",
"lighttpd",
Expand Down
17 changes: 17 additions & 0 deletions test/test_data/netpbm.py
Original file line number Diff line number Diff line change
@@ -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",
},
]

0 comments on commit e57d7fd

Please sign in to comment.