git-worktrees
Warn
Audited by Gen Agent Trust Hub on Sep 28, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill is built around the Worktrunk (
wt) tool which executes arbitrary shell commands defined in configuration files. Specifically,references/hooks-reference.mdandreferences/parallel-agents-recipes.mddocument several hook types (post-start,pre-merge,pre-remove) that run shell scripts for tasks like dependency installation (npm ci), starting servers, and stopping processes (kill,docker stop). These commands are sourced from a project-level configuration file (.config/wt.toml) which is committed to the repository, presenting a risk if the agent operates on an untrusted or compromised codebase. - [DYNAMIC_EXECUTION]: The skill uses a templating engine (Tera-like) to assemble shell commands at runtime. Examples in
references/hooks-reference.mdshow variables like{{ branch }},{{ worktree_path }}, and{{ vars.port }}being interpolated into shell strings (e.g.,cd {{ worktree_path }} && npm ci). Although asanitizefilter is provided for some variables, this pattern remains a surface for command injection if input variables are not perfectly handled. - [INDIRECT_PROMPT_INJECTION]: The LLM commit generation feature documented in
references/llm-commits-setup.mdingests untrusted data from the repository (specifically{{ git_diff }}and{{ git_diff_stat }}) and interpolates it directly into a prompt template. This prompt is then piped to an external command (likeclaudeorllm). A malicious actor could craft a commit or a file diff containing instructions designed to hijack the LLM's output or the execution of the generation command. - [EXTERNAL_DOWNLOADS]: The skill recommends the installation of an external third-party tool, Worktrunk, via
brew install worktrunkinSKILL.md. While presented as a core utility for the skill's functionality, it introduces a dependency on external software not included in the skill package.
Audit Metadata