Skip to content

Commit

Permalink
feat(checker): add libopenmpt checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Jul 13, 2024
1 parent 055324b commit e0f914e
Show file tree
Hide file tree
Showing 5 changed files with 45 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 @@ -184,6 +184,7 @@
"libmicrohttpd",
"libmodbus",
"libnss",
"libopenmpt",
"libpcap",
"libraw",
"librsvg",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/libopenmpt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2024 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for libopenmpt
https://www.cvedetails.com/product/38959/Openmpt-Libopenmpt.html?vendor_id=16722
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


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

mapping_test_data = [
{
"product": "libopenmpt",
"version": "0.4.3",
"version_strings": ["libopenmpt-0.4.3"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/l/",
"package_name": "libopenmpt-0.7.8-1.fc41.aarch64.rpm",
"product": "libopenmpt",
"version": "0.7.8",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/libo/libopenmpt/",
"package_name": "libopenmpt0_0.4.3-1+deb10u1_amd64.deb",
"product": "libopenmpt",
"version": "0.4.3",
},
]

0 comments on commit e0f914e

Please sign in to comment.