diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 54713aa239..880879e59f 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -72,6 +72,7 @@ "dhclient", "dhcpcd", "dhcpd", + "dlt_daemon", "dmidecode", "dnsmasq", "docker", diff --git a/cve_bin_tool/checkers/dlt_daemon.py b/cve_bin_tool/checkers/dlt_daemon.py new file mode 100644 index 0000000000..9726d37dde --- /dev/null +++ b/cve_bin_tool/checkers/dlt_daemon.py @@ -0,0 +1,22 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for dlt-daemon + +https://www.cvedetails.com/product/136117/Covesa-Dlt-daemon.html?vendor_id=29885 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class DltDaemonChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [ + r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n[A-Za-z0-9+_:%(), \[\]\.\-\r\n]*DLT(?:_| Package Version)" + ] + VENDOR_PRODUCT = [("covesa", "dlt-daemon")] diff --git a/test/condensed-downloads/dlt-daemon_2.18.0-1_amd64.deb.tar.gz b/test/condensed-downloads/dlt-daemon_2.18.0-1_amd64.deb.tar.gz new file mode 100644 index 0000000000..c65998553e Binary files /dev/null and b/test/condensed-downloads/dlt-daemon_2.18.0-1_amd64.deb.tar.gz differ diff --git a/test/condensed-downloads/dlt-daemon_2.18.8-6_arm64.deb.tar.gz b/test/condensed-downloads/dlt-daemon_2.18.8-6_arm64.deb.tar.gz new file mode 100644 index 0000000000..3b06477a14 Binary files /dev/null and b/test/condensed-downloads/dlt-daemon_2.18.8-6_arm64.deb.tar.gz differ diff --git a/test/test_data/dlt_daemon.py b/test/test_data/dlt_daemon.py new file mode 100644 index 0000000000..d71a22c680 --- /dev/null +++ b/test/test_data/dlt_daemon.py @@ -0,0 +1,20 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + {"product": "dlt-daemon", "version": "2.18.0", "version_strings": ["2.18.0\nDLT_"]} +] +package_test_data = [ + { + "url": "http://ftp.debian.org/debian/pool/main/d/dlt-daemon/", + "package_name": "dlt-daemon_2.18.0-1_amd64.deb", + "product": "dlt-daemon", + "version": "2.18.0", + }, + { + "url": "http://ftp.debian.org/debian/pool/main/d/dlt-daemon/", + "package_name": "dlt-daemon_2.18.8-6_arm64.deb", + "product": "dlt-daemon", + "version": "2.18.8", + }, +]