Skip to content

Commit

Permalink
feat(checker): add vlc 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 13, 2023
1 parent fbcbbd6 commit 0e3ed52
Show file tree
Hide file tree
Showing 5 changed files with 42 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 @@ -330,6 +330,7 @@
"upx",
"util_linux",
"varnish",
"vlc",
"vorbis_tools",
"vsftpd",
"vim",
Expand Down
21 changes: 21 additions & 0 deletions cve_bin_tool/checkers/vlc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for vlc
https://www.cvedetails.com/product/9876/Videolan-VLC.html?vendor_id=5842
https://www.cvedetails.com/product/9978/Videolan-Vlc-Media-Player.html?vendor_id=5842
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class VlcChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"VLC/([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)"]
VENDOR_PRODUCT = [("videolan", "vlc"), ("videolan", "vlc_media_player")]
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions test/test_data/vlc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "vlc", "version": "3.0.12", "version_strings": ["VLC/3.0.12"]}
]
package_test_data = [
{
"url": "http://ftp.fr.debian.org/debian/pool/main/v/vlc/",
"package_name": "vlc-bin_3.0.17.4-0+deb10u1_amd64.deb",
"product": "vlc",
"version": "3.0.17.4",
},
{
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/",
"package_name": "vlc-3.0.12-r0.apk",
"product": "vlc",
"version": "3.0.12",
},
]

0 comments on commit 0e3ed52

Please sign in to comment.