Skip to content

feat: sanitize sensitive tool call arguments before WebSocket broadcast#332

Open
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/tool-args-sanitization
Open

feat: sanitize sensitive tool call arguments before WebSocket broadcast#332
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/tool-args-sanitization

Conversation

@nap-liu
Copy link
Copy Markdown

@nap-liu nap-liu commented Apr 8, 2026

Summary

  • New sanitize.py: masks passwords, tokens, API keys, connection URIs in tool args
  • Integrated into WebSocket tool_call broadcast
  • Protects secrets.md content from read_file tool results

Test plan

  • Code review verified all sensitive field patterns covered
  • secrets.md protection integrated in websocket.py

Add sanitize_tool_args() utility that masks passwords, tokens, API keys,
connection URIs, and secrets.md content with "***REDACTED***" before
tool_call events are sent to clients or persisted to the database.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant