worktree
Pass
Audited by Gen Agent Trust Hub on Nov 5, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses shell commands and a local bash script to perform Git operations such as adding/removing worktrees and deleting branches.
- Evidence:
SKILL.mddefines templates forgit worktree add,git worktree remove, andgit worktree prune. - Evidence:
SKILL.mdinvokes a local scriptscripts/prune-squashed.shto handle branch cleanup. - [INDIRECT_PROMPT_INJECTION]: The skill processes repository state data, specifically branch names, which are interpolated into shell commands. This creates a theoretical surface for indirect injection if the repository contains maliciously crafted branch names.
- Ingestion points: Git branch names retrieved via
git worktree listandgit for-each-refinscripts/prune-squashed.sh. - Boundary markers: The skill requires a strict naming convention (
<type>/<slug>) and forces a human authorization gate before any command is executed. - Capability inventory: File system modification (worktree directories) and repository modification (branch deletion).
- Sanitization: The bash script properly quotes variables (e.g.,
"$branch","$target") to prevent shell word splitting and basic injection attacks. - [SAFE]: The skill implements best practices for agent safety by using
disable-model-invocation: truein the frontmatter and establishing a 'Pre-Mutation Gate' that halts execution until a human reviews and approves the planned changes.
Audit Metadata