diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 4501977bd3..c4640d99b3 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -280,6 +280,7 @@ "openssl", "openswan", "openvpn", + "orc", "p7zip", "pango", "patch", diff --git a/cve_bin_tool/checkers/orc.py b/cve_bin_tool/checkers/orc.py new file mode 100644 index 0000000000..3a63f642e5 --- /dev/null +++ b/cve_bin_tool/checkers/orc.py @@ -0,0 +1,23 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for orc + +https://www.cvedetails.com/product/170918/Gstreamer-ORC.html?vendor_id=9481 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class OrcChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [ + r"Orc Compiler ([0-9]+\.[0-9]+\.[0-9]+)", + r"orc-([0-9]+\.[0-9]+\.[0-9]+)", + ] + VENDOR_PRODUCT = [("gstreamer", "orc")] diff --git a/test/condensed-downloads/liborc-0.4-0_0.4.28-3.1_amd64.deb.tar.gz b/test/condensed-downloads/liborc-0.4-0_0.4.28-3.1_amd64.deb.tar.gz new file mode 100644 index 0000000000..9a968bfeed Binary files /dev/null and b/test/condensed-downloads/liborc-0.4-0_0.4.28-3.1_amd64.deb.tar.gz differ diff --git a/test/condensed-downloads/orc-0.4.40-1.2.aarch64.rpm.tar.gz b/test/condensed-downloads/orc-0.4.40-1.2.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..3233c6a27f Binary files /dev/null and b/test/condensed-downloads/orc-0.4.40-1.2.aarch64.rpm.tar.gz differ diff --git a/test/test_data/orc.py b/test/test_data/orc.py new file mode 100644 index 0000000000..2fe83f884c --- /dev/null +++ b/test/test_data/orc.py @@ -0,0 +1,20 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + {"product": "orc", "version": "0.4.40", "version_strings": ["orc-0.4.40"]} +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/opensuse/ports/aarch64/tumbleweed/repo/oss/aarch64/", + "package_name": "orc-0.4.40-1.2.aarch64.rpm", + "product": "orc", + "version": "0.4.40", + }, + { + "url": "http://ftp.debian.org/debian/pool/main/o/orc/", + "package_name": "liborc-0.4-0_0.4.28-3.1_amd64.deb", + "product": "orc", + "version": "0.4.28", + }, +]