Skip to content

Commit

Permalink
feat(checker): add libde265 checker (intel#3645)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine authored Dec 19, 2023
1 parent c1f24cb commit eece00a
Show file tree
Hide file tree
Showing 6 changed files with 49 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 @@ -150,6 +150,7 @@
"libconfuse",
"libcurl",
"libdb",
"libde265",
"libebml",
"libevent",
"libexpat",
Expand Down
22 changes: 22 additions & 0 deletions cve_bin_tool/checkers/libde265.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for libde265
https://www.cvedetails.com/product/107590/Struktur-Libde265.html?vendor_id=19782
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class Libde265Checker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"([0-9]+\.[0-9]+\.[0-9]+)[a-zA-Z0-9/!=_,:<>. \[\]\(\)\-\r\n]*de265"
]
VENDOR_PRODUCT = [("struktur", "libde265")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/libde265.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "libde265", "version": "1.0.3", "version_strings": ["1.0.3\nde265"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/rpmfusion/free/fedora/development/rawhide/Everything/aarch64/os/Packages/l/",
"package_name": "libde265-1.0.14-1.fc40.aarch64.rpm",
"product": "libde265",
"version": "1.0.14",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/libd/libde265/",
"package_name": "libde265-0_1.0.3-1+b1_amd64.deb",
"product": "libde265",
"version": "1.0.3",
},
{
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
"package_name": "libde265-1.0.3-r0.apk",
"product": "libde265",
"version": "1.0.3",
},
]

0 comments on commit eece00a

Please sign in to comment.