diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index ba5ccc4a3f..7641fb79ca 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -34,6 +34,7 @@ "bro", "bubblewrap", "busybox", + "bwm_ng", "bzip2", "c_ares", "capnproto", diff --git a/cve_bin_tool/checkers/bwm_ng.py b/cve_bin_tool/checkers/bwm_ng.py new file mode 100644 index 0000000000..14c0965fc4 --- /dev/null +++ b/cve_bin_tool/checkers/bwm_ng.py @@ -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")] diff --git a/test/condensed-downloads/bwm-ng-0.6.3-1.fc39.aarch64.rpm.tar.gz b/test/condensed-downloads/bwm-ng-0.6.3-1.fc39.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..cc345498ec Binary files /dev/null and b/test/condensed-downloads/bwm-ng-0.6.3-1.fc39.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/bwm-ng_0.6.1-1_x86_64.ipk.tar.gz b/test/condensed-downloads/bwm-ng_0.6.1-1_x86_64.ipk.tar.gz new file mode 100644 index 0000000000..5724098662 Binary files /dev/null and b/test/condensed-downloads/bwm-ng_0.6.1-1_x86_64.ipk.tar.gz differ diff --git a/test/condensed-downloads/bwm-ng_0.6.1-6_amd64.deb.tar.gz b/test/condensed-downloads/bwm-ng_0.6.1-6_amd64.deb.tar.gz new file mode 100644 index 0000000000..9e1491a21a Binary files /dev/null and b/test/condensed-downloads/bwm-ng_0.6.1-6_amd64.deb.tar.gz differ diff --git a/test/test_data/bwm_ng.py b/test/test_data/bwm_ng.py new file mode 100644 index 0000000000..36ec23cc83 --- /dev/null +++ b/test/test_data/bwm_ng.py @@ -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", + }, +]