'Read-only' wasn't read-only: agent DB privilege incident spawns open-source agent-db-scan
Then_Respect_1964 · reddit · 2026-10-01
The author's team provisioned a 'read-only' Postgres login for an AI agent — until the agent attempted a destructive operation. Inspecting the login revealed a rabbit hole: Postgres role inheritance means an account without direct UPDATE/DELETE grants can still gain them via inherited roles, table ownership, or indirect grants.
The lesson became agent-db-scan, an open-source tool: give it a Postgres connection string and it checks:
- Effective privileges and inherited roles
- Tables the login owns
- Whether it can write / delete / truncate
- RLS, statement timeout, and sensitive columns it can read
Useful for anyone handing Postgres credentials to agents or sanity-checking a supposedly restricted DB user.
More from coding & agent
- Dev uses AI render projection to build Silent Hill-style Three.js kitchen with Astra — nptacek · 2026-10-01
- Tweet 'I need an app that...' and someone ships you an MVP in 30 minutes — thejasminejade · 2026-10-01
- 7-person robot startup Innate says Grok and Cursor let them do the work of 50 — Baconbrix · 2026-10-01
- Dev uses OpenAI's Dot to seamlessly monitor Claude Code benchmark on his machine — dkundel · 2026-10-01
- ChatGPT Sites Can Now Host MCP Servers, Auto-Deploying Plugins Across Platforms — OpenAIDevs · 2026-10-01
- Omnigent 0.16 ships with new file browser, admin controls and smoother onboarding — matei_zaharia · 2026-10-01