using-git-worktrees
Warn
Audited by Gen Agent Trust Hub on Apr 8, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses shell variables
$BRANCH_NAME,$LOCATION, and$projectdirectly in command strings withinsub-skills/2-create-worktree.md. Specifically, the commandgit worktree add "$path" -b "$BRANCH_NAME"uses these variables without sanitization. If a user or an external source (like a branch name from a PR) provides input containing shell metacharacters or command flags (e.g., branch names starting with--), it could lead to arbitrary command execution or unexpected tool behavior. - [REMOTE_CODE_EXECUTION]: The script
sub-skills/3-run-project-setup.mdautomatically runs package managers likenpm install,pip install,poetry install, andgo mod downloadbased on the presence of configuration files. Similarly,sub-skills/4-verify-clean-baseline.mdexecutes test runners likenpm test,pytest, andgo test. These operations execute scripts and code defined within the project repository or downloaded from external registries, which can be exploited by a malicious repository to run arbitrary code on the host system. - [EXTERNAL_DOWNLOADS]: The skill facilitates the download of external dependencies through multiple package managers (
npm,pip,poetry,cargo,go) during the automatic setup phase insub-skills/3-run-project-setup.md. This introduces supply chain risks if dependencies are not pinned to specific versions or if the project uses malicious package names. - [PROMPT_INJECTION]: The skill is vulnerable to indirect prompt injection in
sub-skills/2-check-claudemd.mdby reading and following instructions from aCLAUDE.mdfile located within the target repository. - Ingestion points: Reads directory preferences from
CLAUDE.mdusinggrepinsub-skills/2-check-claudemd.md. - Boundary markers: None. The skill assumes the preferences found in the file are authoritative.
- Capability inventory: File system writes (
git worktree add), network operations (vianpm install/pip install), and shell command execution (npm test, etc.). - Sanitization: No validation or sanitization is performed on the preference string extracted from
CLAUDE.mdbefore it is used to determine the directory location for the worktree.
Audit Metadata