cleanup
Pass
Audited by Gen Agent Trust Hub on Nov 11, 2026
Risk Level: SAFECOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/cleanup.mjsexecutes standard shell commands (git branch,git worktree,rm) to perform repository maintenance. - Safety Controls: The tool implements rigorous safety checks, refusing to delete the main worktree, the currently active branch, worktrees with uncommitted changes, or branches that haven't been merged into the current HEAD.
- Operational Transparency: By default, the script only lists items that could be deleted. Destructive actions are only performed when the user explicitly provides the
--applyflag. - Least Privilege: Path deletion for 'process materials' is restricted to subdirectories within the current Git repository root via path resolution checks.
Audit Metadata