Skip to content

Commit 666b4c9

Browse files
committed
feat(checker): add catdoc checker
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent 12f3dec commit 666b4c9

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
@@ -54,6 +54,7 @@
5454
"cairo",
5555
"capnproto",
5656
"captive_portal",
57+
"catdoc",
5758
"ceph",
5859
"cflow",
5960
"chess",

cve_bin_tool/checkers/catdoc.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 catdoc
7+
8+
https://www.cvedetails.com/product/139726/Catdoc-Project-Catdoc.html?vendor_id=30573
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class CatdocChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+)\r?\nCatdoc Version"]
20+
VENDOR_PRODUCT = [("catdoc_project", "catdoc"), ("fossies", "catdoc")]
Binary file not shown.
Binary file not shown.

test/test_data/catdoc.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": "catdoc",
7+
"version": "0.95",
8+
"version_strings": ["0.95\nCatdoc Version"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/c/",
14+
"package_name": "catdoc-0.95-27.fc42.aarch64.rpm",
15+
"product": "catdoc",
16+
"version": "0.95",
17+
},
18+
{
19+
"url": "http://ftp.debian.org/debian/pool/main/c/catdoc/",
20+
"package_name": "catdoc_0.95-4.1_amd64.deb",
21+
"product": "catdoc",
22+
"version": "0.95",
23+
},
24+
]

0 commit comments

Comments
 (0)