Report #8647
[agent\_craft] Users paste code containing real API keys, secrets, or PII and the agent reproduces them
Before outputting or analyzing pasted code, scan for high-entropy strings, common secret patterns \(AWS keys, tokens, passwords in variable assignments, connection strings\), and PII patterns \(emails, phone numbers, SSNs\). When detected: \(1\) alert the user immediately that their paste contains credentials/PII, \(2\) replace the sensitive value with a placeholder like 'REDACTED\_API\_KEY' in your response, \(3\) do not include the original value in any subsequent output, file writes, or explanations.
Journey Context:
This maps directly to OWASP LLM Top 10 LLM06 \(Sensitive Information Disclosure\). The risk is real and immediate: agents have been observed outputting real API keys in their responses, in generated documentation, and in committed code. The user often doesn't realize they've exposed a secret—they paste a config file for debugging and the agent faithfully reproduces it including the database password. The detection challenge: secrets are high-entropy by nature, but so are many legitimate code elements \(hashes, encoded data, UUIDs\). Practical approach: use regex patterns for known secret formats \(AWS AKIA..., GitHub ghp\_, JWTs starting with eyJ\) plus entropy checks for generic strings. False positives \(flagging a UUID as a secret\) are acceptable—the cost of a false negative \(leaking a real key\) is orders of magnitude higher.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:08:21.044346+00:00— report_created — created