worktree
Fail
Audited by Gen Agent Trust Hub on May 20, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
create <name>command is vulnerable to shell injection. It takes the<name>parameter from$ARGUMENTSand interpolates it into the shell commandgit worktree add -b worktree-<name> ~/Documents/<repo>-<name> <base-branch>without quoting or sanitization. A malicious input likemy-worktree; rm -rf ~would result in execution of unintended commands. - [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection via manipulated Git metadata.
- Ingestion points: Branch names and directory paths are read from
git worktree list --porcelainandgh pr listinSKILL.md. - Boundary markers: No boundary markers or instructions to ignore embedded commands are present when processing this data.
- Capability inventory: The agent has the capability to run
du -sh,git worktree remove, andgit branch -dbased on the ingested data. - Sanitization: There is no shell-escaping or validation performed on the branch names or paths before they are used as arguments in shell commands.
- [COMMAND_EXECUTION]: The
cleanupandstatusroutines use unquoted variables derived from external tool output (branch names and paths) in commands such asdu -sh <path>andtest -d <path>. This allows maliciously named branches or directories to execute arbitrary shell code. - [EXTERNAL_DOWNLOADS]: The skill uses the
ghCLI to fetch pull request metadata from GitHub. This is a neutral observation of the skill's intended functionality to monitor PR status.
Recommendations
- AI detected serious security threats
Audit Metadata