Skip to content

Commit 0fe09e2

Browse files
committed
feat(checker): add ttyd checker
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 2e1b844 commit 0fe09e2

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@
343343
"traceroute",
344344
"transmission",
345345
"trousers",
346+
"ttyd",
346347
"twonky_server",
347348
"u_boot",
348349
"udisks",

cve_bin_tool/checkers/ttyd.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2024 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for ttyd
7+
8+
https://www.cvedetails.com/product/135838/Ttyd-Project-Ttyd.html?vendor_id=29796
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class TtydChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[a-z\n\n]*ttyd"]
20+
VENDOR_PRODUCT = [("ttyd_project", "ttyd")]
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/ttyd.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2024 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "ttyd", "version": "1.6.3", "version_strings": ["1.6.3\nttyd"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/opensuse/ports/aarch64/tumbleweed/repo/oss/aarch64/",
10+
"package_name": "ttyd-1.7.4-1.3.aarch64.rpm",
11+
"product": "ttyd",
12+
"version": "1.7.4",
13+
},
14+
{
15+
"url": "http://ftp.fr.debian.org/debian/pool/main/t/ttyd/",
16+
"package_name": "ttyd_1.6.3-3~bpo11+1_amd64.deb",
17+
"product": "ttyd",
18+
"version": "1.6.3",
19+
},
20+
{
21+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
22+
"package_name": "ttyd_1.5.2-2_x86_64.ipk",
23+
"product": "ttyd",
24+
"version": "1.5.2",
25+
},
26+
]

0 commit comments

Comments
 (0)