Skip to content

Commit 2ef0827

Browse files
authored
feat(checker): add libreoffice checker (#4784)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent df2e5f9 commit 2ef0827

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
@@ -198,6 +198,7 @@
198198
"libopenmpt",
199199
"libpcap",
200200
"libraw",
201+
"libreoffice",
201202
"librsvg",
202203
"librsync",
203204
"libsamplerate",

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

test/test_data/libreoffice.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": "libreoffice",
7+
"version": "6.1.5",
8+
"version_strings": ["libreoffice-6.1.5"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://ftp.debian.org/debian/pool/main/libr/libreoffice/",
14+
"package_name": "libreoffice-base-core_6.1.5-3+deb10u7_amd64.deb",
15+
"product": "libreoffice",
16+
"version": "6.1.5",
17+
},
18+
{
19+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86/",
20+
"package_name": "libreoffice-base-6.3.2.2-r3.apk",
21+
"product": "libreoffice",
22+
"version": "6.3.2.2",
23+
},
24+
]

0 commit comments

Comments
 (0)