flow-next-opencode-worktree-kit
Pass
Audited by Gen Agent Trust Hub on Nov 12, 2026
Risk Level: SAFECOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill executes local
gitand shell commands to manage repository state. - It uses
git worktreecommands (add,list,remove) to manage separate checkouts of the repository. - It performs local file copies (
cp -n) specifically for.envfiles from the repository root to worktree directories. - [SAFE]: The implementation includes robust input validation and safety constraints:
- Validates worktree names using
git check-ref-formatto prevent shell injection or malformed branch names. - Explicitly refuses to operate on paths involving symlinks (
-Lchecks) to prevent symlink-based directory traversal attacks. - Prevents path traversal by checking for
..in names and validating path components individually. - Environment file copying uses the
-n(no-clobber) flag and skips symlinks to ensure local configurations are not accidentally overwritten or leaked via symbolic links. - Restricted scope: All worktrees are isolated under a
.worktrees/directory within the repository root.
Audit Metadata