Skip to content

Commit a9d57b3

Browse files
committed
feat(checker): add libvpx checker
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 098a96f commit a9d57b3

File tree

8 files changed

+61
-1
lines changed

8 files changed

+61
-1
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"libvirt",
186186
"libvncserver",
187187
"libvorbis",
188+
"libvpx",
188189
"libxslt",
189190
"lighttpd",
190191
"linux_kernel",

cve_bin_tool/checkers/libvpx.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for libvpx
7+
8+
https://www.cvedetails.com/product/62243/Webmproject-Libvpx.html?vendor_id=17610
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class LibvpxChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"WebM Project VP[8|9] Encoder v([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("webmproject", "libvpx")]
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/firefox.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@
1414
"package_name": "firefox-106.0.4-1.fc38.aarch64.rpm",
1515
"product": "firefox",
1616
"version": "106.0.4",
17-
"other_products": ["libjpeg", "libjpeg-turbo", "lz4", "rust", "sqlite"],
17+
"other_products": [
18+
"libjpeg",
19+
"libjpeg-turbo",
20+
"libvpx",
21+
"lz4",
22+
"rust",
23+
"sqlite",
24+
],
1825
},
1926
{
2027
"url": "http://ftp.fr.debian.org/debian/pool/main/f/firefox/",

test/test_data/libvpx.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (C) 2023 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "libvpx",
7+
"version": "1.7.0",
8+
"version_strings": ["WebM Project VP8 Encoder v1.7.0"],
9+
}
10+
]
11+
package_test_data = [
12+
{
13+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/l/",
14+
"package_name": "libvpx-1.13.1-1.fc40.aarch64.rpm",
15+
"product": "libvpx",
16+
"version": "1.13.1",
17+
},
18+
{
19+
"url": "http://ftp.fr.debian.org/debian/pool/main/libv/libvpx/",
20+
"package_name": "libvpx5_1.7.0-3+deb10u1_amd64.deb",
21+
"product": "libvpx",
22+
"version": "1.7.0",
23+
},
24+
{
25+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
26+
"package_name": "libvpx1.8_1.8.0-1_x86_64.ipk",
27+
"product": "libvpx",
28+
"version": "1.8.0",
29+
},
30+
]

test/test_data/thunderbird.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"other_products": [
1818
"libjpeg",
1919
"libjpeg-turbo",
20+
"libvpx",
2021
"lz4",
2122
"rust",
2223
"sqlite",
@@ -31,6 +32,7 @@
3132
"libjpeg",
3233
"libjpeg-turbo",
3334
"libvorbis",
35+
"libvpx",
3436
"network_security_services",
3537
"sqlite",
3638
],

0 commit comments

Comments
 (0)