ossf/cve-bin-tool

GitHub: ossf/cve-bin-tool

一款能够扫描二进制文件和SBOM清单以识别已知安全漏洞(CVE)的供应链安全分析工具。

Stars: 1636 | Forks: 601

# CVE Binary Tool 快速入门 / README [![Build Status](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/5065754e65223134.svg)](https://github.com/ossf/cve-bin-tool/actions) [![codecov](https://codecov.io/gh/ossf/cve-bin-tool/branch/main/graph/badge.svg)](https://codecov.io/gh/ossf/cve-bin-tool) [![Gitter](https://badges.gitter.im/cve-bin-tool/community.svg)](https://gitter.im/cve-bin-tool/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![On ReadTheDocs](https://readthedocs.org/projects/cve-bin-tool/badge/?version=latest&style=flat)](https://cve-bin-tool.readthedocs.io/en/latest/) [![On PyPI](https://img.shields.io/pypi/v/cve-bin-tool)](https://pypi.org/project/cve-bin-tool/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5380/badge)](https://bestpractices.coreinfrastructure.org/projects/5380) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ossf/cve-bin-tool/badge)](https://securityscorecards.dev/viewer/?uri=github.com/ossf/cve-bin-tool) CVE Binary Tool 是一款免费、开源的工具,旨在利用 [National Vulnerability Database](https://nvd.nist.gov/) (NVD) 的 [Common Vulnerabilities and Exposures]() (CVE) 列表数据,以及来自 [Redhat](https://access.redhat.com/hydra/rest/securitydata)、[Open Source Vulnerability Database (OSV)](https://osv.dev/)、[Gitlab Advisory Database (GAD)](https://advisories.gitlab.com/) 和 [Curl](https://curl.se/docs/vuln.json) 的已知漏洞数据,帮助您发现软件中的已知漏洞。 CVE Binary Tool 使用 NVD API,但未获得 NVD 的认可或认证。 该工具主要有两种运行模式: 1. 二进制扫描器,帮助您确定哪些软件包可能作为软件的一部分被包含在内。目前共有 443 个检查器。我们最初关注的是常见的、易受攻击的开源组件,如 openssl、libpng、libxml2 和 expat。 2. 用于扫描各种格式的已知组件列表的工具,包括 .csv、多种 Linux 发行版软件包列表、特定语言的软件包扫描器以及多种软件物料清单 (SBOM) 格式。 它旨在作为持续集成系统的一部分,以便进行常规漏洞扫描,并针对供应链中的已知问题提供早期预警。它也可用于自动检测组件并生成 SBOM。 CVE Binary Tool 运行时的工作流程: ![Diagram of cve-bin-tool's workflow, described in text with more detail below.](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/f2949c6aa6223136.png) 1. 下载 CVE 数据(来自 NVD、Redhat、OSV、Gitlab 和 Curl)。 - 默认情况下每天发生一次,而不是每次运行扫描时都发生。 - 首次运行时,下载所有数据可能需要一些时间。 2. 创建/读取组件列表。有两种操作模式: 1. 使用二进制检查器和语言组件列表(如 Python 的 requirements.txt)的组合来创建组件列表(包括版本)。 2. 读取 SBOM(使用标准化的软件物料清单格式的现有组件列表)。 3. 创建 CVE 列表 - 这将查找发现或从现有物料清单中读取的所有组件,并报告与其相关的任何已知问题 4. 包含分类/附加数据 - 有多种选项可用于添加分类/注释、来自先前报告的信息以跟踪漏洞随时间的变化,或已知的修复数据 5. 以一种或多种格式生成报告(console, json, csv, html, pdf) 欲了解更多详情,请参阅我们的 [文档](https://cve-bin-tool.readthedocs.io/en/latest/) 或此 [快速入门指南](https://cve-bin-tool.readthedocs.io/en/latest/README.html) - [CVE Binary Tool 快速入门 / README](#cve-binary-tool-quick-start--readme) - [安装 CVE Binary Tool](#installing-cve-binary-tool) - [最常用的使用选项](#most-popular-usage-options) - [使用二进制扫描器查找已知漏洞](#finding-known-vulnerabilities-using-the-binary-scanner) - [扫描 SBOM 文件以查找已知漏洞](#scanning-an-sbom-file-for-known-vulnerabilities) - [生成 SBOM](#generating-an-sbom) - [生成 VEX](#generating-a-vex) - [分类漏洞](#triaging-vulnerabilities) - [离线使用该工具](#using-the-tool-offline) - [在 GitHub Actions 中使用 CVE Binary Tool](#using-cve-binary-tool-in-github-actions) - [输出选项](#output-options) - [配置](#configuration) - [组件自动检测](#auto-detection-of-components) - [二进制检查器列表](#binary-checker-list) - [特定语言检查器](#language-specific-checkers) - [支持的归档格式](#supported-archive-formats) - [附加要求](#additional-requirements) - [局限性](#limitations) - [反馈与贡献](#feedback--contributions) - [安全问题](#security-issues) - [完整选项列表](#full-option-list) ## 安装 CVE Binary Tool CVE Binary Tool 可以使用 pip 安装: ``` pip install cve-bin-tool ``` 如果您想尝试来自 [cve-bin-tool github](https://github.com/ossf/cve-bin-tool) 的最新代码或进行开发,您也可以 `pip install --user -e .` 从目录安装本地副本。[贡献者文档](https://github.com/ossf/cve-bin-tool/blob/main/CONTRIBUTING.md) 更详细地介绍了如何设置本地开发环境。 Pip 会为您安装 Python 依赖项,但对于某些类型的解压缩,我们使用系统库。如果您在解压文件时遇到困难,可以查看我们的 [Linux 和 Windows 附加需求列表](#additional-requirements)。 在首次使用时(默认情况下每天一次),该工具将从 [一组已知漏洞数据源](https://github.com/ossf/cve-bin-tool/blob/main/doc/MANUAL.md#data-sources) 下载漏洞数据。由于 NVD 的可靠性问题,从 3.3 版本开始,我们将默认使用位于 [https://cveb.in/](https://cveb.in/) 的 NVD 镜像,而不是直接访问 NVD。如果您希望直接从 NVD 服务器获取数据,必须 [提供您自己的 NVD_API_KEY](https://github.com/ossf/cve-bin-tool/blob/main/doc/MANUAL.md#--nvd-api-key-nvd_api_key) 才能使用其 API。 如果您使用的是 3.3 之前不使用我们镜像的版本,请按照上述说明使用 NVD_API_KEY。 ## 最常用的使用选项 ### 使用二进制扫描器查找已知漏洞 要在目录或文件上运行二进制扫描器: ``` cve-bin-tool ``` 默认情况下,该工具假定您尝试扫描整个目录,但如果您提供一个列出依赖项的单个 .csv 或 .json 文件,它会将其视为物料清单。您也可以使用 [`--input-file` 选项](https://github.com/ossf/cve-bin-tool/blob/main/doc/MANUAL.md#-i-input_file---input-file-input_file) 直接指定物料清单文件,或按照下面的说明扫描 SBOM。 ### 扫描 SBOM 文件以查找已知漏洞 要扫描软件物料清单文件 (SBOM): ``` cve-bin-tool --sbom --sbom-file ``` 有效的 SBOM 类型为 [SPDX](https://spdx.dev/specifications/)、[CycloneDX](https://cyclonedx.org/specification/overview/) 和 [SWID](https://csrc.nist.gov/projects/software-identification-swid/guidelines)。 SBOM 文件中产品名称的扫描不区分大小写。 [SBOM 扫描操作指南](https://github.com/ossf/cve-bin-tool/blob/main/doc/how_to_guides/sbom.md) 提供了更多 SBOM 扫描示例。 ### 生成 SBOM 除了扫描 SBOM,CVE Binary Tool 还可以通过扫描生成 SBOM,如下所示: ``` cve-bin-tool --sbom-type --sbom-format --sbom-output ``` 有效的 SBOM 类型为 [SPDX](https://spdx.dev/specifications/) 和 [CycloneDX](https://cyclonedx.org/specification/overview/)。 生成的 SBOM 将包含产品名称、版本、供应商(如果有)和证据位置(CycloneDX)。不提供许可证信息。 [SBOM 生成操作指南](https://github.com/ossf/cve-bin-tool/blob/main/doc/how_to_guides/sbom_generation.md) 提供了更多 SBOM 生成示例。 ### 生成 VEX 除了扫描 VEX,CVE Binary Tool 还可以通过扫描生成 VEX,如下所示: ``` cve-bin-tool --vex-type --vex-output ``` 有效的 VEX 类型为 [CSAF](https://oasis-open.github.io/csaf-documentation/)、[CycloneDX](https://cyclonedx.org/capabilities/vex/) 和 [OpenVEX](https://edu.chainguard.dev/open-source/sbom/what-is-openvex/)。 [VEX 生成操作指南](https://github.com/ossf/cve-bin-tool/blob/main/doc/how_to_guides/vex_generation.md) 提供了更多 VEX 生成示例。 ### 分类漏洞 `--vex-file` 选项可用于在扫描目录时添加额外的分类数据(如备注、注释等),以便输出将反映此分类数据,从而节省重新分类的时间(用法:`cve-bin-tool --vex-file test.json /path/to/scan`)。 支持的格式是 [CycloneDX](https://cyclonedx.org/capabilities/vex/)、[CSAF](https://oasis-open.github.io/csaf-documentation/) 和 [OpenVEX](https://edu.chainguard.dev/open-source/sbom/what-is-openvex/) VEX 格式,这些格式可以使用 `--vex-output` 选项生成。 典型用法: 1. 使用 `cve-bin-tool /path/to/scan --vex-output triage.json` 生成分类文件 2. 使用您喜欢的文本编辑器编辑 triage.json,对列出的漏洞提供分类信息。 3. 在未来的扫描中使用此分类文件,如下所示:`cve-bin-tool /path/to/scan --vex-file triage.json` 更详细的使用指南请参考此 [链接](https://cve-bin-tool.readthedocs.io/en/latest/triaging_process.html)。 应该可以在 cve-bin-tool 的不同运行之间或与支持 CycloneDX VEX、OpenVEX 和 CSAF 格式的其他工具共享分类数据。这对于扫描相关产品或容器的团队、出于合规原因需要使用多种工具的团队、拥有提供漏洞分类指导的中央安全策略小组的公司等尤其有用。 ### 离线使用该工具 在运行扫描时指定 `--offline` 选项可确保 cve-bin-tool 不会尝试下载最新的数据库文件或检查该工具的更新版本。 请注意,在工具可以以离线模式运行之前,您需要获取漏洞数据的副本。[离线操作指南包含有关如何设置数据库的更多信息。](https://github.com/ossf/cve-bin-tool/blob/main/doc/how_to_guides/offline.md) ### 在 GitHub Actions 中使用 CVE Binary Tool 如果您想将 cve-bin-tool 集成到您的 github action 流程中,可以使用 cve-bin-tool 的官方 GitHub Action。在 [此处](https://github.com/ossf/cve-bin-tool-action/#cve-binary-tool-github-action) 查找更多详细信息。GitHub Action 在安全选项卡上提供报告,开源项目以及付费访问的 GitHub 客户均可使用该功能。 如果您希望直接使用该工具,我们还提供了一个 [GitHub action](https://github.com/ossf/cve-bin-tool/blob/main/doc/how_to_guides/cve_scanner_gh_action.yml) 示例。对于希望将报告存储在证据库中或无法访问 GitHub 安全选项卡的团队来说,这可能是一个不错的选择。 ## 输出选项 CVE Binary Tool 默认提供基于控制台的输出。如果您希望提供另一种格式,可以使用 `--format` 在命令行中指定格式和文件名。有效格式为 CSV、JSON、JSON2、console、HTML 和 PDF。可以使用 `--output-file` 标志指定输出文件名。 您还可以通过使用逗号 (',') 作为分隔符来指定多种输出格式: ``` cve-bin-tool file -f csv,json,json2,html -o report ``` 注意:在逗号 (',') 和输出格式之间不得使用空格。 报告的漏洞还可以通过指定 `--vex-output` 并使用 `--vex-type` 命令行选项定义类型,以 Vulnerability Exploitability eXchange (VEX) 格式报告。 然后,生成的 VEX 文件可以用作 `--vex-file` 以支持分类过程。 如果您希望使用 PDF 支持,则需要单独安装 `reportlab` 库。 如果您打算在安装 cve-bin-tool 时使用 PDF 支持,可以指定它,reportlab 将作为 cve-bin-tool 安装的一部分进行安装: ``` pip install cve-bin-tool[PDF] ``` 如果您已经安装了 cve-bin-tool,可以在事后使用 pip 添加 reportlab: ``` pip install --upgrade reportlab ``` 请注意,reportlab 已从默认的 cve-bin-tool 安装中移除,因为它有一个已知的 CVE([CVE-2020-28463](https://nvd.nist.gov/vuln/detail/CVE-2020-28463))。cve-bin-tool 代码使用推荐的缓解措施来限制添加到 PDF 的资源,以及额外的输入验证。这是一个有点奇怪的 CVE,因为它描述了 PDF 的核心功能:外部项目(如图像)可以嵌入其中,因此任何查看 PDF 的人都可能加载外部图像(类似于查看网页如何触发外部加载)。对此没有内在的“修复”,只有缓解措施,即库的用户必须确保在生成时仅将预期的项目添加到 PDF 中。 由于用户可能不希望安装带有未解决、无法修复的 CVE 的软件,我们选择仅向自行安装该库的用户提供 PDF 支持。安装该库后,PDF 报告选项将起作用。 ## 配置 您可以使用 `--config` 选项为该工具提供配置文件。您仍然可以使用命令行参数覆盖配置文件中指定的选项。请参阅我们在 [test/config](https://github.com/ossf/cve-bin-tool/blob/main/test/config/) 中的示例配置文件 ## 组件自动检测 CVE Binary Tool 尝试使用二进制检查器、支持的语言组件列表和文件提取方法自动检测组件。下面列出了支持的自动检测工具。 ### 二进制检查器列表 以下检查器可用于查找二进制文件中的组件: | | | | Available checkers | | | | |--------------- |------------- |---------------- |------------------ |-------------- |-------------- |----------------- | | accountsservice |acpid |aomedia |apache_http_server |apcupsd |apparmorapr | | apr_util |asn1c |assimp |asterisk |atftp |augeas |avahi | | axel |bash |bind |binutils |bird |bison |bluez | | boa |boinc |botan |bro |bubblewrap |busybox |bwm_ng | | bzip2 |c_ares |cairo |capnproto |captive_portal |catdoc |ceph | | cflow |chess |chrony |cifs_utils |civetweb |clamav |clang | | cockpit |collectd |commons_compress |connman |coreutils |corosync |cpio | | cpp_httplib |cronie |cryptsetup |cups |cups_filters |curl |cvs | | darkhttpd |dav1d |davfs2 |dbus |dcmtk |debianutils |dhclient | | dhcpcd |dhcpd |djvulibre |dlt_daemon |dmidecode |dnsmasq |docker | | domoticz |dosfstools |dotnet |dovecot |doxygen |dpkg |dropbear | | e2fsprogs |ed |elfutils |emacs |enscript |erlang_otp |exfatprogs | | exiftags |exim |exiv2 |f2fs_tools |faad2 |fastd |fastnetmon | | fetchmail |ffmpeg |file |firefox |firejail |fish |flac | | fluidsynth |freeradius |freerdp |fribidi |frr |fuse |gawk | | gcc |gdal |gdb |gdk_pixbuf |gettext |ghostscript |gimp | | git |glib |glibc |gmp |gnomeshell |gnupg |gnutls | | go |gpgme |gpsd |graphicsmagick |grep |grub2 |gsasl | | gsl |gstreamer |guile |gupnp |gvfs |gzip |haproxy | | harfbuzz |haserl |hdf5 |heimdal |hostapd |hunspell |hwloc | | i2pd |icecast |icu |igmpproxy |imagemagick |indent |inetutils | | iperf3 |ipmitool |ipsec_tools |iptables |iputils |irssi |iucode_tool | | iwd |jack2 |jacksondatabind |jansson |janus |jasper |jbig | | jhead |jq |json_c |kbd |keepalived |kerberos |kexectools | | kodi |kubernetes |ldns |lftp |libarchive |libass |libbpg | | libbson |libcap |libcoap |libconfuse |libcurl |libdb |libde265 | | libebml |libevent |libexpat |libgcrypt |libgd |libgit2 |libheif | | libhtp |libical |libidn |libidn2 |libinput |libjpeg |libjpeg_turbo | | libksba |liblas |liblouis |libmatroska |libmemcached |libmicrohttpd |libmodbus | | libnss |libopenmpt |libpcap |libraw |libreoffice |libreswan |librsvg | | librsync |libsamplerate |libseccomp |libsixel |libsndfile |libsolv |libsoup | | libsrtp |libssh |libssh2 |libtasn1 |libtiff |libtomcrypt |libupnp | | libuv |libvips |libvirt |libvncserver |libvorbis |libvpx |libxslt | | libyaml |libyang |lighttpd |linux_kernel |linuxptp |lldpd |llvm | | logrotate |lrzip |lua |luajit |lxc |lynx |lz4 | | lzo2 |mailx |mariadb |mbedtls |mdadm |memcached |micropython | | minetest |mini_httpd |minicom |minidlna |miniupnpc |miniupnpd |moby | | modsecurity |monit |mosquitto |motion |mp4v2 |mpd |mpg123 | | mpv |msmtp |mtr |mupdf |musl |mutt |mysql | | nano |nasm |nbd |ncurses |neon |nessus |net_snmp | | netatalk |netdata |netkit_ftp |netpbm |nettle |nghttp2 |nginx | | ngircd |nmap |node |ntfs_3g |ntp |ntpsec |oath_toolkit | | ofono |open_babel |open_iscsi |open_vm_tools |openafs |openblas |opencv | | openimageio |openjpeg |openldap |openocd |opensc |openssh |openssl | | openswan |openvpn |openvswitch |orc |p7zip |pango |patch | | pcre |pcre2 |pcsc_lite |perl |php |picocom |pigz | | pixman |pjsip |png |poco |podman |polarssl |poppler | | postgresql |ppp |privoxy |procps_ng |proftpd |protobuf_c |pspp | | pure_ftpd |putty |python |qemu |qpdf |qt |quagga | | radare2 |radvd |raptor |rauc |rdesktop |readline |redis | | rpm |rsync |rsyslog |rtl_433 |rtmpdump |ruby |runc | | rust |samba |sane_backends |sasl |sdl |seahorse |shadowsocks_libev | | snapcast |snapd |sngrep |snort |socat |sofia_sip |speex | | spice |sqlite |squashfs |squid |sslh |sssd |stellarium | | strongswan |stunnel |subversion |sudo |suricata |sylpheed |syslogng | | sysstat |systemd |tar |tbb |tcpdump |tcpreplay |terminology | | tesseract |thrift |thttpd |thunderbird |timescaledb |tinyproxy |tor | | toybox |tpm2_tss |traceroute |traffic_server |transmission |trousers |ttyd | | twonky_server |u_boot |udisks |unbound |unixodbc |upx |util_linux | | uwsgi |varnish |vim |vlc |vorbis_tools |vsftpd |wabt | | wavpack |webkitgtk |wget |wireshark |wolfssl |wpa_supplicant |xerces | | xml2 |xpdf |xrdp |xscreensaver |xwayland |xz |yasm | | zabbix |zbar |zchunk |zeek |zlib |znc |zsh | | zstandard |zziplib | | | | | | 所有检查器都可以在 checkers 目录中找到,那里还有[如何添加新检查器的说明](https://github.com/ossf/cve-bin-tool/blob/main/cve_bin_tool/checkers/README.md)。 可以通过 [GitHub issues](https://github.com/ossf/cve-bin-tool/issues) 请求支持新的检查器。 ### 特定语言检查器 有许多检查器可用于查找特定语言包中的易受攻击组件。 | Language | Files supported | | ------------ | --------------------------------------------------------------- | | Dart | `pubspec.lock` | | Go | `Go.mod` | | Java | `pom.xml`; JAR, WAR and EAR archives | | JavaScript | `package-lock.json`, `yarn.lock` | | OpenWrt opkg | `.control` files | | Perl | `cpanfile` | | Python | `requirements.txt`, `PKG-INFO`, `METADATA`; .whl and .egg files | | Rust | `Cargo.lock` | | Ruby | `Gemfile.lock` | | R | `renv.lock` | | Swift | `Package.resolved` | | Windows PE | `.pyd` files | 有关[特定语言检查器](https://github.com/ossf/cve-bin-tool/blob/main/doc/MANUAL.md#language-specific-checkers)的更多信息,请参阅 [CVE Binary Tool 手册](https://cve-bin-tool.readthedocs.io/en/latest/MANUAL.html)。 ### 支持的归档格式 自动提取器当前支持以下归档格式: | Archive Format | File Extension | | -------------- | ---------------------------------------------- | | zip | .zip, .exe, .jar, .msi, .egg, .whl, .war, .ear | | | .aar | | tar | .tar, .tgz, .tar.gz, .tar.xz, .tar.bz2 | | deb | .deb, .ipk | | rpm | .rpm | | cab | .cab | | apk | .apk | | zst | .zst | | pkg | .pkg | ## 附加要求 要使用自动提取器,根据您需要提取的[支持归档格式](#supported-archive-formats)的类型,您可能需要以下实用程序。 在 Linux 上运行完整测试套件需要以下实用程序: - `file` - `strings` - `tar` - `unzip` - `rpm2cpio` - `cpio` - `ar` - `cabextract` 其中大多数在许多 Linux 系统上默认安装,但 `cabextract` 和 `rpm2cpio` 可能特别需要安装。 在 Windows 系统上,您可能需要: - `ar` - `7z` - `Expand` - `pdftotext` Windows 默认安装了 `Expand`,但 `ar` 和 `7z` 可能需要安装。 如果您想运行我们的测试套件或扫描 zstd 压缩文件,我们建议安装 7zip 的 [7-zip-zstd](https://github.com/mcmilk/7-Zip-zstd) 分支。我们目前使用 `7z` 来提取 `jar`、`apk`、`aar`、`msi`、`exe` 和 `rpm` 文件。 要安装 `ar`,您可以从 [这里](https://www.mingw-w64.org/downloads/#msys2) 安装 MinGW(其中包含 binutils)并运行下载的 .exe 文件。 如果您在尝试从 pip 安装时遇到关于构建库的错误,您可能需要安装 Windows 构建工具。Windows 构建工具可从以下网址免费获取 如果您在 Windows 上安装 brotlipy 时遇到错误,安装上述编译器应该可以修复它。 运行测试需要 `pdftotext`。(cve-bin-tool 的用户可能不需要它,但开发人员可能需要。)在 Windows 上安装它的最好方法是使用 [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html)(点击 [此处](https://anaconda.org/conda-forge/pdftotext) 获取更多说明)。 您可以查看 [我们的 CI 配置](https://github.com/ossf/cve-bin-tool/blob/main/.github/workflows/testing.yml) 以了解我们明确测试的 Python 版本。 ## 局限性 此扫描器不试图利用问题或更详细地检查代码;它只查找库签名和版本号。因此,它无法判断是否有人将修复程序反向移植到了易受攻击的版本,如果库或版本信息被故意混淆,它也将无法工作。 此工具旨在作为一种在非恶意环境中快速运行、易于自动化的检查,以便让开发人员意识到已编译到其二进制文件中的具有安全问题的旧库。 该工具不保证报告的任何漏洞实际上存在或可被利用,也无法保证找到所有存在的漏洞。 用户可以将分类信息添加到报告中,以将问题标记为误报,指出风险已通过配置/使用更改得到缓解等。 分类详细信息可在其他项目中重复使用,因此,例如,对 Linux 基础镜像的分类可以应用于使用该镜像的多个容器。 有关更多信息以及在该工具中使用分类信息,请查看[这里](https://cve-bin-tool.readthedocs.io/en/latest/triaging_process.html)。 如果您使用二进制扫描器功能,请注意我们的二进制检查器数量有限(见上表),因此我们只能检测那些库。随时欢迎贡献新的检查器!您也可以使用另一种方法来检测组件(例如,像 [tern](https://github.com/tern-tools/tern) 这样的物料清单工具),然后将结果列表作为输入提供给 cve-bin-tool,以获得更全面的漏洞列表。 该工具使用漏洞数据库来检测存在的漏洞,如果数据库未经常更新(特别是如果工具在离线模式下使用),该工具将无法检测到任何新发现的漏洞。因此,强烈建议保持数据库更新。 该工具不保证报告所有漏洞,因为该工具只能访问数量有限的公开可用漏洞数据库。 随时欢迎向该工具引入新数据源的贡献。 虽然对漏洞数据库中的数据执行了一些验证检查,但如果数据不完整或不一致,该工具无法断言数据的质量或纠正任何差异。例如,这可能导致某些漏洞报告中的严重性被报告为 UNKNOWN。 ## 反馈与贡献 错误和功能请求可以通过 [GitHub issues](https://github.com/ossf/cve-bin-tool/issues) 提出。请注意,这些问题不是私密的,因此在提供输出时要小心,确保您不会披露其他产品中的安全问题。 也欢迎通过 git 提交 Pull requests。 - 新贡献者应阅读[贡献者指南](https://github.com/ossf/cve-bin-tool/blob/main/CONTRIBUTING.md)以开始使用。 - 已经有向开源项目贡献经验的人可能不需要完整的指南,但仍应使用 [pull request checklist](https://github.com/ossf/cve-bin-tool/blob/main/CONTRIBUTING.md#checklist-for-a-great-pull-request) 以便让大家更轻松。 CVE Binary Tool 贡献者被遵守 [Python Community Code of Conduct](https://www.python.org/psf/conduct/)。如果您有与此行为准则相关的疑虑或问题,请联系 [Terri](https://github.com/terriko/)。 ## 安全问题 工具本身的安全问题可以通过以下方式报告给 Intel 的安全事件响应团队 [https://intel.com/security](https://intel.com/security)。 如果在使用此工具的过程中发现他人代码中的安全问题,请负责地向适当方披露。 ## 完整选项列表 用法: `cve-bin-tool `

options:

  -h, --help            show this help message and exit

  -e EXCLUDE, --exclude EXCLUDE

                        Comma separated Exclude directory path

  -V, --version         show program's version number and exit

  --disable-version-check

                        skips checking for a new version

  --disable-validation-check

                        skips checking xml files against schema

  --offline             operate in offline mode

  --detailed            add CVE description in csv or json report (no effect on console, html or pdf)



CVE Data Download:

  Arguments related to data sources and Cache Configuration



  -n {api,api2,json,json-mirror,json-nvd}, --nvd {api,api2,json,json-mirror,json-nvd}

                        choose method for getting CVE lists from NVD

  -u {now,daily,never,latest}, --update {now,daily,never,latest}

                        update schedule for data sources and exploits database (default: daily)

  --nvd-api-key NVD_API_KEY

                        Specify NVD API key (used to improve NVD rate limit).

                        Set to `no` to ignore any keys in the environment.

  -d DISABLE_DATA_SOURCE, --disable-data-source DISABLE_DATA_SOURCE

                        comma-separated list of data sources (CURL, EPSS, GAD, NVD, OSV, PURL2CPE, REDHAT, RSD) to disable (default: NONE)



  --use-mirror USE_MIRROR

                        use an mirror to update the database



Input:

  directory             directory to scan

  -i INPUT_FILE, --input-file INPUT_FILE

                        provide input filename

  -C CONFIG, --config CONFIG

                        provide config file

  -L PACKAGE_LIST, --package-list PACKAGE_LIST

                        provide package list

  --sbom {spdx,cyclonedx,swid}

                        specify type of software bill of materials (sbom) (default: spdx)

  --sbom-file SBOM_FILE

                        provide sbom filename

  --vex-file VEX_FILE

                        provide vulnerability exploitability exchange (vex) filename for triage processing





Output:

  -q, --quiet           suppress output

  -l {debug,info,warning,error,critical}, --log {debug,info,warning,error,critical}

                        log level (default: info)

  -o OUTPUT_FILE, --output-file OUTPUT_FILE

                        provide output filename (default: output to stdout)

  --html-theme HTML_THEME

                        provide custom theme directory for HTML Report

  -f {csv,json,json2,console,html,pdf}, --format {csv,json,json2,console,html,pdf}

                        update output format (default: console)

                        specify multiple output formats by using comma (',') as a separator

                        note: don't use spaces between comma (',') and the output formats.

  --generate-config {yaml,toml,yaml,toml,toml,yaml}

                        generate config file for cve bin tool in toml and yaml formats.

  -c CVSS, --cvss CVSS  minimum CVSS score (as integer in range 0 to 10) to report (default: 0)

  -S {low,medium,high,critical}, --severity {low,medium,high,critical}

                        minimum CVE severity to report (default: low)

  --metrics             

                        check for metrics (e.g., EPSS) from found cves

  --epss-percentile EPSS_PERCENTILE

                        minimum epss percentile of CVE range between 0 to 100 to report. Automatically enables `--metrics`

  --epss-probability EPSS_PROBABILITY

                        minimum epss probability of CVE range between 0 to 100 to report. Automatically enables `--metrics`

  --no-0-cve-report     only produce report when CVEs are found

  -A [-], --available-fix [-]

                        Lists available fixes of the package from Linux distribution

  -b [-], --backport-fix [-]

                        Lists backported fixes if available from Linux distribution

  --affected-versions   Lists versions of product affected by a given CVE (to facilitate upgrades)

  --sbom-output SBOM_FILE

                        provide software bill of materials (sbom) filename to generate

  --sbom-type {spdx,cyclonedx}

                        specify type of software bill of materials (sbom) to generate (default: spdx)

  --sbom-format {tag,json,yaml}

                        specify format of software bill of materials (sbom) to generate (default: tag)

  --strip-scan-dir      strip scan directory from sbom evidence location paths and CVE paths (useful with a firmware dump)



Vex Output:

  Arguments related to Vex output document.



  --vex-ouptput VEX_FILE

                        Provide vulnerability exploitability exchange (vex) filename to generate

  --vex-type {cyclonedx, csaf, openvex}

                        specify type of vulnerability exploitability exchange (vex) to generate (default: cyclonedx)

  --product PRODUCT     Product Name

  --release RELEASE     Release Version

  --vendor VENDOR       Vendor/Supplier of Product

  -rr REVISION_REASON, --revision-reason REVISION_REASON

                        a reason for the update to the vex document should be specified in double quotes

  --filter-triage       Filter cves based on triage data from Vex file



Merge Report:

  Arguments related to Intermediate and Merged Reports



  -a [APPEND], --append [APPEND]

                        save output as intermediate report in json format

  -t TAG, --tag TAG     add a unique tag to differentiate between multiple intermediate reports

  -m MERGE, --merge MERGE

                        comma separated intermediate reports path for merging

  -F FILTER, --filter FILTER

                        comma separated tag string for filtering intermediate reports



Checkers:

  -s SKIPS, --skips SKIPS

                        comma-separated list of checkers to disable

  -r RUNS, --runs RUNS  comma-separated list of checkers to enable



Database Management:

  --import-json IMPORT_JSON

                        import database from json files chopped by years

  --ignore-sig          do not verify PGP signature while importing json data

  --log-signature-error

                        when the signature doesn't match log the error only instead of halting (UNSAFE)

  --verify PGP_PUBKEY_PATH

                        verify PGP sign while importing json files

  --export-json EXPORT_JSON

                        export database as json files chopped by years

  --pgp-sign PGP_PRIVATE_KEY_PATH

                        sign exported json files with PGP

  --passphrase PASSPHRASE

                        required passphrase for signing with PGP

  --export EXPORT       export database filename

  --import IMPORT       import database filename



Exploits:

  --exploits            check for exploits from found cves



Deprecated:

  --triage-input-file TRIAGE_INPUT_FILE

                        replaced by --vex-file

  -x, --extract         autoextract compressed files

  --report              Produces a report even if there are no CVE for the respective output format

有关所有这些选项的更多信息,请参阅 [CVE Binary Tool 用户手册](https://cve-bin-tool.readthedocs.io/en/latest/MANUAL.html)。
标签:Claude, CVE检测, DevSecOps, GPT, meg, NVD, Python, SBOM, 上游代理, 二进制分析, 云安全监控, 云安全运维, 信息安全, 文档安全, 无后门, 漏洞管理, 版本核查, 硬件无关, 逆向工具, 配置审计, 静态分析