Skip to content

Commit 9b17fc7

Browse files
authored
feat(checker): add corosync checker (intel#5158)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 019d1e0 commit 9b17fc7

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"commons_compress",
6666
"connman",
6767
"coreutils",
68+
"corosync",
6869
"cpio",
6970
"cpp_httplib",
7071
"cronie",

cve_bin_tool/checkers/corosync.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 corosync
7+
8+
https://www.cvedetails.com/product/27835/Corosync-Corosync.html?vendor_id=13388
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class CorosyncChecker(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]*corosync"]
20+
VENDOR_PRODUCT = [("corosync", "corosync")]
Binary file not shown.
Binary file not shown.

test/test_data/corosync.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+
mapping_test_data = [
5+
{"product": "corosync", "version": "3.1.9", "version_strings": ["3.1.9\ncorosync"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/c/",
10+
"package_name": "corosync-3.1.9-3.fc43.aarch64.rpm",
11+
"product": "corosync",
12+
"version": "3.1.9",
13+
},
14+
{
15+
"url": "http://ftp.debian.org/debian/pool/main/c/corosync/",
16+
"package_name": "corosync_3.0.1-2+deb10u1_amd64.deb",
17+
"product": "corosync",
18+
"version": "3.0.1",
19+
},
20+
]

0 commit comments

Comments
 (0)