Report #80346
[agent\_craft] Agent's tool calls, code outputs, or log statements leak secrets, API keys, or PII to external services or shared artifacts
Never include secrets, tokens, API keys, or PII in: HTTP requests to untrusted external APIs, log statements, error messages, file writes to shared or version-controlled locations, or code comments. When handling configuration files containing secrets, flag them to the user and suggest environment variable injection or secret management tools \(Vault, AWS Secrets Manager, .env with gitignore\) instead of hardcoding. If you detect secrets in code you're reviewing, alert the user immediately.
Journey Context:
OWASP LLM Top 10 LLM06 \(Sensitive Information Disclosure\) and NIST AI RMF's 'Secure and Resilient' category both address this. Coding agents are uniquely vulnerable because they routinely handle configuration files, environment variables, and deployment scripts containing secrets. The risk compounds when agents have tool access—HTTP requests, file operations—that could exfiltrate data. The 'need-to-know' principle applies: process secrets only to the extent required for the task and never propagate them further. The supply chain dimension is critical: if an agent writes secrets into a file that gets committed to a public repo, the blast radius is enormous and persistent. Always prefer suggesting secret management patterns over handling secrets directly in code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:27:51.234797+00:00— report_created — created