docs: security audit of MCP tool handlers, platform tools, and auth patterns - #58
Draft
cursor[bot] wants to merge 1 commit into
Draft
docs: security audit of MCP tool handlers, platform tools, and auth patterns#58cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…th patterns Covers all 21 tool files in mcp-server/src/tools/, the TypeScript/Python/Go SDK clients, and auth patterns. Identifies 8 findings (3 medium, 5 low) including path traversal via unvalidated path params, sensitive credential exposure in MCP tool responses, and platform key privilege escalation. Co-authored-by: yakimoto <yakimoto@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive security audit covering all 21 MCP server tool files, the TypeScript/Python/Go SDK clients, and authentication patterns.
Findings
3 Medium-severity issues:
branch_id,clip_id,source_id,graphic_id, andmessage_idare interpolated into URL paths with only.string().min(1)validation (no UUID or format check), while comparable parameters likestream_iduse.uuid().wave_rotate_stream_key,wave_get_stream_tokens,wave_list_api_keys, andwave_platform_create_scoped_keypass raw API responses (containing plaintext secrets) into LLM context windows.wave_platform_create_scoped_keyacceptsadminpermissions with no client-side check that the created key doesn't exceed the creator's scope.5 Low-severity issues:
4. 10 tool modules export
register*Tools()but only 7 are wired inserver.ts(dead security surface)5. A tool in
production.tsis registered with a description string as its name6.
WAVE_BASE_URLis unvalidated — SSRF via environment variable redirect7. Error responses returned to MCP without credential redaction
8. Safety state (
read-onlymode, cost confirmation) is defined but never enforcedPositive observations: Good SSRF protection in gateway tool, UUID validation on most path params, no credential logging anywhere, proper JSON serialization prevents payload injection, all three SDKs handle retry/rate-limiting correctly.
Files
docs/audits/security-audit-mcp-auth-2026-08-07.md— Full audit report with line references, attack chains, and recommendationsNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Add security audit document for MCP tool handlers, platform tools, and auth patterns
Adds security-audit-mcp-auth-2026-08-07.md, a new audit document covering MCP server tool handlers and auth patterns across TypeScript, Python, and Go SDKs. The document includes an executive summary, eight findings with affected files and line references, auth pattern analysis, retry and credential rotation notes, and a summary table of positive observations.
Macroscope summarized f3f3f15.