Skip to content

Commit

Permalink
feat(checker): add dav1d checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Aug 10, 2023
1 parent 06b55f7 commit 71cdb31
Show file tree
Hide file tree
Showing 6 changed files with 48 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 @@ -52,6 +52,7 @@
"curl",
"cvs",
"darkhttpd",
"dav1d",
"davfs2",
"dbus",
"dhclient",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/dav1d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for dav1d:
https://www.cvedetails.com/product/139658/Videolan-Dav1d.html?vendor_id=5842
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class Dav1DChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[A-Za-z0-9 '.()%,:\r\n\/\-]*dav1d"]
VENDOR_PRODUCT = [("videolan", "dav1d")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions test/test_data/dav1d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "dav1d", "version": "0.7.1", "version_strings": ["0.7.1\ndav1d"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/d/",
"package_name": "dav1d-1.2.1-2.fc39.aarch64.rpm",
"product": "dav1d",
"version": "1.2.1",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/d/dav1d/",
"package_name": "dav1d_0.7.1-3_amd64.deb",
"product": "dav1d",
"version": "0.7.1",
},
{
"url": "https://eu.mirror.archlinuxarm.org/aarch64/extra/",
"package_name": "dav1d-1.2.1-1-aarch64.pkg.tar.xz",
"product": "dav1d",
"version": "1.2.1",
"other_products": ["gcc"],
},
]

0 comments on commit 71cdb31

Please sign in to comment.