system-state-injection
Warn
Audited by Gen Agent Trust Hub on Jun 22, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/update_state.pyexecutes arbitrary shell commands through therun_checkfunction, which callssubprocess.run(cmd, shell=True). The commands are retrieved from theintegrations.jsonconfiguration file, allowing for potentially dangerous system operations if the configuration is tampered with.\n- [PROMPT_INJECTION]: The skill architecture facilitates indirect prompt injection by instructing the agent to trust the system state file.\n - Ingestion points: The agent is instructed in
SKILL.mdto readbrain/system_state.jsonbefore answering status-related questions.\n - Boundary markers: No delimiters or instructions to ignore embedded commands are present in the agent instructions or the generated JSON data.\n
- Capability inventory: The skill includes file-writing capabilities and shell command execution via
subprocess.runinscripts/update_state.py.\n - Sanitization: The script captures the raw output of system commands and writes it directly to the JSON file without any escaping, filtering, or validation, allowing malicious text from a monitored service to influence the agent.
Audit Metadata