Skip to content

Commit

Permalink
feat(checker): add terminology checker (#3295)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine authored Sep 11, 2023
1 parent 6440991 commit 73ffb0e
Show file tree
Hide file tree
Showing 5 changed files with 53 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 @@ -294,6 +294,7 @@
"systemd",
"tcpdump",
"tcpreplay",
"terminology",
"thrift",
"thttpd",
"thunderbird",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/terminology.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 terminology
https://www.cvedetails.com/product/60929/Enlightenment-Terminology.html?vendor_id=1065
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


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

mapping_test_data = [
{
"product": "terminology",
"version": "1.3.2",
"version_strings": ["1.3.2\nterminology"],
},
{
"product": "terminology",
"version": "1.13.0",
"version_strings": ["terminology 1.13.0"],
},
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/t/",
"package_name": "terminology-1.13.0-3.fc39.aarch64.rpm",
"product": "terminology",
"version": "1.13.0",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/t/terminology/",
"package_name": "terminology_1.3.2-1_amd64.deb",
"product": "terminology",
"version": "1.3.2",
},
]

0 comments on commit 73ffb0e

Please sign in to comment.