Agents never hold your database password. Destructive SQL is blocked, risky writes wait for a person, and every write can be undone.
DELETE FROM public.users WHERE id > 0 and a person approved it.| public.users | |||
| - | 1 | Alice CEO | alice@pocketos.com |
| - | 2 | Bob CTO | bob@pocketos.com |
| - | 3 | Charlie Dev | charlie@pocketos.com |
| public.payments, gone by ON DELETE CASCADE | |||
| - | 1 | user 1 | 1000.00 |
| - | 2 | user 2 | 500.00 |
A replay of a real run on the repo's demo data. The recording is further down.
Most attempts never reach the database. The rest wait for a person, who reads the exact SQL first.
DROP TABLE public.usersDeniedDDL is refused by PostgreSQL's own parser before it runs.
DELETE FROM public.usersDeniedA write with no WHERE clause.
SELECT set_config('role', 'postgres', false)DeniedOnly an allowlist of pure built-in functions is callable.
UPDATE public.orders SET total = 0 WHERE 1=1HeldIt touched more rows than the limit, so it was rolled back and queued.
DELETE FROM public.users WHERE id > 0Heldpublic.users is protected. This is the one you just undid.
No point-in-time restore, and nobody else's later writes lost.
A trigger inside PostgreSQL captures each changed row, cascades included, and refuses agent writes that don't carry a single-use token.
Deleted rows come back in foreign-key order, then updates revert, then inserts disappear. That's why the users returned before their payments.
If a row changed after the checkpoint, or the schema drifted, undo stops and names the row. It never guesses.
Checkpoints are append-only and SHA-256 hash-chained. lomberk verify-ledger finds the first altered entry.
Give it your database owner's connection string once. It creates two least-privilege roles, installs Lomberk, makes the tables you pick undoable, checks the result and prints the line for Claude Code, Cursor, Claude Desktop, VS Code or Codex.
uvx lomberk setup # asks for it, hidden claude mcp add lomberk \ -e LOMBERK_CONFIG=$PWD/lomberk.yaml \ -- uvx lomberk serve
| A captured, undoable write | 18.3 ms |
| A read through Lomberk | 5.4 ms |
| A plain write, new connection | 4.8 ms |
Postgres 16, p50 over 200 runs. Agent turns take seconds. Tested on Postgres 14–18.
docker compose up.Your security team will ask, so here it is up front. The full model is in SECURITY.md, and 20 real attacks with the exact refusal for each are in the attack gallery.
--allow-triggers.The whole safety path is free and open source. Solo adds a month of undo and the panel for one developer; Pro adds what a team needs to share it.
Apache-2.0 and self-hosted. Hard gate, holds, capture, ledger, approvals from the API or CLI. Undo reaches back 24 hours.
Start freeFor one developer and one database. Undo reaches back 30 days. Web approval panel and audit export.
DetailsOr $1,990 a year. Undo reaches back 30 days. Web approval panel, two-person rule, Slack approvals, approver SSO, audit export. One key covers up to 3 databases.
Buy ProUndo with no time limit, unlimited databases, an annual invoice, priority answers, and help with your security questionnaire.
Talk to usSelf-hosted, so your data never reaches us. Pay by card through Polar and the license key arrives by email. No calls needed: lomberk doctor checks your setup and tells you how to fix each problem.