
Security News
GitHub to Block pull_request_target Workflows by Default Starting December 2
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.
pgbrake
Advanced tools
A local safety brake between AI coding agents and your Postgres: approval for risky SQL, row limits, one-command undo, audit log.
An undo button for your database when an AI agent is driving.
pgbrake is a local MCP server that sits between Claude Code / Codex / Cursor and your Postgres. Every write the agent makes gets a change id you can reverse with one command. Risky SQL waits for a human. Everything is logged. Nothing leaves your machine.

agent> DELETE FROM users WHERE created_at < '2025-01-01'
pgbrake> held: DELETE would touch 4,812 rows (limit 100) — approval apv_3f9c21aa
agent> DELETE FROM users WHERE id = 42
pgbrake> 1 row affected; undo with change id chg_8e01b7d2
you$ pgbrake undo chg_8e01b7d2
undid delete on "users": 1 row(s) restored
Claude Code checkpoints rewind files, not databases. Client-side permission prompts and hooks can be skipped or misfire for MCP calls, and a tool's own "destructive" label is just a hint. pgbrake enforces its rules inside the server, so they hold no matter which agent or client calls it.
DROP, ALTER, TRUNCATE...), UPDATE/DELETE without WHERE,
any write over the row limit (default 100), upserts and MERGE.ALTER SYSTEM, role/database creation and drops, COPY ... PROGRAM, DO blocks.UPDATE/DELETE, the affected rows are saved locally; inserts are
tracked by primary key. Undo refuses if the rows changed since, unless you --force.pgbrake approve <id>
in an interactive terminal. Approvals are one-shot, expire in 15 minutes, and are bound to the exact SQL.~/.pgbrake/journal.db.pip install pgbrake # or: uvx pgbrake serve
Claude Code:
claude mcp add pgbrake --env PGBRAKE_DSN="postgresql://me@localhost/app" -- uvx pgbrake serve
Codex (~/.codex/config.toml):
[mcp_servers.pgbrake]
command = "uvx"
args = ["pgbrake", "serve"]
env = { PGBRAKE_DSN = "postgresql://me@localhost/app" }
Then remove any other database MCP / psql access from the agent, so pgbrake is the only way in.
In Claude Code, add "Bash(psql:*)" and "Bash(pgbrake approve:*)" to permissions.deny.
pgbrake pending # SQL waiting for you
pgbrake approve <id> # approve (interactive terminal only)
pgbrake deny <id>
pgbrake changes # undoable changes
pgbrake undo <change-id> # reverse one
pgbrake log # audit log
| Variable | Default | |
|---|---|---|
PGBRAKE_DSN | — | connection string (falls back to DATABASE_URL) |
PGBRAKE_MAX_ROWS | 100 | writes touching more rows need approval |
PGBRAKE_ALLOW_DDL | 0 | set 1 to let schema changes through (still logged) |
PGBRAKE_READ_ONLY | 0 | set 1 to refuse every write |
PGBRAKE_STATEMENT_TIMEOUT_MS | 15000 | |
PGBRAKE_JOURNAL | ~/.pgbrake/journal.db |
TRUNCATE, DDL, upserts and MERGE are held for approval but cannot be undone.$29 one-time for the first 100 licenses (then $39). No subscription. 14-day refund. Buy pgbrake Pro
PreToolUse hook catches
prisma migrate reset --force, drizzle-kit push --force, alembic downgrade base and friends,
takes a pg_dump snapshot first (when PGBRAKE_DSN is set), checks pg_restore can read it, then asks you. If the snapshot fails, the command is blocked instead (override with PGBRAKE_ALLOW_NO_SNAPSHOT=1). Install with pgbrake install-hook.pgbrake log --export csv|json.After paying you land on a page that shows your key. Activate it once:
pgbrake license <your-key> # or set PGBRAKE_LICENSE
Keys are verified offline; pgbrake never phones home.
FAQs
A local safety brake between AI coding agents and your Postgres: approval for risky SQL, row limits, one-command undo, audit log.
We found that pgbrake demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.

Security News
/Application Security
A practical guide to securing GitHub Actions against supply chain attacks, covering malicious pull requests, credential theft, dependency risks, and release pipelines.

Security News
Composer 2.11 adds dependency cooldowns, joining package managers that delay new releases to reduce supply chain risks while allowing urgent security updates.