How to Configure Goose Supabase Approval
You set up goose supabase approval by pairing a dedicated Postgres role with local command checks. This stops an AI agent from running bad queries without a human check. Many teams start by giving the agent the default admin password to move fast. That broad role lets the agent change tables or read private rows at any time. How goose supabase approval works in practice Every Supabase project starts with a default postgres role that holds admin rights. Supabase does not grant full superuser r
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up goose supabase approval by pairing a dedicated Postgres role with local command checks. This stops an AI agent from running bad queries without a human check. Many teams start by giving the agent the default admin password to move fast. That broad role lets the agent change tables or read private rows at any time.
How goose supabase approval works in practice
Every Supabase project starts with a default postgres role that holds admin rights. Supabase does not grant full superuser rights because those allow destructive actions. Even so, the default postgres role has extra rights for many admin tasks. The password you set at project creation belongs to this default admin role.
Supabase says you should never share this password with an external service unless you trust it. Instead, Supabase recommends making a new database user for every single service or tool. When you set up Goose, you first make a separate role with limited table rights. You only grant this role the exact read or write rights it needs.
Next, you turn on human checks inside the local agent workflow. Before the agent runs a query or shell command, it pauses and asks the user. The engineer reads the statement on their screen and approves or denies the run. This pairs database role limits with a local check on the user machine.
Why role setup and local prompts fall short
Making a dedicated role per service is a strong first step for database safety. It decides who can log in and which tables that user can touch. Built-in roles like anon, authenticated, and service_role also help split up app traffic. Queries run in the Supabase Dashboard still run as the admin postgres role.
Still, static database roles cannot check what an individual query does in flight. Once a role has write rights on a table, it can update one row or all rows by default. The database role cannot tell a safe one-row fix from a full table wipe. It also cannot ask a team lead to review a risky change before it runs.
Approval Chains & Escalation + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Local agent prompts also leave a gap for engineering teams. A local prompt relies on the person running the agent to spot bad SQL. If a developer turns off local checks to work faster, the safety net is gone. Teams also get no central log of which prompt or approval led to a query.
What to check before approving database actions
When an AI agent wants to run SQL, reviewers should check the exact target tables. You should look for missing filter clauses on update or delete statements. A safe change targets specific row IDs instead of touching a whole table at once.
You should also think about sensitive data in query results. Tables often hold emails, phone numbers, card numbers, or national IDs. If an agent reads raw rows, those fields enter the model context. Data masking that rewrites matched fields in results helps keep sensitive values out of prompts.
Run guardrails and masking on the Postgres connection
Role grants and firewall rules are needed setup. Setup alone cannot check single SQL statements or mask sensitive rows in a response. By design, hoop.dev is an open-source proxy that sits beside Postgres, RDS, or Aurora as a sidecar for your Postgres. Clients and agent tools keep their credentials and point their connection string at the listener.
On each query, hoop.dev guardrails refuse disallowed drops, deletes, or table reads before they run. Next, hoop.dev data masking rewrites sensitive fields in returned rows that match your rules. Furthermore, hoop.dev holds SOC 2 Type II and logs every statement and verdict per resource. Check out the project on GitHub.
Frequently asked questions
Should I give Goose the default Supabase postgres password?
No, you should keep the default postgres password private because it has admin rights. Supabase recommends creating a separate database user for every external tool or service.
Does the Supabase postgres role have full superuser access?
No, Supabase does not give out superuser access because it allows destructive database actions. The default postgres role is an admin role with extra privileges for select tasks.
Why are database roles not enough for AI agent safety?
Database roles only check who logs in and which tables they can read or write. They cannot inspect individual queries in flight or require peer approval for risky statements.
Related guides
In this post