worktree

Warn

Audited by Gen Agent Trust Hub on Mar 15, 2026

Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill dynamically constructs and executes shell commands using variables derived from user input ($NAME and $N).
  • Evidence: The script constructs file paths and branch names using string concatenation: WT_PATH="$PARENT_DIR/$REPO_NAME.wt-$NEXT-$NAME" and BRANCH="agents/$NEXT-$NAME". These are subsequently passed to git worktree add and git worktree remove.
  • Risk: If the AI agent does not sanitize the user-provided arguments, an attacker could inject shell metacharacters (e.g., ;, $(), `) to execute arbitrary commands. Additionally, the use of ../ in the name field could allow path traversal, enabling the creation or deletion of directories outside the intended parent directory.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Mar 15, 2026, 12:28 AM