-
Notifications
You must be signed in to change notification settings - Fork 551
feat(checker): add fish checker #5167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,7 @@ | |
"file", | ||
"firefox", | ||
"firejail", | ||
"fish", | ||
"flac", | ||
"fluidsynth", | ||
"freeradius", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (C) 2025 Orange | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for fish | ||
|
||
https://www.cvedetails.com/product/43564/Fishshell-Fish.html?vendor_id=17623 | ||
|
||
""" | ||
from __future__ import annotations | ||
|
||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class FishChecker(Checker): | ||
CONTAINS_PATTERNS: list[str] = [] | ||
FILENAME_PATTERNS: list[str] = [] | ||
VERSION_PATTERNS = [r"fish-([0-9]+\.[0-9]+\.[0-9]+)"] | ||
VENDOR_PRODUCT = [("fishshell", "fish")] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2025 Orange | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
mapping_test_data = [ | ||
{"product": "fish", "version": "3.1.0", "version_strings": ["fish-3.1.0"]} | ||
] | ||
package_test_data = [ | ||
{ | ||
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/f/", | ||
"package_name": "fish-4.0.2-1.fc43.aarch64.rpm", | ||
"product": "fish", | ||
"version": "4.0.2", | ||
"other_products": ["rust"], | ||
}, | ||
{ | ||
"url": "http://ftp.debian.org/debian/pool/main/f/fish/", | ||
"package_name": "fish_3.1.2-3+deb11u1_amd64.deb", | ||
"product": "fish", | ||
"version": "3.1.2", | ||
}, | ||
{ | ||
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/", | ||
"package_name": "fish_3.1.0-1_x86_64.ipk", | ||
"product": "fish", | ||
"version": "3.1.0", | ||
}, | ||
{ | ||
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/", | ||
"package_name": "fish-3.1.2-r4.apk", | ||
"product": "fish", | ||
"version": "3.1.2", | ||
"other_products": ["gcc"], | ||
}, | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex "fish-([0-9]+.[0-9]+.[0-9]+)" doesn't catch the packages fish_3.1.2-3+deb11u1_amd64.deb or fish_3.1.0-1_x86_64.ipk because they have a "" after the string "fish" and your regex only matches if a "-" follows "fish". I tried this regex "fish-|([0-9]+.[0-9]+.[0-9]+)" and it seems to catch all 4 packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests passed, so IMHO no need to update regex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I talked to @terriko and it looks like using a python regex checker may not match exactly what's going on when you're running it. So I'm going to build it today and get back to you after I've checked it. Thanks for your patience