Commit 74dc0de
DX-119567: Fix security vulnerabilities in MCP Server (#105)
Addresses 57 Trivy-flagged CVEs (3 CRITICAL, 17 HIGH) via
three tracks:
1. Delete src/dremioai/servers/frameworks/ (langchain + beeai)
which is unused by the live dremio-mcp-server path. This drops
langchain*, langgraph, and beeai-framework from the dependency
tree, eliminating ~18 CVEs incl. CVE-2025-68664 (CRITICAL).
2. Remove litellm (no imports in codebase) to drop CVE-2026-35030
(CRITICAL), CVE-2026-35029 (HIGH), and GHSA-69x8-hrgq-fjj8 (HIGH).
3. Bump direct and transitive dependencies to fixed versions:
aiohttp, black, mcp, requests, starlette, pytest; plus lower
bounds for h11 (CRITICAL CVE-2025-43859), python-multipart,
orjson, setuptools, urllib3, cryptography, filelock,
python-dotenv, and pygments.
Route regex fix in mcp.py:
The mcp upgrade (1.10 -> 1.27) tightened the streamable-HTTP route
to an exact match on "/mcp" (path_regex ^/mcp$). This broke the
project-id-prefixed URL pattern "/mcp/<project_id>/" that
ProjectIdMiddleware extracts and the e2e PAT tests rely on -- the
request 404'd before middleware could run. After registering
ProjectIdMiddleware, we loosen the Route's path_regex to also match
"/mcp/<project_id>/..." so the middleware has a chance to pull the
project id out of the URL. The middleware itself is unchanged.
Test plan:
- Ran `trivy filesystem .` after the changes and confirmed zero
HIGH/CRITICAL findings remain in uv.lock (down from 57).
- Ran the full pytest suite: 341 passed, 0 failed.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 613f940 commit 74dc0de
10 files changed
Lines changed: 1429 additions & 2787 deletions
File tree
- docs
- examples/chat
- src/dremioai/servers/frameworks
- beeai
- langchain
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 99 | | |
138 | 100 | | |
139 | 101 | | |
| |||
0 commit comments