Skip to content

Commit

Permalink
feat(checker): add fluidsynth checker (#3012)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine authored May 31, 2023
1 parent 33d13b6 commit 892a82c
Show file tree
Hide file tree
Showing 6 changed files with 65 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 @@ -76,6 +76,7 @@
"file",
"firefox",
"flac",
"fluidsynth",
"freeradius",
"freerdp",
"fribidi",
Expand Down
24 changes: 24 additions & 0 deletions cve_bin_tool/checkers/fluidsynth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for fluidsynth
https://www.cvedetails.com/product/82484/Fluidsynth-Fluidsynth.html?vendor_id=23141
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class FluidsynthChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"FluidSynth executable version ([0-9]+\.[0-9]+\.[0-9]+)",
r"([0-9]+\.[0-9]+\.[0-9]+)[a-zA-Z0-9=:% \(\)\-\.\r\n]*FluidSynth",
r"fluidsynth-([0-9]+\.[0-9]+\.[0-9]+)",
]
VENDOR_PRODUCT = [("fluidsynth", "fluidsynth")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
40 changes: 40 additions & 0 deletions test/test_data/fluidsynth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "fluidsynth",
"version": "2.3.2",
"version_strings": ["FluidSynth executable version 2.3.2"],
},
{
"product": "fluidsynth",
"version": "1.1.11",
"version_strings": ["1.1.11\nFluidSynth"],
},
{
"product": "fluidsynth",
"version": "1.1.11",
"version_strings": ["fluidsynth-1.1.11"],
},
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/f/",
"package_name": "fluidsynth-2.3.2-1.fc39.aarch64.rpm",
"product": "fluidsynth",
"version": "2.3.2",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/f/fluidsynth/",
"package_name": "fluidsynth_1.1.11-1+deb10u1_amd64.deb",
"product": "fluidsynth",
"version": "1.1.11",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/f/fluidsynth/",
"package_name": "libfluidsynth1_1.1.11-1+deb10u1_arm64.deb",
"product": "fluidsynth",
"version": "1.1.11",
},
]

0 comments on commit 892a82c

Please sign in to comment.