Skip to content

Commit 6a07a2a

Browse files
authored
feat(checker): add udisks checker (#2999)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 062b2a7 commit 6a07a2a

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
@@ -294,6 +294,7 @@
294294
"transmission",
295295
"trousers",
296296
"u_boot",
297+
"udisks",
297298
"unbound",
298299
"unixodbc",
299300
"upx",

cve_bin_tool/checkers/udisks.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for udisks
7+
8+
https://www.cvedetails.com/product/19087/Freedesktop-Udisks.html?vendor_id=7971
9+
https://www.cvedetails.com/product/62239/Udisks-Project-Udisks.html?vendor_id=21042
10+
11+
"""
12+
from __future__ import annotations
13+
14+
from cve_bin_tool.checkers import Checker
15+
16+
17+
class UdisksChecker(Checker):
18+
CONTAINS_PATTERNS: list[str] = []
19+
FILENAME_PATTERNS: list[str] = []
20+
VERSION_PATTERNS = [r"udisks2-([0-9]+\.[0-9]+\.[0-9]+)"]
21+
VENDOR_PRODUCT = [("freedesktop", "udisks"), ("udisks_project", "udisks")]
Binary file not shown.
Binary file not shown.

test/test_data/udisks.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "udisks", "version": "2.8.1", "version_strings": ["udisks2-2.8.1"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/openmandriva/cooker/repository/aarch64/main/release/",
10+
"package_name": "udisks-2.9.4-5-omv4090.aarch64.rpm",
11+
"product": "udisks",
12+
"version": "2.9.4",
13+
},
14+
{
15+
"url": "http://ftp.fr.debian.org/debian/pool/main/u/udisks2/",
16+
"package_name": "udisks2_2.8.1-4_amd64.deb",
17+
"product": "udisks",
18+
"version": "2.8.1",
19+
},
20+
]

0 commit comments

Comments
 (0)