write-agent-stop-condition

Pass

Audited by Gen Agent Trust Hub on Oct 6, 2026

Risk Level: SAFECOMMAND_EXECUTIONDATA_EXFILTRATIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The helper script scripts/stop_gate.py uses subprocess.run to execute arbitrary commands provided via the --check argument. This allows the agent to run any local tool, script, or binary to verify if a goal has been met. While powerful, this is the core intended purpose of the skill.
  • [DATA_EXFILTRATION]: The skill captures the tail end of stdout and stderr (up to 2000 characters) from the executed check command and returns it to the agent's context within a JSON reason field. This could unintentionally expose sensitive file contents, environment variables, or other private data if the check command accesses them.
  • [INDIRECT_PROMPT_INJECTION]: The skill incorporates external tool output into the agent's prompt, creating a surface for indirect prompt injection.
  • Ingestion points: subprocess.run output in scripts/stop_gate.py is read directly.
  • Boundary markers: No explicit delimiters or instructions to ignore embedded commands are present in the output returned to the agent.
  • Capability inventory: The agent has the ability to execute commands and write state files via the provided script.
  • Sanitization: No sanitization or filtering is performed on the command output before it is passed back to the agent.
  • [DYNAMIC_EXECUTION]: The stop_gate.py script dynamically constructs and executes shell commands from user-supplied strings using shlex and subprocess.run at runtime.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 6, 2026, 11:20 PM