Skip to content

Commit 7734a1a

Browse files
authored
feat(checker): add xwayland checker (#3591)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent a74d1ad commit 7734a1a

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
@@ -341,6 +341,7 @@
341341
"xerces",
342342
"xml2",
343343
"xscreensaver",
344+
"xwayland",
344345
"yasm",
345346
"zabbix",
346347
"zchunk",

cve_bin_tool/checkers/xwayland.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+
5+
"""
6+
CVE checker for xwayland
7+
8+
https://www.cvedetails.com/product/163618/X.org-Xwayland.html?vendor_id=88
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class XwaylandChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[a-zA-Z. \r\n]*%s Xwayland"]
20+
VENDOR_PRODUCT = [("x.org", "xwayland")]
84.6 KB
Binary file not shown.
245 KB
Binary file not shown.

test/test_data/xwayland.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "xwayland",
7+
"version": "22.1.9",
8+
"version_strings": ["22.1.9\n%s Xwayland"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://rpmfind.net/linux/opensuse/ports/aarch64/tumbleweed/repo/oss/aarch64/",
14+
"package_name": "xwayland-23.2.2-2.1.aarch64.rpm",
15+
"product": "xwayland",
16+
"version": "23.2.2",
17+
},
18+
{
19+
"url": "http://ftp.fr.debian.org/debian/pool/main/x/xwayland/",
20+
"package_name": "xwayland_22.1.9-1_amd64.deb",
21+
"product": "xwayland",
22+
"version": "22.1.9",
23+
},
24+
]

0 commit comments

Comments
 (0)