Skip to content

Commit eb8be8f

Browse files
committed
feat(checker): add mini_httpd checker
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 6e807b1 commit eb8be8f

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
"mariadb",
172172
"mdadm",
173173
"memcached",
174+
"mini_httpd",
174175
"minicom",
175176
"minidlna",
176177
"miniupnpc",

cve_bin_tool/checkers/mini_httpd.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for mini_httpd
7+
8+
https://www.cvedetails.com/product/18643/Acme-Mini-Httpd.html?vendor_id=10442
9+
https://www.cvedetails.com/product/70152/Acme-Mini-httpd.html?vendor_id=10442
10+
11+
"""
12+
from __future__ import annotations
13+
14+
from cve_bin_tool.checkers import Checker
15+
16+
17+
class MiniHttpdChecker(Checker):
18+
CONTAINS_PATTERNS: list[str] = []
19+
FILENAME_PATTERNS: list[str] = []
20+
VERSION_PATTERNS = [r"mini_httpd/([0-9]+\.[0-9]+)"]
21+
VENDOR_PRODUCT = [("acme", "mini_httpd"), ("acme", "mini-httpd")]
Binary file not shown.
Binary file not shown.

test/test_data/mini_httpd.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "mini_httpd", "version": "1.30", "version_strings": ["mini_httpd/1.30"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://dl-cdn.alpinelinux.org/alpine/v3.18/main/aarch64/",
10+
"package_name": "mini_httpd-1.30-r5.apk",
11+
"product": "mini_httpd",
12+
"version": "1.30",
13+
},
14+
{
15+
"url": "http://ftp.fr.debian.org/debian/pool/main/m/mini-httpd/",
16+
"package_name": "mini-httpd_1.30-0.2_amd64.deb",
17+
"product": "mini_httpd",
18+
"version": "1.30",
19+
},
20+
]

0 commit comments

Comments
 (0)