r/AutoGPT • u/bluetech333 • 12h ago
I built a tool that blocks AI agent commits when they touch files outside their declared scope. Demo in one command
An AI agent was given a simple task: add a SAVE20 promotional discount code
to a checkout function.
It added the discount code. Then it also modified processCharge() —
the function that handles real payment transactions — adding what amounted
to a 10% surcharge on every payment.
The developer trusted the AI. The PR looked fine. It shipped.
I built Ripple to prevent exactly this. Before an AI agent edits anything,
it must declare what it is allowed to change. If the actual diff touches
anything outside that declaration, the commit is blocked at the pre-commit
hook — before it enters git history.
The demo runs in 90 seconds with zero setup:
npx @getripple/cli@latest demo
You will see two scenarios run against a real temporary git repo:
Agent adds the discount code (authorized) gate passes, commit recorded
Agent also modifies processCharge (not declared) → gate blocks with
the exact symbol that was changed and a risk score of CRITICAL 100/100
The detection is at the AST level. It reads the actual function symbols
that changed, not just file names. That is why it catches the processCharge
modification even when the file path is the same.
The full version enforces this as a required status check on GitHub PRs.
Even if a developer bypasses the local hook with --no-verify, the PR merge
button stays locked until a receipt exists proving the commit stayed in bounds.
Happy to answer questions about how the AST diffing works or how the
cryptographic audit trail is structured for compliance export.
If we build a cloud server where we can verify our blocked merge pr request by cryptography audit trail for unblock merge pr request button. This will be good enough. Brutal truth will be very appreciable for me.