Skip to content

Commit

Permalink
feat(checker): add bwm-ng checker (intel#3230)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Aug 11, 2023
1 parent 3b8fcbf commit b5dfbef
Show file tree
Hide file tree
Showing 6 changed files with 47 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 @@ -34,6 +34,7 @@
"bro",
"bubblewrap",
"busybox",
"bwm_ng",
"bzip2",
"c_ares",
"capnproto",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/bwm_ng.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for bwm-ng:
https://www.cvedetails.com/product/113242/Bwm-ng-Project-Bwm-ng.html?vendor_id=26951
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class BwmNgChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"bwm-ng v([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("bwm-ng_project", "bwm-ng")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/bwm_ng.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "bwm-ng", "version": "0.6.1", "version_strings": ["bwm-ng v0.6.1"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/b/",
"package_name": "bwm-ng-0.6.3-1.fc39.aarch64.rpm",
"product": "bwm-ng",
"version": "0.6.3",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/b/bwm-ng/",
"package_name": "bwm-ng_0.6.1-6_amd64.deb",
"product": "bwm-ng",
"version": "0.6.1",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "bwm-ng_0.6.1-1_x86_64.ipk",
"product": "bwm-ng",
"version": "0.6.1",
},
]

0 comments on commit b5dfbef

Please sign in to comment.