worktree-manager
Warn
Audited by Gen Agent Trust Hub on Apr 4, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: Shell command injection vulnerability in
scripts/launch-agent.sh. The script uses AppleScript to launch terminal sessions in iTerm2, interpolating theWORKTREE_PATHvariable directly into a shell command string:write text "cd '$WORKTREE_PATH' && ...". Because the variable is wrapped in single quotes but not escaped, a worktree path containing a single quote followed by shell commands would result in arbitrary execution.\n- [COMMAND_EXECUTION]:jqfilter injection incleanup.sh,register.sh,status.sh, andlaunch-agent.sh. These scripts interpolate variables likePROJECT,BRANCH, andWORKTREE_PATHdirectly intojqfilter strings using double quotes. An attacker could craft a malicious project or branch name with escaped double quotes to manipulate the logic of registry operations, potentially leading to unauthorized modification or corruption of the~/.claude/worktree-registry.jsonfile.\n- [PROMPT_INJECTION]: Indirect prompt injection through unvalidated template substitution. The skill substitutes branch and project names into templates used to prompt newly launched Claude agent instances. These values are derived from the local git environment without sanitization or boundary markers, allowing a malicious repository with a crafted branch name to influence the instructions given to the launched agent instance.
Audit Metadata