Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(checker): add dlt-daemon #4513

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"dhclient",
"dhcpcd",
"dhcpd",
"dlt_daemon",
"dmidecode",
"dnsmasq",
"docker",
Expand Down
22 changes: 22 additions & 0 deletions cve_bin_tool/checkers/dlt_daemon.py
Original file line number Diff line number Diff line change
@@ -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")]
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions test/test_data/dlt_daemon.py
Original file line number Diff line number Diff line change
@@ -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",
},
]
Loading