Skip to content

Commit 9a15e79

Browse files
committed
feat(checker): add fish checker
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent f92f15b commit 9a15e79

File tree

7 files changed

+55
-0
lines changed

7 files changed

+55
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"file",
110110
"firefox",
111111
"firejail",
112+
"fish",
112113
"flac",
113114
"fluidsynth",
114115
"freeradius",

cve_bin_tool/checkers/fish.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 fish
7+
8+
https://www.cvedetails.com/product/43564/Fishshell-Fish.html?vendor_id=17623
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class FishChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"fish-([0-9]+\.[0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("fishshell", "fish")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/fish.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "fish", "version": "3.1.0", "version_strings": ["fish-3.1.0"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/f/",
10+
"package_name": "fish-4.0.2-1.fc43.aarch64.rpm",
11+
"product": "fish",
12+
"version": "4.0.2",
13+
"other_products": ["rust"],
14+
},
15+
{
16+
"url": "http://ftp.debian.org/debian/pool/main/f/fish/",
17+
"package_name": "fish_3.1.2-3+deb11u1_amd64.deb",
18+
"product": "fish",
19+
"version": "3.1.2",
20+
},
21+
{
22+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
23+
"package_name": "fish_3.1.0-1_x86_64.ipk",
24+
"product": "fish",
25+
"version": "3.1.0",
26+
},
27+
{
28+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/",
29+
"package_name": "fish-3.1.2-r4.apk",
30+
"product": "fish",
31+
"version": "3.1.2",
32+
"other_products": ["gcc"],
33+
},
34+
]

0 commit comments

Comments
 (0)