Skip to content

Commit 420886a

Browse files
BreadGenieterriko
andauthored
feat: Add checker for bolt (#1193)
Co-authored-by: Terri Oda <[email protected]>
1 parent 6688fcc commit 420886a

File tree

6 files changed

+53
-0
lines changed

6 files changed

+53
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"bash",
1717
"bind",
1818
"binutils",
19+
"bolt",
1920
"bubblewrap",
2021
"busybox",
2122
"bzip2",

cve_bin_tool/checkers/bolt.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for bolt
7+
8+
https://www.cvedetails.com/product/64828/Boltcms-Bolt.html?vendor_id=21391
9+
10+
"""
11+
from cve_bin_tool.checkers import Checker
12+
13+
14+
class BoltChecker(Checker):
15+
CONTAINS_PATTERNS = [
16+
r"State of the ForcePower setting of the bolt daemon.",
17+
r"The generation of the Thunderbolt controller associated",
18+
r"The maximum generation of any of Thunderbolt controller",
19+
]
20+
FILENAME_PATTERNS = [r"boltd"]
21+
VERSION_PATTERNS = [r"bolt ([0-9]+\.[0-9]+(\.[0-9])?)"]
22+
VENDOR_PRODUCT = [("boltcms", "bolt")]
21.3 KB
Binary file not shown.
52.1 KB
Binary file not shown.

test/test_data/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"bash",
88
"bind",
99
"binutils",
10+
"bolt",
1011
"bubblewrap",
1112
"busybox",
1213
"bzip2",

test/test_data/bolt.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "bolt",
7+
"version": "0.9",
8+
"version_strings": ["bolt 0.9", "bolt 0.9 starting up."],
9+
},
10+
{
11+
"product": "bolt",
12+
"version": "0.9.1",
13+
"version_strings": ["bolt 0.9.1", "bolt 0.9.1 starting up."],
14+
},
15+
]
16+
package_test_data = [
17+
{
18+
"url": "http://archive.ubuntu.com/ubuntu/pool/main/b/bolt/",
19+
"package_name": "bolt_0.9.1-1_amd64.deb",
20+
"product": "bolt",
21+
"version": "0.9.1",
22+
},
23+
{
24+
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/33/Everything/aarch64/os/Packages/b/",
25+
"package_name": "bolt-0.9-3.fc33.aarch64.rpm",
26+
"product": "bolt",
27+
"version": "0.9",
28+
},
29+
]

0 commit comments

Comments
 (0)