Skip to content

Commit

Permalink
feat(checker): add wavpack checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Jan 28, 2025
1 parent 3029cb0 commit ec563ff
Show file tree
Hide file tree
Showing 6 changed files with 48 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 @@ -376,6 +376,7 @@
"vorbis_tools",
"vsftpd",
"vim",
"wavpack",
"webkitgtk",
"wget",
"wireshark",
Expand Down
21 changes: 21 additions & 0 deletions cve_bin_tool/checkers/wavpack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2025 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for wavpack
https://www.cvedetails.com/product/36196/Wavpack-Project-Wavpack.html?vendor_id=16200
https://www.cvedetails.com/product/43617/Wavpack-Wavpack.html?vendor_id=17637
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class WavpackChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"\r?\n([0-9]+\.[0-9]+\.[0-9]+)\r?\n(?:libwavpack|[wW]av)"]
VENDOR_PRODUCT = [("wavpack", "wavpack"), ("wavpack_project", "wavpack")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/wavpack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2025 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "wavpack", "version": "5.1.0", "version_strings": ["5.1.0\nlibwavpack"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/w/",
"package_name": "wavpack-5.7.0-11.fc42.aarch64.rpm",
"product": "wavpack",
"version": "5.7.0",
},
{
"url": "http://ftp.debian.org/debian/pool/main/w/wavpack/",
"package_name": "wavpack_5.4.0-1_arm64.deb",
"product": "wavpack",
"version": "5.4.0",
},
{
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
"package_name": "wavpack-5.1.0-r8.apk",
"product": "wavpack",
"version": "5.1.0",
},
]

0 comments on commit ec563ff

Please sign in to comment.