Skip to content

Commit 8c59e6c

Browse files
Merge branch 'main' into fix--test_source_osv
2 parents 17a16a9 + 20e33f6 commit 8c59e6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1018
-904
lines changed

.github/actions/spelling/allow.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ msmtp
480480
msys
481481
mtr
482482
mupdf
483+
musl
483484
mutt
484485
myapp
485486
myappvendor
@@ -817,6 +818,7 @@ wsl
817818
www
818819
wzao
819820
Xchange
821+
XDG
820822
XDRAGON
821823
xerces
822824
Xiph

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
# Initializes the CodeQL tools for scanning.
5353
- name: Initialize CodeQL
54-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
54+
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
5555
with:
5656
languages: ${{ matrix.language }}
5757
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -76,4 +76,4 @@ jobs:
7676
# make release
7777

7878
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
79+
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19

.github/workflows/fuzzing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
PYTHONPATH: ${{ github.workspace }}
9696
run: |
9797
cd fuzz
98-
export PYTHONPATH="$PYTHONPATH:/generated"
98+
export PYTHONPATH="$PYTHONPATH:./generated"
9999
fuzzing_scripts=($(ls *.py))
100100
echo "Found Fuzzing scripts: ${fuzzing_scripts[@]}"
101101
current_week=($(date -u +%U))

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ jobs:
847847
path: ~/conda_pkgs_dir
848848
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
849849
hashFiles('requirements.txt') }}
850-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
850+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
851851
with:
852852
auto-update-conda: true
853853
activate-environment: pdftotext

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ CVE Binary Tool uses the NVD API but is not endorsed or certified by the NVD.
1616

1717
The tool has two main modes of operation:
1818

19-
1. A binary scanner which helps you determine which packages may have been included as part of a piece of software. There are <!-- NUMBER OF CHECKERS START-->408<!--NUMBER OF CHECKERS END--> checkers. Our initial focus was on common, vulnerable open source components such as openssl, libpng, libxml2 and expat.
19+
1. A binary scanner which helps you determine which packages may have been included as part of a piece of software. There are <!-- NUMBER OF CHECKERS START-->409<!--NUMBER OF CHECKERS END--> checkers. Our initial focus was on common, vulnerable open source components such as openssl, libpng, libxml2 and expat.
2020

2121
2. Tools for scanning known component lists in various formats, including .csv, several linux distribution package lists, language specific package scanners and several Software Bill of Materials (SBOM) formats.
2222

@@ -226,7 +226,7 @@ The following checkers are available for finding components in binary files:
226226

227227
<!--CHECKERS TABLE BEGIN-->
228228
| | | | Available checkers | | | |
229-
|--------------- |------------- |------------------ |---------------- |--------------- |----------------- |------------- |
229+
|--------------- |-------------- |------------------ |---------------- |-------------- |--------------- |----------------- |
230230
| accountsservice |acpid |apache_http_server |apcupsd |apparmor |apr |asn1c |
231231
| assimp |asterisk |atftp |augeas |avahi |axel |bash |
232232
| bind |binutils |bird |bison |bluez |boa |boinc |
@@ -262,30 +262,30 @@ The following checkers are available for finding components in binary files:
262262
| lzo2 |mailx |mariadb |mbedtls |mdadm |memcached |micropython |
263263
| minetest |mini_httpd |minicom |minidlna |miniupnpc |miniupnpd |moby |
264264
| modsecurity |monit |mosquitto |motion |mp4v2 |mpg123 |mpv |
265-
| msmtp |mtr |mupdf |mutt |mysql |nano |nasm |
266-
| nbd |ncurses |neon |nessus |netatalk |netdata |netkit_ftp |
267-
| netpbm |nettle |nghttp2 |nginx |ngircd |nmap |node |
268-
| ntfs_3g |ntp |ntpsec |oath_toolkit |ofono |open_iscsi |open_vm_tools |
269-
| openafs |openblas |opencv |openjpeg |openldap |opensc |openssh |
270-
| openssl |openswan |openvpn |openvswitch |orc |p7zip |pango |
271-
| patch |pcre |pcre2 |pcsc_lite |perl |php |picocom |
272-
| pigz |pixman |pjsip |png |polarssl_fedora |poppler |postgresql |
273-
| ppp |privoxy |procps_ng |proftpd |protobuf_c |pspp |pure_ftpd |
274-
| putty |python |qemu |qpdf |qt |quagga |radare2 |
275-
| radvd |raptor |rauc |rdesktop |readline |redis |rpm |
276-
| rsync |rsyslog |rtl_433 |rtmpdump |ruby |runc |rust |
277-
| samba |sane_backends |sasl |sdl |seahorse |shadowsocks_libev |snapd |
278-
| sngrep |snort |socat |sofia_sip |speex |spice |sqlite |
279-
| squashfs |squid |sslh |stellarium |strongswan |stunnel |subversion |
280-
| sudo |suricata |sylpheed |syslogng |sysstat |systemd |tar |
281-
| tbb |tcpdump |tcpreplay |terminology |tesseract |thrift |thttpd |
282-
| thunderbird |timescaledb |tinyproxy |tor |toybox |tpm2_tss |traceroute |
283-
| transmission |trousers |ttyd |twonky_server |u_boot |udisks |unbound |
284-
| unixodbc |upx |util_linux |uwsgi |varnish |vim |vlc |
285-
| vorbis_tools |vsftpd |wavpack |webkitgtk |wget |wireshark |wolfssl |
286-
| wpa_supplicant |xerces |xml2 |xpdf |xscreensaver |xwayland |xz |
287-
| yasm |zabbix |zbar |zchunk |zeek |zlib |znc |
288-
| zsh |zstandard | | | | | |
265+
| msmtp |mtr |mupdf |musl |mutt |mysql |nano |
266+
| nasm |nbd |ncurses |neon |nessus |netatalk |netdata |
267+
| netkit_ftp |netpbm |nettle |nghttp2 |nginx |ngircd |nmap |
268+
| node |ntfs_3g |ntp |ntpsec |oath_toolkit |ofono |open_iscsi |
269+
| open_vm_tools |openafs |openblas |opencv |openjpeg |openldap |opensc |
270+
| openssh |openssl |openswan |openvpn |openvswitch |orc |p7zip |
271+
| pango |patch |pcre |pcre2 |pcsc_lite |perl |php |
272+
| picocom |pigz |pixman |pjsip |png |polarssl_fedora |poppler |
273+
| postgresql |ppp |privoxy |procps_ng |proftpd |protobuf_c |pspp |
274+
| pure_ftpd |putty |python |qemu |qpdf |qt |quagga |
275+
| radare2 |radvd |raptor |rauc |rdesktop |readline |redis |
276+
| rpm |rsync |rsyslog |rtl_433 |rtmpdump |ruby |runc |
277+
| rust |samba |sane_backends |sasl |sdl |seahorse |shadowsocks_libev |
278+
| snapd |sngrep |snort |socat |sofia_sip |speex |spice |
279+
| sqlite |squashfs |squid |sslh |stellarium |strongswan |stunnel |
280+
| subversion |sudo |suricata |sylpheed |syslogng |sysstat |systemd |
281+
| tar |tbb |tcpdump |tcpreplay |terminology |tesseract |thrift |
282+
| thttpd |thunderbird |timescaledb |tinyproxy |tor |toybox |tpm2_tss |
283+
| traceroute |transmission |trousers |ttyd |twonky_server |u_boot |udisks |
284+
| unbound |unixodbc |upx |util_linux |uwsgi |varnish |vim |
285+
| vlc |vorbis_tools |vsftpd |wavpack |webkitgtk |wget |wireshark |
286+
| wolfssl |wpa_supplicant |xerces |xml2 |xpdf |xscreensaver |xwayland |
287+
| xz |yasm |zabbix |zbar |zchunk |zeek |zlib |
288+
| znc |zsh |zstandard | | | | |
289289
<!--CHECKERS TABLE END-->
290290

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

cve_bin_tool/available_fix/debian_cve_tracker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
from __future__ import annotations
55

66
from json import dump, load
7-
from pathlib import Path
87
from time import time
98

109
from cve_bin_tool.cve_scanner import CVEData
10+
from cve_bin_tool.database_defaults import DISK_LOCATION_DEFAULT
1111
from cve_bin_tool.log import LOGGER
1212
from cve_bin_tool.output_engine.util import ProductInfo, format_output
1313
from cve_bin_tool.util import make_http_requests
1414

1515
JSON_URL = "https://security-tracker.debian.org/tracker/data/json"
16-
DEB_CVE_JSON_PATH = (
17-
Path("~").expanduser() / ".cache" / "cve-bin-tool" / "debian_cve_data.json"
18-
)
16+
DEB_CVE_JSON_PATH = DISK_LOCATION_DEFAULT / "debian_cve_data.json"
1917

2018
UBUNTU_DEBIAN_MAP = {
2119
"hirsute": "bullseye",

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
"msmtp",
272272
"mtr",
273273
"mupdf",
274+
"musl",
274275
"mutt",
275276
"mysql",
276277
"nano",

cve_bin_tool/checkers/musl.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for musl
7+
8+
https://www.cvedetails.com/product/39652/Musl-libc-Musl.html?vendor_id=16859
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class MuslChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [
20+
r"([0-9]+\.[0-9]+\.[0-9]+)[ -~\t\r\n]*MUSL_LOCPATH",
21+
r"musl libc[ -~\t\r\n]*\r?\n([0-9]+\.[0-9]+\.[0-9]+)",
22+
]
23+
VENDOR_PRODUCT = [("musl-libc", "musl")]

cve_bin_tool/cli.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from cve_bin_tool.config import ConfigParser
4343
from cve_bin_tool.config_generator import config_generator
4444
from cve_bin_tool.cve_scanner import CVEScanner
45-
from cve_bin_tool.cvedb import CVEDB, OLD_CACHE_DIR
45+
from cve_bin_tool.cvedb import CVEDB
4646
from cve_bin_tool.data_sources import (
4747
DataSourceSupport,
4848
curl_source,
@@ -53,6 +53,7 @@
5353
purl2cpe_source,
5454
redhat_source,
5555
)
56+
from cve_bin_tool.database_defaults import OLD_CACHE_DIR
5657
from cve_bin_tool.error_handler import (
5758
ERROR_CODES,
5859
CVEDataMissing,
@@ -353,6 +354,9 @@ def main(argv=None):
353354
help="strip scan directory from sbom evidence location paths and CVE paths (useful with a firmware dump)",
354355
default=False,
355356
)
357+
output_group.add_argument(
358+
"--no-scan", action="store_true", help="No-Scan Mode", default=False
359+
)
356360
vex_output_group = parser.add_argument_group(
357361
"Vex Output", "Arguments related to Vex output document."
358362
)
@@ -1121,6 +1125,7 @@ def main(argv=None):
11211125
error_mode=error_mode,
11221126
validate=not args["disable_validation_check"],
11231127
sources=enabled_sources,
1128+
no_scan=args["no_scan"],
11241129
)
11251130
version_scanner.remove_skiplist(skips)
11261131
LOGGER.info(f"Number of checkers: {version_scanner.number_of_checkers()}")
@@ -1137,19 +1142,24 @@ def main(argv=None):
11371142
for scan_info in version_scanner.recursive_scan(args["directory"]):
11381143
if scan_info:
11391144
product_info, path = scan_info
1140-
LOGGER.debug(f"{product_info}: {path}")
1145+
LOGGER.debug(f"Product Info: {product_info}, Path: {path}")
11411146
# add product_info to parsed_data to check for with vex file
11421147
if product_info in parsed_data:
11431148
# update the paths in triage_data with the new path
11441149
triage_data = parsed_data[product_info]
1150+
LOGGER.debug("Product info in parsed data")
1151+
LOGGER.debug(f"Triage Data: {triage_data}")
11451152
triage_data["paths"].add(path)
11461153
else:
11471154
# create a new entry if product_info not in parsed_data
1155+
LOGGER.debug("Product info not in parsed data")
11481156
triage_data = {"default": {}, "paths": {path}}
1157+
LOGGER.debug(f"Triage Data: {triage_data}")
11491158
parsed_data[product_info] = triage_data
11501159

11511160
cve_scanner.get_cves(product_info, triage_data)
11521161
total_files = version_scanner.total_scanned_files
1162+
LOGGER.info(f"Total files: {total_files}")
11531163

11541164
if args["merge"]:
11551165
cve_scanner = merge_cve_scanner

cve_bin_tool/cve_scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from rich.console import Console
1313

14-
from cve_bin_tool.cvedb import DBNAME, DISK_LOCATION_DEFAULT
14+
from cve_bin_tool.database_defaults import DBNAME, DISK_LOCATION_DEFAULT
1515
from cve_bin_tool.error_handler import ErrorMode
1616
from cve_bin_tool.input_engine import TriageData
1717
from cve_bin_tool.log import LOGGER

0 commit comments

Comments
 (0)