Skip to content

Commit 2b49ce9

Browse files
committed
feat(checker): add dcmtk checker
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 3982edd commit 2b49ce9

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
@@ -77,6 +77,7 @@
7777
"darkhttpd",
7878
"dav1d",
7979
"davfs2",
80+
"dcmtk",
8081
"dbus",
8182
"debianutils",
8283
"dhclient",

cve_bin_tool/checkers/dcmtk.py

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 dcmtk
7+
8+
https://www.cvedetails.com/product/27867/Offis-Dcmtk.html?vendor_id=13397
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class DcmtkChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"dcmtk-([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("offis", "dcmtk")]
Binary file not shown.
Binary file not shown.

test/test_data/dcmtk.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "dcmtk", "version": "3.6.4", "version_strings": ["dcmtk-3.6.4"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/d/",
10+
"package_name": "dcmtk-3.6.9-2.fc43.aarch64.rpm",
11+
"product": "dcmtk",
12+
"version": "3.6.9",
13+
"other_products": ["libjpeg"],
14+
},
15+
{
16+
"url": "http://ftp.debian.org/debian/pool/main/d/dcmtk/",
17+
"package_name": "dcmtk_3.6.4-2.1_amd64.deb",
18+
"product": "dcmtk",
19+
"version": "3.6.4",
20+
},
21+
]

0 commit comments

Comments
 (0)