cd /news/ai-safety/gate-cat-a-deterministic-fail-closed… · home topics ai-safety article
[ARTICLE · art-70999] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=· neutral

gate.cat: a deterministic, fail-closed veto that stops AI coding agents before rm -rf

A developer released gate.cat, a deterministic, fail-closed veto tool that blocks dangerous shell commands—such as rm -rf, DROP TABLE, and secret exfiltration—before they execute, using string and path analysis with no model call in the veto path to prevent prompt injection bypasses. The tool is free, Apache-2.0 licensed, and designed to be used alongside sandboxes, not as a replacement.

read1 min views1 publishedJul 23, 2026

AI coding agents now run real shell commands. Most "guardrails" log the damage after the fact. gate.cat vetoes the execution itself — before the shell sees it.

It blocks irreversible shell commands (rm -rf

, DROP TABLE

, terraform destroy

, secret exfiltration via scp

/curl

) before they execute. The check is deterministic string + path analysis plus an independent exec analyzer — no model call in the veto path, so a prompt injection can't talk the gate into allowing something. Fail-closed: anything it can't parse becomes a block, never a silent allow.

pip install gate.cat

, then add gatecat-hook

to .claude/settings.json

with matcher Bash|Write|Edit

.$SHELL

): use gatecat-shell .base_url

.Every number below has a row in FACTS.md

in the repo, pinned to a reproducible artifact:

The gate is certain only about what it blocks. An unmatched action is unchecked, not safe. It's a wall in front of known-dangerous shapes, not a proof of safety — use it with your sandbox, not instead of one.

Free forever, Apache-2.0, zero-dependency core.

pip install gate.cat

What I'd genuinely like feedback on: does publishing our own bypass map and a documented false-block build more trust than a clean number would? That was the hardest design call.

── more in #ai-safety 4 stories · sorted by recency
── more on @gate.cat 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/gate-cat-a-determini…] indexed:0 read:1min 2026-07-23 ·