How to Configure Devin Supabase Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up devin supabase read only access, create a dedicated database user with select permissions. You then give those specific login details to the agent instead of your admin password. Many teams rush this step when they test an AI software engineer for the first time. They often paste the default project password into the agent workspace to save time. That default role has admin privileges and can change or delete production tables by mistake. How devin supabase read only access works wit

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.

To set up devin supabase read only access, create a dedicated database user with select permissions. You then give those specific login details to the agent instead of your admin password. Many teams rush this step when they test an AI software engineer for the first time. They often paste the default project password into the agent workspace to save time. That default role has admin privileges and can change or delete production tables by mistake.

How devin supabase read only access works with database roles

Every new Supabase project comes with a default postgres role that holds admin privileges. Supabase does not give out full superuser rights because those allow destructive database actions. Even so, the default admin role has broad power over your schema and your data. The password you set when you create a project belongs to this admin role. Supabase states that you should never share this password with an outside service. Instead, you should make a fresh database user for every service you connect.

Setting up devin supabase read only access follows this exact rule. You log in through the dashboard, where your queries run as the default admin role. From there, you create a new role made just for the AI agent. You grant this role permission to connect to the database and see your schema. Next, you grant select rights on the specific tables the agent needs to read. You leave out insert, update, delete, and schema change rights on all tables. Finally, you store these new user credentials in the secret store of the agent.

Why teams limit AI agents to read rights

An autonomous coding agent works by reading code, checking logs, and running database queries. When a bug happens, the agent inspects your database state to find the root cause. It checks table structures, counts rows, and looks up test records to build a fix. None of these investigative steps require the ability to write data or drop tables.

Giving an agent write permissions in a shared database creates real operational risk. An agent might run a migration script or a cleanup command against the wrong database. If the database role only allows read queries, the database blocks write commands right away. The agent can still study the data and write migration files in your code repo. Your human team can then review those files and run them through normal deployment pipelines.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native database roles solve and what they miss

A read only role stops an AI agent from changing or deleting your records. It also gives you a clear username to look for in your database logs. Unlike dashboard queries that run under the main admin account, agent queries show its role. This separation is a solid first step for any team using automated coding tools.

Still, native database roles only check who logs in and which tables they can read. Once a role has select access on a table, it can read every column inside by default. Users table rows often hold emails, phone numbers, card numbers, or national IDs. A basic read role cannot rewrite those sensitive fields in query results on the fly. You also have to manage and rotate a static password stored in an outside tool. Also, native roles cannot pause a single risky query to ask for human approval. Teams that need field masking or query checks have to look beyond static database roles.

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 an AI agent the default Supabase project password?

No, that password belongs to the default postgres role, which holds admin privileges. Supabase advises creating a separate database user for every outside service instead of sharing it.

Can a read only database role stop an agent from seeing sensitive user data?

A standard read role blocks write actions, but it still returns all rows in permitted tables by default. To hide emails, phone numbers, or card numbers in results, you need data masking.

How can an AI agent test schema changes with read only permissions?

The agent can read your current schema from the live database to write migration files. It can then test those migrations against a local test database before a human reviews them.

The query runs. The emails stay hidden.