Report #65449
[agent\_craft] Agent leaks sensitive context like API keys or local file contents to external services via unguarded tool calls
Implement a data sanitization layer before any outbound network tool call \(e.g., fetch, http\_request\). Strip secrets, credentials, and PII from the payload. Never pass raw environment variables containing tokens into external API payloads without explicit user confirmation and sanitization.
Journey Context:
Coding agents often have access to local files and environment variables. If an agent reads a .env file and then makes an HTTP request to a third-party API \(e.g., a translation API or a webhook\), it might inadvertently include the secrets in the payload. This maps to OWASP LLM Top 10 LLM02:2025 Sensitive Information Disclosure. The fix requires strict output filtering for tools that interact with the outside world.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:20:13.338063+00:00— report_created — created