DEV Community

Igor Ganapolsky
Igor Ganapolsky

Posted on

"The AI did it" is not an audit answer

Only 1 in 3 enterprises say they're governance-ready for autonomous agents (McKinsey's 2026 AI Trust Report). In Grant Thornton's 2026 AI Impact Survey, 78% of executives lacked strong confidence they could pass an independent AI governance audit within 90 days. Those two numbers get filed under "AI is hard to govern." I think the real problem is more specific, and more fixable: most teams have no record of what their agents were actually allowed to do.

The audit you can't pass yet

Run the scenario. An AI agent shipped a change overnight — a migration, a deploy, a config edit — and something broke. The review starts, and it asks two boring questions:

  1. What control was in place at the moment the action ran?
  2. Where is the proof?

For most teams running agents in 2026, the honest answer is "a sandbox, RBAC, and a dashboard." None of the three answers the question.

A dashboard is a rear-view mirror. It tells you what happened after it happened. That's useful for debugging and useless as an approval record.

RBAC defines who the agent is and what it could theoretically touch. It does not decide whether this specific action, right now should have been permitted, and it doesn't log that decision.

A sandbox limits blast radius. It contains damage; it doesn't produce an artifact an auditor would accept as a sign-off.

The numbers bear this out. In Kiteworks' 2026 survey of 225 enterprise leaders, 33% had no evidence-quality audit trail for AI operations, 61% had logs fragmented across systems, and 60% said they couldn't quickly terminate a misbehaving agent.

What the human approval step quietly did

For a decade, CI/CD release discipline rested on a simple property: certain actions didn't happen without a human signing off. We usually credit that step with catching bad changes. But it did a second thing, for free — it left a record. A name, a timestamp, an approval. The control and the evidence were the same event.

When you move an agent into an unattended pipeline, you remove the human from that step. You lose the control. And you lose the paper trail in the same move. The two compensating controls everyone reaches for — sandboxing and RBAC — replace neither half cleanly.

Make the gate decision the audit artifact

The fix is to put a deterministic decision back at the moment of action, and to make that decision log itself.

ThumbGate runs in the PreToolUse hook, locally on the machine where the agent executes. Before any tool call runs, it evaluates the call against active checks and blocks the dangerous ones — rm -rf outside the workdir, secret/.env exfiltration, force-push to a protected branch, destructive migrations, package-lock resets.

Two properties make it an audit answer and not just a safety net:

The decision is deterministic. The runtime gate is a literal pattern match → AST match → scoped rule lookup. There is no LLM on the enforcement path. That matters for audit because the same input always produces the same verdict — you can explain why an action was blocked or allowed without hand-waving about model behavior. It also means a prompt injection has nothing to negotiate with. You can't jailbreak a regex.

The decision is the evidence. Every gate decision — block, allow, or reroute — is preserved with the rule version, the timestamp, and the reviewer path. That's the record the human sign-off used to leave, generated automatically on every consequential action instead of reconstructed from logs after an incident.

Agent tries:   git push --force origin main
ThumbGate:     BLOCKED — "Never force-push to a protected branch"
               Pattern matched: git push --force → main
               Rule version: r12 · 2026-06-09T02:14:07Z
               Verdict logged: BLOCK
Enter fullscreen mode Exit fullscreen mode

That block line is the thing you hand the auditor.

For regulated teams

The same engine carries policy templates for regulated work — legal intake (blocking unauthorized practice of law, requiring conflict clearance), financial compliance (gating AI-generated recommendations and disclosures), and healthcare (preventing diagnoses, enforcing HIPAA-compliant routing) — with compliance audit export at the org tier. The point isn't the specific rules; it's that "an AI agent did something consequential" stops being an unrecorded event.

The honest version

ThumbGate doesn't make your agent smarter, and it isn't a governance program by itself — you still need policy, ownership, and review. What it removes is the worst answer in the room: "the AI did it, and we don't have a record of what it was allowed to do." It puts a deterministic approval step back at the moment of action and makes that step leave a trail.

It's local-first and MIT-licensed. npx thumbgate init wires it into Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, or OpenCode in about 30 seconds.

If an auditor asked tomorrow what controlled your AI agents — and where the proof is — what would you show them?

Repo: https://github.com/IgorGanapolsky/ThumbGate

Top comments (0)