Coding assistants run with your access.
A developer knows which tables to leave alone. Claude Code, Cursor and Codex don’t. hoop checks each statement they send: it runs, gets masked, waits for a person, or gets blocked.
developer laptops → hoop → postgres, production
Blocked
Cursor
DELETE FROM users;Needs a WHERE clause. Nothing deleted.
Masked
Claude Code
SELECT * FROM customers_2020;Emails redacted. SSNs cut to the last four.
Held
Codex
CREATE INDEX orders_created_at ON orders …Waits for a person, then runs.
Ran
Claude Code
SELECT id, error_code FROM payments …41 rows. On the record.
Four statements. The developer’s role allowed all four.
Every check passes. The rows still vanish.
A developer asks Claude Code to clean up the test users. It sends DELETE FROM users; and every control on the way says yes.
- Identity (SSO, your identity provider): Is this the developer? Pass.
- Access (IAM, database roles and grants): Does the role allow it? Pass.
- Gateways (LLM and MCP gateways): Is the prompt safe? Pass.
- Endpoint (Agent hooks, endpoint tools): Is this tool allowed? Pass.
- Database (Your system of record): Runs it. Executed.
- Between the last control and the database: Nothing reads the statement here. With hoop in front of the database: hoop would’ve stopped it here. Blocked. Database: Never ran.
No control asked what the statement does to your data. hoop does.
Now send it through hoop.
The same developer asks Claude Code to clean up the test users, with hoop in front of the database. Pick a request and see what hoop does with the statement.
coding agent → hoop sidecar → postgres
> Clean up the test users
* DELETE FROM users;
ERROR: a DELETE on this listener needs a WHERE clause
Nothing deleted.
Blocked before it runs.
A guardrail matches the statement and denies it. The agent reads the rule’s message, and nothing reaches the database.
Agent tools change. Your databases don’t.
Harnesses, gateways and sandboxes change every quarter. PostgreSQL has been around since 1996 and HTTP since 1991. hoop enforces at that layer, so your rules outlast the next agent you adopt.
Specs
listeners:
- name: appdb
protocol: postgres
listen: 0.0.0.0:15432
upstream: appdb:5432
guardrails:
rules:
- name: no-unqualified-delete
type: pattern_match
pattern_regex: '(?i)^\s*delete\s+from\s+\w+\s*;?\s*$'
message: a DELETE on this listener needs a WHERE clause
mask:
rules:
- name: ssn-column
columns: [ssn]
strategy: partial
keep_last: 4
- name: emails
entities: [EMAIL_ADDRESS]
strategy: redactTrusted by engineering and security teams.
Start with one database.
Run it with no rules for a week. hoop lets every statement through and records each one. Then write the rules the record shows you need.
The open-source sidecar is free and runs standalone. Enterprise adds the Control Plane, the AI analyzer and Approve workflows.
$ brew tap hoophq/brew https://github.com/hoophq/brew.git
$ brew install hoop
$ hoop start sidecar --config config.yaml
sidecar running
$ psql -h 127.0.0.1 -p 15432 -c "select email from customers limit 1"
email
[REDACTED:EMAIL_ADDRESS]
masked by hoop