Credential Access
- Category
- Privilege Escalation
- Confidence
- 91% confidence
- Finding
The skill explicitly supports copying .env files into worktrees, and those files commonly contain secrets such as API keys, database passwords, and tokens. Even though the text includes some safeguards, duplicating credential-bearing files across additional checkouts expands secret exposure, risks accidental execution against copied credentials, and increases the chance of leakage through logs, tests, commits, or compromised dependency scripts.
- Content
md | `create [--no-env] <branch> [from]` | Create worktree + branch (default: from main) | `...worktree-manager.sh create feature-login` | | `list` / `ls` | List all worktrees with status | `...worktree-manager.sh list` | | `switch <name>` / `go` | Print the registered worktree's absolute path; the caller applies it as workdir | `target=$(...worktree-manager.sh switch feature-login)` | | `copy-env <name>` | Copy .env files to existing worktree | `...worktree-manager.sh copy-env feature-login` | | `cleanup <name> [...]` / `clean` | Confirm removal of named, session-owned, clean worktrees | `...worktree-manager.sh cleanup feature-login` | Run commands with `env -C "$target" <command>` or the harness workdir argument. A child script cannot change the caller's working directory. Listing and name resolution work from any main or linked checkout, including subdirectories.
