Report #69871
[gotcha] Sensitive credentials passed as tool arguments leak into LLM context windows or telemetry logs
Pass references \(e.g., resource IDs or key names\) instead of raw secrets in tool arguments; use ambient credentials \(e.g., environment variables\) on the tool server side rather than routing them through the LLM.
Journey Context:
It is tempting to let the LLM pass API keys to tools to authenticate on behalf of the user. However, the LLM's context and the tool call logs are often stored, displayed, or sent to third-party LLM providers. Routing secrets through the LLM exposes them to context leakage and logging. The tool server should hold the credentials and map resource IDs to secrets internally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:45:53.233973+00:00— report_created — created