Skip to content

Commit 25db96a

Browse files
authored
feat(checker): add vlc checker (#3593)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 7734a1a commit 25db96a

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@
330330
"upx",
331331
"util_linux",
332332
"varnish",
333+
"vlc",
333334
"vorbis_tools",
334335
"vsftpd",
335336
"vim",

cve_bin_tool/checkers/vlc.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for vlc
7+
8+
https://www.cvedetails.com/product/9876/Videolan-VLC.html?vendor_id=5842
9+
https://www.cvedetails.com/product/9978/Videolan-Vlc-Media-Player.html?vendor_id=5842
10+
11+
"""
12+
from __future__ import annotations
13+
14+
from cve_bin_tool.checkers import Checker
15+
16+
17+
class VlcChecker(Checker):
18+
CONTAINS_PATTERNS: list[str] = []
19+
FILENAME_PATTERNS: list[str] = []
20+
VERSION_PATTERNS = [r"VLC/([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)"]
21+
VENDOR_PRODUCT = [("videolan", "vlc"), ("videolan", "vlc_media_player")]
418 KB
Binary file not shown.
1.76 KB
Binary file not shown.

test/test_data/vlc.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "vlc", "version": "3.0.12", "version_strings": ["VLC/3.0.12"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://ftp.fr.debian.org/debian/pool/main/v/vlc/",
10+
"package_name": "vlc-bin_3.0.17.4-0+deb10u1_amd64.deb",
11+
"product": "vlc",
12+
"version": "3.0.17.4",
13+
},
14+
{
15+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/",
16+
"package_name": "vlc-3.0.12-r0.apk",
17+
"product": "vlc",
18+
"version": "3.0.12",
19+
},
20+
]

0 commit comments

Comments
 (0)