Skip to content

Commit 599b002

Browse files
authored
Merge branch 'main' into pr-1655
2 parents 05f56b2 + 9a49015 commit 599b002

32 files changed

+175
-52
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Description
2+
3+
Website: WEBSITE_LINK_OF_THE_PRODUCT
4+
5+
CVEs: CVEDETAILS_PRODUCT_PAGE
6+
7+
closes #ISSUE_NUMBER
8+
9+
10+
### Checklist
11+
12+
- [ ] Add checker
13+
- [ ] Add test
14+
- [ ] Make sure long tests are passing
15+
- [ ] Add condensed downloads to the commit
16+
- [ ] Make sure all tests are passing
17+
- [ ] Make sure black/isort tests are passing
18+
- [ ] Run a manual test with a vulnerable version of the product
19+
- [ ] Update the template for this checker
20+
- [ ] Update the reference links

.github/actions/spelling/allow.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ cleartext
5858
clnt
5959
cmdline
6060
codecov
61+
commons
62+
compress
6163
conda
6264
config
6365
conventionalcommits

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -248,24 +248,24 @@ The following checkers are available for finding components in binary files:
248248

249249
<!--CHECKERS TABLE BEGIN-->
250250
| | | | Available checkers | | | |
251-
|--------------- |--------- |---------- |--------------- |------------ |--------------- |------------- |
251+
|--------------- |------------- |---------------- |---------- |--------------- |------------ |--------------- |
252252
| accountsservice |avahi |bash |bind |binutils |bolt |bubblewrap |
253-
| busybox |bzip2 |cronie |cryptsetup |cups |curl |dbus |
254-
| dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |freeradius |
255-
| ftp |gcc |gimp |glibc |gnomeshell |gnupg |gnutls |
256-
| gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |hunspell |
257-
| icecast |icu |irssi |jacksondatabind |kbd |kerberos |kexectools |
258-
| libarchive |libbpg |libdb |libebml |libgcrypt |libical |libjpeg_turbo |
259-
| liblas |libnss |librsvg |libseccomp |libsndfile |libsolv |libsoup |
260-
| libsrtp |libssh2 |libtiff |libvirt |libvncserver |libxslt |lighttpd |
261-
| logrotate |lua |mariadb |mdadm |memcached |mtr |mysql |
262-
| nano |ncurses |nessus |netpbm |nginx |node |ntp |
263-
| open_vm_tools |openafs |openjpeg |openldap |openssh |openssl |openswan |
264-
| openvpn |p7zip |pcsc_lite |pigz |png |polarssl_fedora |poppler |
265-
| postgresql |pspp |python |qt |radare2 |rsyslog |samba |
266-
| sane_backends |sqlite |strongswan |subversion |sudo |syslogng |systemd |
267-
| tcpdump |trousers |varnish |webkitgtk |wireshark |wpa_supplicant |xerces |
268-
| xml2 |zlib |zsh | | | | |
253+
| busybox |bzip2 |commons_compress |cronie |cryptsetup |cups |curl |
254+
| dbus |dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |
255+
| freeradius |ftp |gcc |gimp |glibc |gnomeshell |gnupg |
256+
| gnutls |gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |
257+
| hunspell |icecast |icu |irssi |jacksondatabind |kbd |kerberos |
258+
| kexectools |libarchive |libbpg |libdb |libebml |libgcrypt |libical |
259+
| libjpeg_turbo |liblas |libnss |librsvg |libseccomp |libsndfile |libsolv |
260+
| libsoup |libsrtp |libssh2 |libtiff |libvirt |libvncserver |libxslt |
261+
| lighttpd |logrotate |lua |mariadb |mdadm |memcached |mtr |
262+
| mysql |nano |ncurses |nessus |netpbm |nginx |node |
263+
| ntp |open_vm_tools |openafs |openjpeg |openldap |openssh |openssl |
264+
| openswan |openvpn |p7zip |pcsc_lite |pigz |png |polarssl_fedora |
265+
| poppler |postgresql |pspp |python |qt |radare2 |rsyslog |
266+
| samba |sane_backends |sqlite |strongswan |subversion |sudo |syslogng |
267+
| systemd |tcpdump |trousers |varnish |webkitgtk |wireshark |wpa_supplicant |
268+
| xerces |xml2 |zlib |zsh | | | |
269269
<!--CHECKERS TABLE END-->
270270

271271
All the checkers can be found in the checkers directory, as can the

cve_bin_tool/checkers/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,6 @@ the product. We have done this in the checkers of `python`, `sqlite` and `kerber
451451
## Updating checker table
452452
You do not need to run format_checkers.py to update the checker table in documentation.
453453
A pull request with updated checker table is created automatically when a new checker is merged.
454+
455+
## Pull Request Template
456+
When you are ready to share your code, you can go to [our pull request page](https://github.com/intel/cve-bin-tool/pulls) to make a new pull request from the web interface and to use the guided template for new checker, click on the `Compare & pull request` button and add `?template=new_checker.md` at the end of the url.

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"bubblewrap",
2121
"busybox",
2222
"bzip2",
23+
"commons_compress",
2324
"cronie",
2425
"cryptsetup",
2526
"cups",

cve_bin_tool/checkers/avahi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class AvahiChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"avahi_free",
1717
r"avahi_strerror",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"avahi_string_list_free",
1921
# r"libavahi-common.so.3",
2022
]

cve_bin_tool/checkers/bash.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class BashChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"save_bash_input: buffer already exists for new fd %d",
1717
r"cannot allocate new file descriptor for bash input from fd %d",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"bash manual page for the complete specification.",
1921
# r"bash_execute_unix_command: cannot find keymap for command",
2022
]

cve_bin_tool/checkers/bind.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class BindChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"bind9_check_key",
1717
r"bind9_check_namedconf",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"/bind9.xsl",
1921
]
2022
FILENAME_PATTERNS = [r"named"]

cve_bin_tool/checkers/busybox.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class BusyboxChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"BusyBox is a multi-call binary that combines many common Unix",
1717
r"link to busybox for each function they wish to use and BusyBox",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"BusyBox is copyrighted by many authors between 1998-2015.",
1921
]
2022
FILENAME_PATTERNS = [r"busybox"]

cve_bin_tool/checkers/bzip2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class Bzip2Checker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"bzip2recover ([0-9]+\.[0-9]+\.[0-9]+): extracts blocks from damaged .bz2 files.",
1717
r"%s: BZ_MAX_HANDLED_BLOCKS in bzip2recover.c, and recompile.",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"in the bzip2-1.0.6 source distribution.", # present only .rpm
1921
]
2022
FILENAME_PATTERNS = [r"bzip2"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for Apache commons-compress:
7+
8+
https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-59066/Apache-Commons-Compress.html
9+
"""
10+
from cve_bin_tool.checkers import Checker
11+
12+
13+
class CommonsCompressChecker(Checker):
14+
CONTAINS_PATTERNS = [
15+
r"Apache Commons Compress software defines an API for working with",
16+
r"<url>http://commons.apache.org/proper/commons-compress/</url>",
17+
]
18+
FILENAME_PATTERNS = [r"commons-compress(-[0-9]+\.[0-9]+(\.[0-9]+)?)?.jar"]
19+
VERSION_PATTERNS = [
20+
r"<artifactId>commons-compress</artifactId>\r?\n <version>([0-9]+\.[0-9]+(\.[0-9]+)?)</version>"
21+
]
22+
VENDOR_PRODUCT = [("apache", "commons_compress")]

cve_bin_tool/checkers/cups.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class CupsChecker(Checker):
1616
CONTAINS_PATTERNS = [
1717
r"No limit for CUPS-Get-Document defined in policy %s and no suitable template found.",
1818
r"\*%%%%%%%% Created by the CUPS PPD Compiler CUPS v([0-9]+\.[0-9]+\.[0-9]+)"
19+
# Alternate optional contains patterns,
20+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1921
# r"Unable to edit cupsd.conf files larger than 1MB",
2022
# r"The web interface is currently disabled. Run \"cupsctl WebInterface=yes\" to enable it.",
2123
# r"cupsdAddSubscription: Reached MaxSubscriptions %d \(count=%d\)",

cve_bin_tool/checkers/curl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class CurlChecker(Checker):
2020
CONTAINS_PATTERNS = [
2121
r"Dump libcurl equivalent code of this command line",
2222
r"a specified protocol is unsupported by libcurl",
23+
# Alternate optional contains patterns,
24+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
2325
# r"curl failed to verify the legitimacy of the server and therefore could not",
2426
# r"error retrieving curl library information",
2527
# r"ignoring --proxy-capath, not supported by libcurl",

cve_bin_tool/checkers/dbus.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class DbusChecker(Checker):
1616
CONTAINS_PATTERNS = [
1717
r"dbus_connection_get_adt_audit_session_data",
1818
r"dbus_connection_set_dispatch_status_function",
19+
# Alternate optional contains patterns,
20+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1921
# r"dbus_connection_set_max_received_unix_fds",
2022
# r"dbus_connection_set_windows_user_function",
2123
# r"_dbus_connection_get_linux_security_label",

cve_bin_tool/checkers/dnsmasq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
class DnsmasqChecker(Checker):
1414
CONTAINS_PATTERNS = [
1515
r"Dnsmasq is free software, and you are welcome to redistribute it",
16+
# Alternate optional contains patterns,
17+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1618
# r"Allow access only to files owned by the user running dnsmasq\.",
1719
# r"Display dnsmasq version and copyright information\.",
1820
]

cve_bin_tool/checkers/dovecot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class DovecotChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"BUG: Authentication client %u requested invalid authentication mechanism %s \(DOVECOT-TOKEN required\)",
1717
r"DOVECOT_SRAND is not available in non-debug builds",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"Dovecot is already running with PID %s \(read from %s\)",
1921
# r"Dovecot is already running\? Socket already exists: %s",
2022
# r"Must be started by dovecot master process",

cve_bin_tool/checkers/freeradius.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class FreeradiusChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"Application and libfreeradius-server magic number (commit) mismatch. application: %lx library: %lx",
1717
r"Application and libfreeradius-server magic number (prefix) mismatch. application: %x library: %x",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"Application and libfreeradius-server magic number (version) mismatch. application: %lx library: %lx",
1921
# r"FreeRADIUS Version ([0-9]+\.[0-9]+\.[0-9]+), for host aarch64-redhat-linux-gnu",
2022
]

cve_bin_tool/checkers/gcc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class GccChecker(Checker):
1616
CONTAINS_PATTERNS = [
1717
r"Do not predefine system-specific and GCC-specific macros\.",
1818
r"Dump detailed information on GCC's internal representation of source code locations\.",
19+
# Alternate optional contains patterns,
20+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1921
# r"GCC is not configured to support %s as offload target",
2022
# r"IPA lattices after constant propagation, before gcc_unreachable:",
2123
# r"Record gcc command line switches in DWARF DW_AT_producer\.",

cve_bin_tool/checkers/gnupg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class GnupgChecker(Checker):
1414
CONTAINS_PATTERNS = [
1515
r"# \(Use \"gpg --import-ownertrust\" to restore them\)",
1616
r"Comment: Use \"gpg --dearmor\" for unpacking",
17+
# Alternate optional contains patterns,
18+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1719
# r"standalone revocation - use \"gpg --import\" to apply",
1820
# r"you can update your preferences with: gpg --edit-key %s updpref save",
1921
]

cve_bin_tool/checkers/hdf5.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class Hdf5Checker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"### HDF5 metadata cache trace file version 1 ###",
1717
r"%s'HDF5_DISABLE_VERSION_CHECK' environment variable is set to %d, application will",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"The HDF5 header files used to compile this application do not match",
1921
# r"The HDF5 library version information are not consistent in its source code.",
2022
# r"This can happen when an application was compiled by one version of HDF5 but",

cve_bin_tool/checkers/irssi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class IrssiChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"Configuration file was modified since irssi was last started - do you want to overwrite the possible changes\?",
1717
r"# The real text formats that irssi uses are the ones you can find with",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"# %%s : must be second - use Irssi; use Irssi::Irc; etc\.\.",
1921
# r"# When irssi expands the templates in \"format\", the final string would be:",
2022
# r"# When irssi sees this kind of text, it goes to find \"name\" from abstracts",

cve_bin_tool/checkers/liblas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class LiblasChecker(Checker):
1414
CONTAINS_PATTERNS = [
1515
r"N5boost6detail17sp_counted_impl_pIN6liblas5PointEEE",
1616
r"detail::liblas::read_n<T> input stream is not readable",
17+
# Alternate optional contains patterns,
18+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1719
# r"N5boost6detail17sp_counted_impl_pIN6liblas6detail10ReaderImplEEE",
1820
# r"liblas::detail::ReadeVLRData_str: array index out of range",
1921
]

cve_bin_tool/checkers/libsndfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class LibsndfileChecker(Checker):
1515
CONTAINS_PATTERNS = [
1616
r"No error defined for this error number. This is a bug in libsndfile.",
1717
r"NULL SF_INFO pointer passed to libsndfile.",
18+
# Alternate optional contains patterns,
19+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1820
# r"MATLAB 5.0 MAT-file, written by libsndfile-(\d+\.\d+\.\d+),",
1921
]
2022
FILENAME_PATTERNS = [r"libsndfile.so"]

cve_bin_tool/checkers/varnish.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class VarnishChecker(Checker):
1313
CONTAINS_PATTERNS = [
1414
r"\(pthread_create\(&v->tp, \(\(void \*\)0\), varnish_thread, v\)\) == 0",
1515
r"\(pthread_create\(&v->tp_vsl, \(\(void \*\)0\), varnishlog_thread, v\)\) == 0",
16+
# Alternate optional contains patterns,
17+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
1618
# r"Clients that do not support gzip will have their Accept-Encoding header removed\. For more information on how gzip is implemented please see the chapter on gzip in the Varnish reference\.",
1719
]
1820
FILENAME_PATTERNS = [r"varnish"]

cve_bin_tool/checkers/zsh.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ZshChecker(Checker):
1818
CONTAINS_PATTERNS = [
1919
r"zsh: sure you want to delete all %d files in",
2020
r"zsh: sure you want to delete all the files in",
21+
# Alternate optional contains patterns,
22+
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details
2123
# r"--version show zsh version number, then exit",
2224
# r"zsh: sure you want to delete more than %d files in",
2325
# r"zsh: sure you want to delete the only file in",

cve_bin_tool/helper_script.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,13 @@ class HelperScript:
3232

3333
def __init__(
3434
self,
35-
filename: str,
3635
product_name: str | None = None,
3736
version_number: str | None = None,
3837
string_length: int = 40,
3938
):
40-
self.filename = filename
4139
self.extractor: TempDirExtractorContext = Extractor()
42-
self.product_name, self.version_number = self.parse_filename(filename)
43-
if product_name:
44-
self.product_name = product_name
45-
if version_number:
46-
self.version_number = version_number
40+
self.product_name = product_name
41+
self.version_number = version_number
4742
self.string_length = string_length
4843

4944
# for setting the database
@@ -57,14 +52,16 @@ def __init__(
5752
self.contains_patterns: list[str] = []
5853
self.filename_pattern: list[str] = []
5954
self.version_pattern: list[str] = []
60-
self.vendor_product: list[tuple[str, str]] | None = self.find_vendor_product()
55+
self.vendor_product: list[tuple[str, str]] | None = []
6156

6257
# for scanning files versions
6358
self.version_scanner = VersionScanner()
6459

6560
def extract_and_parse_file(self, filename: str) -> list[str] | None:
6661
"""extracts and parses the file for common patterns, version strings and common filename patterns"""
6762

63+
self.parse_filename(filename)
64+
6865
with self.extractor as ectx:
6966
if ectx.can_extract(filename):
7067
binary_string_list: list[str] = []
@@ -175,8 +172,16 @@ def parse_filename(self, filename: str) -> tuple[str, str]:
175172
product_name = filename.rsplit("-", 2)[0]
176173
version_number = filename.rsplit("-", 2)[1]
177174

175+
if not self.product_name:
176+
self.product_name = product_name
177+
178+
if not self.version_number:
179+
self.version_number = version_number
180+
181+
self.vendor_product = self.find_vendor_product()
182+
178183
LOGGER.debug(
179-
f"Parsing file '{self.filename}': Results: product_name='{product_name}', version_number='{version_number}'"
184+
f"Parsing file '{filename}': Results: product_name='{self.product_name}', version_number='{self.version_number}'"
180185
)
181186
return product_name, version_number
182187
else:
@@ -255,7 +260,7 @@ def output_single(self) -> None:
255260
rprint(
256261
textwrap.dedent(
257262
f"""
258-
[bright_black]# Copyright (C) 2021 Intel Corporation
263+
[bright_black]# Copyright (C) 2022 Intel Corporation
259264
# SPDX-License-Identifier: GPL-3.0-or-later[/]
260265
261266
@@ -357,12 +362,11 @@ def scan_files(args) -> None:
357362

358363
hs_list: list[HelperScript] = [
359364
HelperScript(
360-
args["filenames"][x],
361365
product_name=args["product_name"],
362366
version_number=args["version_number"],
363367
string_length=args["string_length"],
364368
)
365-
for x, _ in enumerate(args["filenames"])
369+
for _ in args["filenames"]
366370
]
367371

368372
if len(hs_list) > 1: # more than one files are given - output common strings
@@ -377,8 +381,8 @@ def scan_files(args) -> None:
377381
"VERSION_NUMBER in arguments, common strings may not be found if files have different versions"
378382
)
379383

380-
for hs in hs_list:
381-
hs.extract_and_parse_file(hs.filename)
384+
for i, hs in enumerate(hs_list):
385+
hs.extract_and_parse_file(args["filenames"][i])
382386

383387
common_strings = hs_list[0].contains_patterns
384388

@@ -389,9 +393,8 @@ def scan_files(args) -> None:
389393
HelperScript.output_common(common_strings, hs_list[0].product_name)
390394

391395
else: # one file is given
392-
for hs in hs_list:
393-
hs.extract_and_parse_file(hs.filename)
394-
hs.output_single()
396+
hs_list[0].extract_and_parse_file(args["filenames"][0])
397+
hs_list[0].output_single()
395398

396399

397400
def main(argv=None) -> None:

cve_bin_tool/output_engine/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ def output_pdf(
313313
products_with_cve,
314314
outfile,
315315
merge_report,
316+
exploits: bool = False,
316317
):
317318
LOGGER.warn("PDF output requires install of reportlab")
318319

0 commit comments

Comments
 (0)