Skip to content

Commit

Permalink
feat(checker): add minetest checker (#3303)
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 21, 2023
1 parent 7fad18f commit 3e84987
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 @@ -193,6 +193,7 @@
"mariadb",
"mdadm",
"memcached",
"minetest",
"mini_httpd",
"minicom",
"minidlna",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/minetest.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


"""
CVE checker for minetest
https://www.cvedetails.com/product/108535/Minetest-Minetest.html?vendor_id=26371
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class MinetestChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"minetest-([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)"]
VENDOR_PRODUCT = [("minetest", "minetest")]
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions test/test_data/minetest.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

mapping_test_data = [
{
"product": "minetest",
"version": "0.4.17.1",
"version_strings": ["minetest-0.4.17.1"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/m/",
"package_name": "minetest-5.7.0-2.fc39.aarch64.rpm",
"product": "minetest",
"version": "5.7.0",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/m/minetest/",
"package_name": "minetest_0.4.17.1+repack-1+deb10u1_amd64.deb",
"product": "minetest",
"version": "0.4.17.1",
},
]

0 comments on commit 3e84987

Please sign in to comment.