Skip to content

Commit ab1c4fd

Browse files
authored
feat(checker): add opennds captive_portal checker (#5152)
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 822061e commit ab1c4fd

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"c_ares",
5454
"cairo",
5555
"capnproto",
56+
"captive_portal",
5657
"ceph",
5758
"cflow",
5859
"chess",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for captive_portal
7+
8+
https://www.cvedetails.com/product/165110/Opennds-Captive-Portal.html?vendor_id=33688
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class CaptivePortalChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"openNDS version ([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("opennds", "captive_portal")]
Binary file not shown.
Binary file not shown.

test/test_data/captive_portal.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "captive_portal",
7+
"version": "9.7.0",
8+
"version_strings": ["openNDS version 9.7.0"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://ftp.debian.org/debian/pool/main/o/opennds/",
14+
"package_name": "opennds-daemon_9.7.0-3~bpo11+1_amd64.deb",
15+
"product": "captive_portal",
16+
"version": "9.7.0",
17+
},
18+
{
19+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/routing/",
20+
"package_name": "opennds_5.2.0-1_x86_64.ipk",
21+
"product": "captive_portal",
22+
"version": "5.2.0",
23+
},
24+
]

0 commit comments

Comments
 (0)