Skip to content

Commit

Permalink
feat(checker): add ntfs-3g checker (#2973)
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 Jun 6, 2023
1 parent 1a358e3 commit a10ecde
Show file tree
Hide file tree
Showing 6 changed files with 59 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 @@ -209,6 +209,7 @@
"nginx",
"nmap",
"node",
"ntfs_3g",
"ntp",
"ntpsec",
"open_iscsi",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/ntfs_3g.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for ntfs-3g
https://www.cvedetails.com/product/45193/Tuxera-Ntfs-3g.html?vendor_id=17875
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class Ntfs3GChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"ntfs-3g[0-9a-zA-Z/%. \r\n]*\r?\n([0-9]+\.[0-9]+\.[0-9]+)",
r"([0-9]+\.[0-9]+\.[0-9]+)\r?\nntfs-3g",
]
VENDOR_PRODUCT = [("tuxera", "ntfs-3g")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions test/test_data/ntfs_3g.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "ntfs-3g",
"version": "2017.3.23",
"version_strings": ["ntfs-3g\n2017.3.23"],
},
{
"product": "ntfs-3g",
"version": "2022.10.3",
"version_strings": ["2022.10.3\nntfs-3g"],
},
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/n/",
"package_name": "ntfs-3g-2022.10.3-2.fc38.aarch64.rpm",
"product": "ntfs-3g",
"version": "2022.10.3",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/n/ntfs-3g/",
"package_name": "ntfs-3g_2017.3.23AR.3-3+deb10u2_amd64.deb",
"product": "ntfs-3g",
"version": "2017.3.23",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "ntfs-3g_2017.3.23-3-fuseint_x86_64.ipk",
"product": "ntfs-3g",
"version": "2017.3.23",
},
]

0 comments on commit a10ecde

Please sign in to comment.