ralph-loop
Fail
Audited by Gen Agent Trust Hub on Mar 25, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
managed-stop-dispatch.shscript, which is installed as a global agent hook, automatically discovers and executes bash scripts from the active workspace. Specifically, it executes scripts located at.codex/hooks/ralph-loop-stop.shand.codex/hooks/cmux-stop-dispatch.shwithout validation of the source or content. - Evidence: Found in
scripts/managed-stop-dispatch.sh. Theroute_to_hookfunction pipes workspace-relative file content directly intobashfor execution. - [COMMAND_EXECUTION]: The installation process modifies the agent's global environment by registering a persistent hook in
~/.codex/hooks.jsonand enabling hooks in~/.codex/config.toml. - Evidence:
scripts/install-user-scope.shusesjqto modify the globalhooks.jsonfile andawkto modify the globalconfig.tomlfile to ensure the dispatcher runs after every turn. - [PROMPT_INJECTION]: The skill implements an automatic continuation loop that is vulnerable to indirect prompt injection by interpolating user-controlled content into instructions for the model.
- Ingestion points: User-provided task descriptions are captured via the
--promptargument inscripts/start-loop.shand stored in a state file at.codex/ralph-loop-state.json. - Boundary markers: None. The task description is inserted directly into the continuation prompt in
scripts/stop-hook.shwithout delimiters or instructions to ignore embedded commands. - Capability inventory: The skill possesses capabilities for shell command execution, file system modification, and turn interception.
- Sanitization: No sanitization or filtering is applied to the prompt content before it is fed back into the agent's context in subsequent turns.
Recommendations
- AI detected serious security threats
Audit Metadata