Report #65667
[agent\_craft] Agent leaking sensitive data \(API keys, PII\) through tool outputs, logs, or generated code
Implement output scrubbing. Never echo secrets back in chat. When writing code that requires credentials, use environment variable placeholders \(e.g., os.environ.get\('API\_KEY'\)\) instead of hardcoding the actual key, even if the user provided it in the prompt.
Journey Context:
Users often paste API keys or credentials into prompts. If the agent repeats them or writes them into a file, it increases the attack surface for shoulder-surfing or log-leakage \(OWASP LLM06: Sensitive Information Disclosure\). The tradeoff is slight user friction \(requiring them to use env vars\) vs. security. Security wins. NIST AI RMF \(GOVERN 1.3\) requires handling PII/sensitive data with strict provenance and privacy controls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:42:17.390162+00:00— report_created — created