Skip to content

Commit 581ffcb

Browse files
authored
feat(checker): add cockpit checker (#5560)
Fix #5470 Signed-off-by: Fontaine Fabrice <fabrice.fontaine@orange.com>
1 parent 63659d3 commit 581ffcb

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
@@ -62,6 +62,7 @@
6262
"civetweb",
6363
"clang",
6464
"clamav",
65+
"cockpit",
6566
"collectd",
6667
"commons_compress",
6768
"connman",

cve_bin_tool/checkers/cockpit.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2026 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for cockpit
7+
8+
https://www.cvedetails.com/product/52480/Cockpit-project-Cockpit.html?vendor_id=19705
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class CockpitChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"\r?\n([0-9]+)\r?\n[a-zA-Z0-9/:%_ \.\-\r\n]*cockpit"]
20+
VENDOR_PRODUCT = [("cockpit-project", "cockpit")]
Binary file not shown.
71.3 KB
Binary file not shown.

test/test_data/cockpit.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2026 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "cockpit", "version": "239", "version_strings": ["239\ncockpit"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "https://www.rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/c/",
10+
"package_name": "cockpit-ws-356-1.fc45.aarch64.rpm",
11+
"product": "cockpit",
12+
"version": "356",
13+
},
14+
{
15+
"url": "http://ftp.debian.org/debian/pool/main/c/cockpit/",
16+
"package_name": "cockpit-ws_239-1_amd64.deb",
17+
"product": "cockpit",
18+
"version": "239",
19+
},
20+
]

0 commit comments

Comments
 (0)