Skip to content

Commit 9cf5f0d

Browse files
ilblackdragonclaude
andcommitted
fix(mcp): address 14 audit findings across MCP module (#1094)
* fix(mcp): address 14 audit findings across MCP module - Replace panicking assert! in new_with_config with Result return (Critical) - Fix initialize() race condition using tokio::sync::OnceCell (High) - Fix localhost check bypass via proper URL parsing (High) - Extract shared stream_transport_send() to deduplicate stdio/unix send logic - Use atomic write (tmp+rename) for config file persistence - Filter SSE responses by request_id to prevent wrong-response dispatch - Share a single reqwest::Client for OAuth via fallible OnceLock - Log notification send errors instead of silently discarding - Fix unwrap_or(0) that could steal id=0 responses - Store InitializeResult in OnceCell so callers can access server capabilities - Add redirect logging in OAuth discovery - Reuse is_localhost_url() in auth.rs - Add McpToolWrapper unit tests and regression tests - URL-encode PKCE challenge for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: retrigger CI with skip-regression-check label Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 541e2a6 commit 9cf5f0d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/e2e/scenarios/test_mcp_auth_flow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ async def test_mcp_400_activate_triggers_auth(ironclaw_server, mock_llm_server):
240240
"/api/extensions/mock-mcp-400/activate",
241241
timeout=30,
242242
)
243+
assert r.status_code == 200, f"Activate returned {r.status_code}: {r.text[:300]}"
243244
data = r.json()
244245

245246
# The 400 should be treated as auth-required, returning an auth_url

0 commit comments

Comments
 (0)