Skip to content

Commit

Permalink
feat(checker): add orc (#4636)
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 23, 2024
1 parent 2195b16 commit 5f3b4a4
Show file tree
Hide file tree
Showing 5 changed files with 44 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 @@ -280,6 +280,7 @@
"openssl",
"openswan",
"openvpn",
"orc",
"p7zip",
"pango",
"patch",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/orc.py
Original file line number Diff line number Diff line change
@@ -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")]
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions test/test_data/orc.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

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",
},
]

0 comments on commit 5f3b4a4

Please sign in to comment.