Skip to content

Commit c024705

Browse files
authored
feat(checker): add ofono checker (#4996)
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 4e7e1f3 commit c024705

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
"ntp",
293293
"ntpsec",
294294
"oath_toolkit",
295+
"ofono",
295296
"open_iscsi",
296297
"open_vm_tools",
297298
"openafs",

cve_bin_tool/checkers/ofono.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for ofono
7+
8+
https://www.cvedetails.com/product/171650/Ofono-Project-Ofono.html?vendor_id=35263
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class OfonoChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [
20+
r"OFONO_[0-9a-zA-Z:'%=+?,-_/!$*>^ \.\"\(\)\r\n]*\r?\n([0-9]+\.[0-9]+)\r?\n"
21+
]
22+
VENDOR_PRODUCT = [("ofono_project", "ofono")]
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/ofono.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "ofono", "version": "1.21", "version_strings": ["OFONO_LABEL\n1.21"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/o/",
10+
"package_name": "ofono-2.16-1.fc43.aarch64.rpm",
11+
"product": "ofono",
12+
"version": "2.16",
13+
},
14+
{
15+
"url": "http://ftp.debian.org/debian/pool/main/o/ofono/",
16+
"package_name": "ofono_1.21-1_amd64.deb",
17+
"product": "ofono",
18+
"version": "1.21",
19+
},
20+
{
21+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/",
22+
"package_name": "ofono-1.34-r0.apk",
23+
"product": "ofono",
24+
"version": "1.34",
25+
},
26+
]

0 commit comments

Comments
 (0)