How to Configure Windsurf Supabase Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a windsurf supabase audit log, enable database tracking for your AI agent. Then give the coding agent a dedicated database role with narrow read rules. Most teams start by handing their default admin password to the local coding agent. That broad role lets the AI agent read every table and change live schemas. A single bad prompt can wipe out rows or pull private customer records. How a windsurf supabase audit log works in practice Cognition renamed Windsurf to Devin Desktop in June

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 a windsurf supabase audit log, enable database tracking for your AI agent. Then give the coding agent a dedicated database role with narrow read rules. Most teams start by handing their default admin password to the local coding agent. That broad role lets the AI agent read every table and change live schemas. A single bad prompt can wipe out rows or pull private customer records.

How a windsurf supabase audit log works in practice

Cognition renamed Windsurf to Devin Desktop in June 2026. The app keeps the same IDE features and uses the Cascade agent. This agent can run terminal commands on its own after the user says yes. It opens a dedicated shell on your machine and loads your local profile. That means the agent can read local keys and aliases stored in your shell.

The agent also talks to external tools through Model Context Protocol servers. When the agent reaches your Supabase Postgres database, it uses the role you provide. Every project starts with a default postgres role that holds admin rights. Supabase does not grant full superuser status to prevent deep system damage. Still, the default admin role has broad power across your tables and schemas.

The platform warns teams not to share this default password with external tools. Instead, you should make a fresh database user for each tool or agent. When someone runs a query in the web dashboard, it runs as the admin role. Those web queries carry a comment showing they came from the dashboard. Queries from a local agent or shell do not add that tag by default.

To build a clean trail, create a specific role just for the AI agent. When the agent runs SQL through its shell or MCP tool, Postgres records the role. Your database log then shows which statements came from the agent versus a human.

What native database roles solve and what they miss

Giving your coding agent its own database role solves the first tracking problem. You no longer have to guess if a developer or an agent dropped a table. You can also limit which tables the agent role can read or change. If the agent only needs to check schema shapes, you can block write commands.

Audit Log Integrity + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, static roles and native database logs leave a large gap in daily work. A database role only checks who logs in at the start of a session. It does not inspect what individual statements do while they run in flight. If the agent has read rights on a customer table, it can pull everything. Native logs record that the query ran, but the data has already left the database.

Raw results from that query flow straight back into the agent context window. Those rows often hold emails, phone numbers, card numbers, or national IDs. Once the agent reads those values, they sit in prompt logs and model history. Native Postgres logging cannot rewrite matched fields in results before the agent sees them.

Local shell access also creates a key sharing problem across your team. Because the agent loads the user shell profile, developers store database passwords on disk. Static keys sitting in shell files are hard to rotate and easy to leak. Also, native database logs only show the shared role name, not the human user. If five engineers share one agent role, you cannot tie a query to one person. Teams need a way to check every query in flight and mask private fields.

Add query and result controls beside Postgres

Grants and pools govern who logs into PostgreSQL. Yet every query in an open session still runs with that role's full scope. In practice, hoop.dev sits inline in the wire protocol beside your database as a sidecar for your Postgres. For every plain or prepared query an agent or human runs against production, hoop.dev decides to pass, mask, block, or escalate it for review.

When a tool or agent sends SQL, hoop.dev Postgres controls block banned statements before execution or hold risky ones for human approval via an AI Analyzer you configure. Matched sensitive columns in result rows are masked in memory before they reach the caller. Each query and decision is logged per listener, which generates evidence for SOC 2, HIPAA, and GDPR audits. View the binary on GitHub.

Frequently asked questions

Can I use the default postgres role for my Windsurf agent?

You should not use the default postgres role for an AI coding agent. That role has admin rights, so you should make a separate role with narrow rules.

How does Windsurf reach my Supabase database?

Windsurf, now called Devin Desktop, runs terminal commands in a local shell with user permission. It can also reach external databases through Model Context Protocol servers that you set up.

Do native logs stop an agent from reading private data?

No, native database logs only record queries after they run on the server. They do not rewrite emails, phone numbers, or card numbers in query results.

The query runs. The emails stay hidden.