Skip to content

Commit

Permalink
feat: Add checker for bolt (#1193)
Browse files Browse the repository at this point in the history
Co-authored-by: Terri Oda <terri.oda@intel.com>
  • Loading branch information
BreadGenie and terriko committed Jun 30, 2021
1 parent 6688fcc commit 420886a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"bash",
"bind",
"binutils",
"bolt",
"bubblewrap",
"busybox",
"bzip2",
Expand Down
22 changes: 22 additions & 0 deletions cve_bin_tool/checkers/bolt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for bolt
https://www.cvedetails.com/product/64828/Boltcms-Bolt.html?vendor_id=21391
"""
from cve_bin_tool.checkers import Checker


class BoltChecker(Checker):
CONTAINS_PATTERNS = [
r"State of the ForcePower setting of the bolt daemon.",
r"The generation of the Thunderbolt controller associated",
r"The maximum generation of any of Thunderbolt controller",
]
FILENAME_PATTERNS = [r"boltd"]
VERSION_PATTERNS = [r"bolt ([0-9]+\.[0-9]+(\.[0-9])?)"]
VENDOR_PRODUCT = [("boltcms", "bolt")]
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions test/test_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"bash",
"bind",
"binutils",
"bolt",
"bubblewrap",
"busybox",
"bzip2",
Expand Down
29 changes: 29 additions & 0 deletions test/test_data/bolt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "bolt",
"version": "0.9",
"version_strings": ["bolt 0.9", "bolt 0.9 starting up."],
},
{
"product": "bolt",
"version": "0.9.1",
"version_strings": ["bolt 0.9.1", "bolt 0.9.1 starting up."],
},
]
package_test_data = [
{
"url": "http://archive.ubuntu.com/ubuntu/pool/main/b/bolt/",
"package_name": "bolt_0.9.1-1_amd64.deb",
"product": "bolt",
"version": "0.9.1",
},
{
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/33/Everything/aarch64/os/Packages/b/",
"package_name": "bolt-0.9-3.fc33.aarch64.rpm",
"product": "bolt",
"version": "0.9",
},
]

0 comments on commit 420886a

Please sign in to comment.