Skip to content

Commit

Permalink
feat(checker): add iwd checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Dec 22, 2023
1 parent 019f1f6 commit 568aaab
Show file tree
Hide file tree
Showing 6 changed files with 59 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 @@ -129,6 +129,7 @@
"iptables",
"irssi",
"iucode_tool",
"iwd",
"jack2",
"jacksondatabind",
"janus",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/iwd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for iwd
https://www.cvedetails.com/product/88024/Intel-Inet-Wireless-Daemon.html?vendor_id=238
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class IwdChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"([0-9]+\.[0-9]+)[a-zA-Z' \r\n]*Wireless monitor ver %s",
r"([0-9]+\.[0-9]+)\r?\nIWD version %s",
]
VENDOR_PRODUCT = [("intel", "inet_wireless_daemon")]
Binary file added test/condensed-downloads/iwd-1.2-r1.apk.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions test/test_data/iwd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "inet_wireless_daemon",
"version": "0.14",
"version_strings": ["0.14\nWireless monitor ver %s"],
},
{
"product": "inet_wireless_daemon",
"version": "2.11",
"version_strings": ["2.11\nIWD version %s"],
},
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/i/",
"package_name": "iwd-2.11-1.fc40.aarch64.rpm",
"product": "inet_wireless_daemon",
"version": "2.11",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/i/iwd/",
"package_name": "iwd_0.14-2_amd64.deb",
"product": "inet_wireless_daemon",
"version": "0.14",
},
{
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/",
"package_name": "iwd-1.2-r1.apk",
"product": "inet_wireless_daemon",
"version": "1.2",
},
]

0 comments on commit 568aaab

Please sign in to comment.