Skip to content

Commit

Permalink
feat(checker): add oath_toolkit checker (#4523)
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 Dec 18, 2024
1 parent 7c888f1 commit 1e2dff8
Show file tree
Hide file tree
Showing 7 changed files with 57 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 @@ -267,6 +267,7 @@
"ntfs_3g",
"ntp",
"ntpsec",
"oath_toolkit",
"open_iscsi",
"open_vm_tools",
"openafs",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/oath_toolkit.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 oath_toolkit
https://www.cvedetails.com/product/27196/Nongnu-Oath-Toolkit.html?vendor_id=6788
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class OathToolkitChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[0-9A-Za-z/%\-\*\.\:\t\r\n]*Liboath"]
VENDOR_PRODUCT = [("nongnu", "oath_toolkit")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions test/test_data/oath_toolkit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (C) 2024 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "oath_toolkit",
"version": "2.6.1",
"version_strings": ["2.6.1\nLiboath"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/l/",
"package_name": "liboath-2.6.12-1.fc42.aarch64.rpm",
"product": "oath_toolkit",
"version": "2.6.12",
},
{
"url": "http://ftp.debian.org/debian/pool/main/o/oath-toolkit/",
"package_name": "liboath0_2.6.1-1.3_amd64.deb",
"product": "oath_toolkit",
"version": "2.6.1",
},
{
"url": "http://ftp.debian.org/debian/pool/main/o/oath-toolkit/",
"package_name": "liboath0_2.6.7-3.1_s390x.deb",
"product": "oath_toolkit",
"version": "2.6.7",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "oath-toolkit_2.6.2-5_x86_64.ipk",
"product": "oath_toolkit",
"version": "2.6.2",
},
]

0 comments on commit 1e2dff8

Please sign in to comment.