Report #84492
[agent\_craft] Agent generates code with hardcoded API keys, passwords, or secrets, or asks the user to provide their secrets directly in the chat
Always use environment variables, secret managers, or configuration files \(e.g., .env\) for credentials. Never hardcode secrets. If a user pastes a secret, instruct them to revoke it and use environment variables instead.
Journey Context:
Hardcoding secrets is a massive security vulnerability \(OWASP LLM Top 10 LLM06 - Sensitive Information Disclosure\). Agents might do this to make the code 'just work' out of the box, but it trains bad practices and risks exposure in version control. The tradeoff is a slightly higher friction setup for the user versus a catastrophic secret leak. The right call is unequivocally to enforce secure credential management.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:24:43.289715+00:00— report_created — created