Skip to content

Commit f8256a6

Browse files
authored
feat(checker): add zziplib checker (#5156)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 9b17fc7 commit f8256a6

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@
434434
"znc",
435435
"zsh",
436436
"zstandard",
437+
"zziplib",
437438
]
438439

439440
VendorProductPair = collections.namedtuple("VendorProductPair", ["vendor", "product"])

cve_bin_tool/checkers/zziplib.py

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

test/test_data/zziplib.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "zziplib", "version": "0.13.62", "version_strings": ["zziplib 0.13.62"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://ftp.debian.org/debian/pool/main/z/zziplib/",
10+
"package_name": "zziplib-bin_0.13.62-3.2+deb10u1_amd64.deb",
11+
"product": "zziplib",
12+
"version": "0.13.62",
13+
},
14+
{
15+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/",
16+
"package_name": "zziplib-utils-0.13.69-r2.apk",
17+
"product": "zziplib",
18+
"version": "0.13.69",
19+
"other_products": ["gcc"],
20+
},
21+
]

0 commit comments

Comments
 (0)