Skip to content

feat: added Libsrtp checker (#1489) #1500

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 6 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -62,6 +62,7 @@
"libnss",
"libsndfile",
"libsoup",
"libsrtp",
"libssh2",
"libtiff",
"libvirt",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/libsrtp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2021 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New files should use 2022 instead of 2021.

# SPDX-License-Identifier: GPL-3.0-or-later

"""
CVE checker for libsrtp

https://www.cvedetails.com/vulnerability-list/vendor_id-16/product_id-26868/version_id-502930/Cisco-Libsrtp--.html

"""

from cve_bin_tool.checkers import Checker


class LibsrtpChecker(Checker):
CONTAINS_PATTERNS = [
r"An implementation of the Secure Real-time Transport Protocol \(SRTP\)",
r"This package provides an implementation of the Secure Real-time",
r"Transport Protocol \(SRTP\), the Universal Security Transform \(UST\), and",
r"a supporting cryptographic kernel\.",
]
FILENAME_PATTERNS = [r"libsrtp"]
VERSION_PATTERNS = [r"libsrtp[0-9]? ([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("cisco", "libsrtp")]
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions test/test_data/libsrtp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
mapping_test_data = [
{"product": "libsrtp", "version": "1.5.4", "version_strings": ["libsrtp 1.5.4"]},
{"product": "libsrtp", "version": "2.3.0", "version_strings": ["libsrtp2 2.3.0"]},
]

package_test_data = [
{
"url": "https://rpmfind.net/linux/centos/8-stream/AppStream/aarch64/os/Packages/",
"package_name": "libsrtp-1.5.4-8.el8.aarch64.rpm",
"product": "libsrtp",
"version": "1.5.4",
},
{
"url": "https://rpmfind.net/linux/centos-stream/9-stream/AppStream/aarch64/os/Packages/",
"package_name": "libsrtp-2.3.0-7.el9.aarch64.rpm",
"product": "libsrtp",
"version": "2.3.0",
},
]