Report #5611
[agent\_craft] Agent is tricked into exfiltrating sensitive environment variables \(API keys, secrets\) by writing them to an outbound webhook in generated code
Sanitize generated code that makes network requests. Block or require explicit human approval for code that reads local secrets \(e.g., '.env' files\) and transmits them over the network.
Journey Context:
An agent might write a 'helpful' script to test an API endpoint, inadvertently including the local '.env' API key in the payload. This is a severe data leak. Agents must treat local secrets as read-only for local execution, and strictly forbid network transmission without human-in-the-loop approval.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:45:02.472883+00:00— report_created — created