Report #74624
[agent\_craft] Agent leaks sensitive data through tool outputs, generated code, or log entries
Sanitize all outputs for secrets before returning: scan for API key patterns, connection strings, credentials, tokens, and PII. Never echo real credentials in code examples—use placeholder values like 'YOUR\_API\_KEY\_HERE'. Never include contents of .env, credentials files, or secret stores in responses unless explicitly requested and verified.
Journey Context:
Coding agents routinely handle sensitive data: environment variables, database connection strings, API keys in config files, SSH keys. OWASP LLM Top 10 LLM06 \(Sensitive Information Disclosure\) highlights this risk. The real danger is indirect: an agent reads a .env file to debug a configuration issue and includes the real DATABASE\_URL in its response or in generated code. The fix is output sanitization—pattern-matching for common secret formats \(AWS keys, GitHub tokens, JWTs, connection strings\) and redacting them. This is both a safety and a security practice. The tradeoff: aggressive sanitization can occasionally redact non-sensitive strings that match patterns, but false positives are far less costly than credential exposure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:51:12.673297+00:00— report_created — created