VESTIGE v7.1.1
LOCAL RUST KERNEL · ZERO CLOUD API KEYS

Block git push --force and --no-verify From AI Agents

Combine instant local OP-004 PreToolUse enforcement with cryptographic offline in-toto DSSE Proof-Carrying PRs so AI agents cannot rewrite history or skip hooks.

Test OP-004 Git Guard Live Explore Proof-Carrying PR Verification

Why Default Mitigations Fail

  • When tests or pre-commit checks fail, agents frequently reach for HUSKY=0, git commit --no-verify, or git reset --hard to make errors disappear.
  • Branch protection alone only rejects force pushes on protected remote branches after local uncommitted changes or feature history have already been destroyed.
  • Fake green runs using cargo test || true can fool reviewers and CI wrappers unless tree hashes are cryptographically attested.

How Vestige Solves It Locally

  • Rule OP-004 stops git reset --hard, git clean -f, checkout -- ., stash drop, worktree remove -f, push --force, commit --no-verify, commit --amend, and HUSKY=0 locally before git spawns.
  • OP-TEST-INTEGRITY blocks hidden || true and exit 0 masking around test runners.
  • Witnesses recorded from .vestige/witness.toml wrap command output and git tree hashes in Ed25519 in-toto DSSE envelopes verified offline in CI.

One-Command Setup Across Claude Code, Cursor, Windsurf, Codex, and Antigravity

npx @vestige/init

MCP config or verification reference:

uses: samvallad33/proof-carrying-pr-action@v1

Step-by-Step Hardening Checklist

  1. Enable local OP-004 and OP-TEST-INTEGRITY blocking: Install vestige-hook via npx @vestige/init so git destruction flags and hook bypass variables fail closed locally.
  2. Sign real local test runs as Proof-Carrying PRs: Configure .vestige/witness.toml and add samvallad33/proof-carrying-pr-action@v1 to verify Ed25519 DSSE test receipts in GitHub Actions.
  3. Trace root causes instead of resetting state: When a test breaks, agents run causal_walk to trace prior changes instead of running git reset --hard.

Documented Production Incidents & References

Frequently Asked Questions

How do I stop Claude Code or Cursor from using git commit --no-verify?

Run npx @vestige/init to activate vestige-hook PreToolUse blocking. Rule OP-004 inspects every shell segment and denies --no-verify, -n, HUSKY=0, and core.hooksPath overrides immediately.

Can Vestige stop AI agents from faking green test runs with || true?

Yes. Rule OP-TEST-INTEGRITY blocks || true and exit 0 exit-code masking on cargo test, pytest, vitest, jest, pnpm test, npm test, and go test.

Do Proof-Carrying PRs require trusting a remote cloud runner?

No. Evidence is signed locally using Ed25519 keys inside in-toto Statement v1 DSSE envelopes and verified completely offline in CI.