fix(agents): strip internal proxy metadata from tool args#2456
Open
daryllimyt wants to merge 1 commit intomainfrom
Open
fix(agents): strip internal proxy metadata from tool args#2456daryllimyt wants to merge 1 commit intomainfrom
daryllimyt wants to merge 1 commit intomainfrom
Conversation
…ersistence Extract proxy tool metadata helpers into tracecat/agent/mcp/metadata.py and strip __tracecat metadata at UI emission boundaries. Centralizes stripping in ToolInputAvailableEventPayload and MutableToolPart via __post_init__ to avoid scattering strip calls at every call site.
|
✅ No security or compliance issues detected. Reviewed everything up to 855dc84. Security Overview
Detected Code Changes
|
jordan-umusu
approved these changes
Apr 2, 2026
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
strip_proxy_tool_metadata,extract_proxy_tool_call_id,sanitize_message_tool_inputs) intotracecat/agent/mcp/metadata.py__tracecatmetadata stripping inToolInputAvailableEventPayloadandMutableToolPartvia__post_init__, removing ~10 scattered strip calls invercel.pyTest plan
test_agent_mcp_metadata.py— unit tests forstrip_proxy_tool_metadataandsanitize_message_tool_inputstest_approvals_manager.py— verifies approval args strip internal metadatatest_watchtower_service.py— verifies redacted args exclude internal metadataSummary by cubic
Stops leaking Tracecat-internal proxy metadata by stripping
__tracecatfrom tool args across UI events, persistence, and redaction. Centralizes the logic so tool inputs shown to users and saved to the DB no longer include internal IDs.Bug Fixes
__tracecatfrom tool inputs at emission (ToolInputAvailableEventPayload,MutableToolPart).Refactors
tracecat/agent/mcp/metadata.pywithstrip_proxy_tool_metadata,extract_proxy_tool_call_id,sanitize_message_tool_inputs.tracecat/agent/adapter/vercel.pyandtracecat/agent/mcp/proxy_server.pywith centralized helpers.Written for commit 855dc84. Summary will update on new commits.