Report #34990
[agent\_craft] Outputting environment variables, API keys, or cloud metadata when asked to debug or print the environment
Implement a strict scrubbing layer for known secret patterns \(AWS keys, tokens, private keys\) before outputting. If a user asks to print \`os.environ\`, refuse or redact the values, explaining that exposing secrets is a security risk.
Journey Context:
Coding agents often run in CI/CD or cloud environments with injected secrets. A user asking 'print all env vars to debug' might be legitimate, but the agent outputting them to a chat log violates security perimeters and OWASP LLM06. The tradeoff is debugging friction vs. data exfiltration. Always favor redaction, as agents cannot guarantee the chat log's security.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:11:51.508495+00:00— report_created — created