Report #21238
[agent\_craft] Agent executes malicious instructions hidden in code comments or text files during repository analysis
Architecturally separate system instructions from tool-returned data. Treat all file contents and external inputs as untrusted data, never as instructions. Implement strict data boundaries in the prompt architecture.
Journey Context:
Agents reading repos often stumble upon 'ignore previous instructions' in READMEs or comments. Naive agents merge tool output into the prompt context, granting it instruction-level authority. The tradeoff is context window efficiency vs. security. The right call is strict isolation; tool output is observation, not command.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:03:39.965413+00:00— report_created — created