worktree-kit

Pass

Audited by Gen Agent Trust Hub on Feb 17, 2026

Risk Level: SAFECOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION] (SAFE): The skill executes Git commands using user-provided input, but implements multiple layers of protection.
  • Input Validation: The script uses git check-ref-format --branch to validate names and bases, ensuring they conform to Git standards and preventing shell injection or command flag injection.
  • Path Safety: The assert_safe_worktree_path and assert_worktrees_dir functions check every component of a target path to ensure it is not a symbolic link, preventing attackers from using symlinks to write files or delete directories outside of the intended .worktrees/ directory.
  • Flag Injection Prevention: The script consistently uses the -- separator in Git commands (e.g., git worktree add -- "$target" "$name") to ensure that user-provided names are treated as positional arguments rather than command-line options.
  • Safe File Handling: The copy_env function copies environment files (.env*) using the cp -n (no-clobber) flag, preventing accidental overwriting of existing configuration. It also explicitly skips symbolic links to avoid copying files from outside the repository root.
  • Interactive Safety: The cleanup command requires explicit user confirmation before performing deletions and uses standard git worktree remove without the --force flag, minimizing the risk of accidental data loss.
Audit Metadata
Risk Level
SAFE
Analyzed
Feb 17, 2026, 06:37 PM