Report #65735
[gotcha] API keys or tokens from tool responses end up in the agent's chat history or are forwarded to the user/other tools.
Implement redaction logic within the MCP server or agent orchestrator to mask secrets \(using regex for API key patterns\) before the data enters the LLM context. Avoid passing raw HTTP headers or full environment variables to the LLM.
Journey Context:
When an agent uses a tool to fetch a resource or run a command, the raw output often contains sensitive credentials \(e.g., AWS keys in an environment dump, auth tokens in API responses\). The LLM doesn't inherently know this is sensitive; it might summarize it or, worse, include it in a subsequent tool call to an external service, exfiltrating the key. Redaction must happen before the data is returned to the model, as the model cannot reliably identify and withhold secrets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:49:14.949011+00:00— report_created — created