Skip to content

Commit

Permalink
feat(checker): add traceroute checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Nov 5, 2023
1 parent c4ec1fa commit b32f8e3
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@
"tinyproxy",
"tor",
"tpm2_tss",
"traceroute",
"transmission",
"trousers",
"twonky_server",
Expand Down
22 changes: 22 additions & 0 deletions cve_bin_tool/checkers/traceroute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for traceroute
https://www.cvedetails.com/product/163596/BUC-Traceroute.html?vendor_id=33432
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class TracerouteChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"Modern traceroute for Linux, version ([0-9]+\.[0-9]+\.[0-9]+)"
]
VENDOR_PRODUCT = [("buc", "traceroute")]
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions test/test_data/traceroute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "traceroute",
"version": "2.1.0",
"version_strings": ["Modern traceroute for Linux, version 2.1.0"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/t/",
"package_name": "traceroute-2.1.3-1.fc40.aarch64.rpm",
"product": "traceroute",
"version": "2.1.3",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/t/traceroute/",
"package_name": "traceroute_2.1.0-2_amd64.deb",
"product": "traceroute",
"version": "2.1.0",
},
]

0 comments on commit b32f8e3

Please sign in to comment.