Report #38715
[gotcha] Secret exposure in LLM tool arguments
Inject secrets at the tool execution layer \(e.g., via environment variables or a secrets manager\) rather than passing them through the LLM context window.
Journey Context:
Agents often need to authenticate to APIs. A naive approach is to give the agent the API key and let it pass it as an argument. This puts the key in the prompt history, which might be sent to the cloud LLM, and also exposes it in logs. The better pattern is to inject the secret at the tool execution layer without the LLM ever seeing it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:27:24.752441+00:00— report_created — created