Skip to content

Commit

Permalink
feat(checker): add uwsgi checker (#4768)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine authored Feb 12, 2025
1 parent 3f6095c commit f0393f0
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
"unixodbc",
"upx",
"util_linux",
"uwsgi",
"varnish",
"vlc",
"vorbis_tools",
Expand Down
23 changes: 23 additions & 0 deletions cve_bin_tool/checkers/uwsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2025 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for uwsgi
https://www.cvedetails.com/product/43616/Unbit-Uwsgi.html?vendor_id=17636
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class UwsgiChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"([0-9]+\.[0-9]+\.[0-9]+)[a-z_ \r\n]*uwsgi",
r"uwsgi[a-z_/% \(\)\r\n]*([0-9]+\.[0-9]+\.[0-9]+)",
]
VENDOR_PRODUCT = [("unbit", "uwsgi")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions test/test_data/uwsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2022 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "uwsgi", "version": "2.0.18", "version_strings": ["2.0.18\nuwsgi"]}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/u/",
"package_name": "uwsgi-2.0.28-4.fc42.aarch64.rpm",
"product": "uwsgi",
"version": "2.0.28",
},
{
"url": "http://ftp.debian.org/debian/pool/main/u/uwsgi/",
"package_name": "uwsgi-core_2.0.18-1_amd64.deb",
"product": "uwsgi",
"version": "2.0.18",
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "uwsgi_2.0.18-1_x86_64.ipk",
"product": "uwsgi",
"version": "2.0.18",
},
]

0 comments on commit f0393f0

Please sign in to comment.