Skip to content
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

feat(checker): add rhythmbox #3497

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
"rauc",
"rdesktop",
"readline",
"rhythmbox",
"rpm",
"rtl_433",
"rtmpdump",
Expand Down
35 changes: 35 additions & 0 deletions cve_bin_tool/checkers/rhythmbox.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for rhythmbox:

References:
http://www.rhythmbox.org/
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class RhythmboxChecker(Checker):
CONTAINS_PATTERNS: list[str] = [
r"Problem occurred without error being set. This is a bug in Rhythmbox or GStreamer.",
r"Rhythmbox is distributed in the hope that it will be useful,",
r"The URL '%s' does not appear to be a podcast feed. It may be the wrong URL, or the feed may be broken. Would you like Rhythmbox to attempt to use it anyway?",
r"The database was created by a later version of Rhythmbox. This version of Rhythmbox cannot read the database.",
r"This version of Rhythmbox has been banned.",
r"along with Rhythmbox; if not, write to the Free Software Foundation, Inc.,",
r"org.gnome.rhythmbox.plugins.audioscrobbler.service",
r"unable to create Rhythmbox's user cache dir, %s",
r"unable to create Rhythmbox's user data dir, %s",
]
FILENAME_PATTERNS = [
r"rhythmbox",
r"rhythmbox-client",
r"librhythmbox-core.so.10.0.0",
r"libaudiocd.so",
]
VERSION_PATTERNS = [r"rhythmbox-(\d+\.\d+\.\d+)"]
VENDOR_PRODUCT = [("gnome", "rhythmbox")]
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/rhythmbox.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2023 SCHUTZWERK GmbH
# SPDX-License-Identifier: GPL-3.0-or-later


mapping_test_data = [
{
"product": "rhythmbox",
"version": "3.4.6",
"version_strings": ["rhythmbox 3.4.6"],
},
]

package_test_data = [
{
"url": "http://download.opensuse.org/distribution/leap/15.5/repo/oss/aarch64/",
"package_name": "rhythmbox-3.4.6-bp155.2.7.aarch64.rpm",
"product": "rhythmbox",
"version": "3.4.6",
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/r/rhythmbox/",
"package_name": "rhythmbox_3.4.7-1_i386.deb",
"product": "rhythmbox",
"version": "3.4.7",
},
]
Loading