Skip to content

Commit

Permalink
feat(checker): add mp4v2 checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Sep 6, 2024
1 parent c252407 commit 03e4dd5
Show file tree
Hide file tree
Showing 4 changed files with 46 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 @@ -238,6 +238,7 @@
"monit",
"mosquitto",
"motion",
"mp4v2",
"mpg123",
"mpv",
"msmtp",
Expand Down
26 changes: 26 additions & 0 deletions cve_bin_tool/checkers/mp4v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2024 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for mp4v2
https://www.cvedetails.com/product/48319/Techsmith-Mp4v2.html?vendor_id=9035
https://www.cvedetails.com/product/44070/Mp4v2-Project-Mp4v2.html?vendor_id=17731
https://www.cvedetails.com/product/142097/Mp4v2-Mp4v2.html?vendor_id=30832
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class Mp4V2Checker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"MP4v2\r?\nversion:\r?\n([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [
("mp4v2", "mp4v2"),
("mp4v2_project", "mp4v2"),
("techsmith", "mp4v2"),
]
Binary file not shown.
19 changes: 19 additions & 0 deletions test/test_data/mp4v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2024 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "mp4v2",
"version": "4.1.2",
"version_strings": ["MP4v2\nversion:\n4.1.2"],
}
]
package_test_data = [
{
"url": "https://eu.mirror.archlinuxarm.org/aarch64/extra/",
"package_name": "libmp4v2-1:2.1.3-2-aarch64.pkg.tar.xz",
"product": "mp4v2",
"version": "2.1.3",
"other_products": ["gcc"],
},
]

0 comments on commit 03e4dd5

Please sign in to comment.