Skip to content

Commit

Permalink
feat(checker): add libvips checker
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Feb 4, 2024
1 parent 6aa33be commit e467df1
Show file tree
Hide file tree
Showing 6 changed files with 47 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 @@ -188,6 +188,7 @@
"libtiff",
"libtomcrypt",
"libupnp",
"libvips",
"libvirt",
"libvncserver",
"libvorbis",
Expand Down
20 changes: 20 additions & 0 deletions cve_bin_tool/checkers/libvips.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


"""
CVE checker for libvips
https://www.cvedetails.com/product/160947/Libvips-Libvips.html?vendor_id=32880
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


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

mapping_test_data = [
{"product": "libvips", "version": "8.7.4", "version_strings": ["8.7.4\nlibvips"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/v/",
"package_name": "vips-8.15.1-2.fc40.aarch64.rpm",
"product": "libvips",
"version": "8.15.1",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/v/vips/",
"package_name": "libvips42_8.7.4-1%2Bdeb10u1_amd64.deb",
"product": "libvips",
"version": "8.7.4",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "vips_8.7.4-3_x86_64.ipk",
"product": "libvips",
"version": "8.7.4",
},
]

0 comments on commit e467df1

Please sign in to comment.