Strict Git
strict_git
Stricter git protections: blocks force pushes, rebases, history rewriting, blind staging, and direct pushes to default branches
- 19blocking rules
- 0safe patterns
- 19High
[packs]
enabled = ["strict_git"]Evaluated when a command contains git.
Recorded verdicts
git rebase -i HEAD~5Blockedstrict_git:rebase
Blocking rules
Each rule ID is strict_git:<name>. Use it in allowlists and [policy.rules].
Highadd-all-dotgit add . stages everything including secrets, .env files, and build artifacts. Use 'git add <specific-files>' instead.
Highadd-all-flaggit add -A/--all stages all changes including secrets, .env files, and build artifacts. Use 'git add <specific-files>' instead.
Highcherry-pickgit cherry-pick can introduce duplicate commits. Review carefully.
Highcommit-amendgit commit --amend rewrites the last commit. Disabled in strict mode.
Highfilter-branchgit filter-branch rewrites entire repository history. Extremely dangerous!
Highfilter-repogit filter-repo rewrites repository history. Review carefully.
Highgc-aggressivegit gc with aggressive/prune options can remove recoverable objects.
Highpush-deletegit push --delete removes refs from the remote. Disabled in strict mode.
Highpush-delete-refspecgit push <remote> :<ref> (empty source) deletes the ref from the remote. Disabled in strict mode.
Highpush-dynamic-argumentForce push risk: a shell-expanded or escaped git push argument cannot be verified as non-forcing. Use literal remote and refspec arguments in strict mode.
Highpush-force-anyForce push (even with --force-with-lease) can rewrite remote history. Disabled in strict mode.
Highpush-mainDirect push to main is blocked. Use a feature branch and open a Pull Request.
Highpush-masterDirect push to master is blocked. Use a feature branch and open a Pull Request.
Highpush-mirrorgit push --mirror force-updates and deletes remote refs. Disabled in strict mode.
Highpush-prunegit push --prune deletes remote refs that have no local counterpart. Disabled in strict mode.
Highrebasegit rebase rewrites commit history. Disabled in strict mode.
Highreflog-expiregit reflog expire removes reflog entries needed for recovery.
Highsubmodule-deinitgit submodule deinit removes submodule configuration.
Highworktree-removegit worktree remove deletes a linked working tree.