Skip to content

Commit 03457ca

Browse files
ffontaineinosmeet
authored andcommitted
feat(checker): add libvips checker (intel#3788)
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent d908b19 commit 03457ca

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
"libtiff",
189189
"libtomcrypt",
190190
"libupnp",
191+
"libvips",
191192
"libvirt",
192193
"libvncserver",
193194
"libvorbis",

cve_bin_tool/checkers/libvips.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2024 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for libvips
7+
8+
https://www.cvedetails.com/product/160947/Libvips-Libvips.html?vendor_id=32880
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class LibvipsChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)[A-Za-z0-9./%: \-\(\)\r\n]*libvips"]
20+
VENDOR_PRODUCT = [("libvips", "libvips")]
Binary file not shown.
165 KB
Binary file not shown.
170 KB
Binary file not shown.

test/test_data/libvips.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2024 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "libvips", "version": "8.7.4", "version_strings": ["8.7.4\nlibvips"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/v/",
10+
"package_name": "vips-8.15.1-2.fc40.aarch64.rpm",
11+
"product": "libvips",
12+
"version": "8.15.1",
13+
},
14+
{
15+
"url": "http://ftp.fr.debian.org/debian/pool/main/v/vips/",
16+
"package_name": "libvips42_8.7.4-1%2Bdeb10u1_amd64.deb",
17+
"product": "libvips",
18+
"version": "8.7.4",
19+
},
20+
{
21+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
22+
"package_name": "vips_8.7.4-3_x86_64.ipk",
23+
"product": "libvips",
24+
"version": "8.7.4",
25+
},
26+
]

0 commit comments

Comments
 (0)