Skip to content

Commit 3dca6f6

Browse files
authored
feat(checker): add mpd checker (#5281)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 4847df4 commit 3dca6f6

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
"mosquitto",
279279
"motion",
280280
"mp4v2",
281+
"mpd",
281282
"mpg123",
282283
"mpv",
283284
"msmtp",

cve_bin_tool/checkers/mpd.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for mpd
7+
8+
https://www.cvedetails.com/product/127576/Musicpd-Music-Player-Daemon.html?vendor_id=29308
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class MpdChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"Music Player Daemon ([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("musicpd", "music_player_daemon")]
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/mpd.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "music_player_daemon",
7+
"version": "0.22.6",
8+
"version_strings": ["Music Player Daemon 0.22.6"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://rpmfind.net/linux/openmandriva/cooker/repository/aarch64/main/release/",
14+
"package_name": "mpd-0.24.5-1-omv2590.aarch64.rpm",
15+
"product": "music_player_daemon",
16+
"version": "0.24.5",
17+
},
18+
{
19+
"url": "http://ftp.debian.org/debian/pool/main/m/mpd/",
20+
"package_name": "mpd_0.22.6-1+b1_amd64.deb",
21+
"product": "music_player_daemon",
22+
"version": "0.22.6",
23+
},
24+
{
25+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
26+
"package_name": "mpd-mini_0.21.25-1_x86_64.ipk",
27+
"product": "music_player_daemon",
28+
"version": "0.21.25",
29+
},
30+
]

0 commit comments

Comments
 (0)