How to Configure Windsurf Neon Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf neon audit log by turning on database logging and giving the agent a strict role. This step lets you track every query that the coding assistant sends to your Postgres tables. On June 2, 2026, Cognition renamed Windsurf to Devin Desktop, though the editor features stay the same. Many teams connect the editor to their cloud database using a shared admin string. When permissions are too broad, the agent can read sensitive tables or drop production data by mistake. How to se

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 a windsurf neon audit log by turning on database logging and giving the agent a strict role. This step lets you track every query that the coding assistant sends to your Postgres tables. On June 2, 2026, Cognition renamed Windsurf to Devin Desktop, though the editor features stay the same. Many teams connect the editor to their cloud database using a shared admin string. When permissions are too broad, the agent can read sensitive tables or drop production data by mistake.

How to set up your windsurf neon audit log

Setting up a clean windsurf neon audit log starts with how the editor reaches your database. In Devin Desktop, the agent runs terminal commands on its own after the user gives permission. It opens a dedicated shell that loads your local profile, including your aliases and stored keys. The legacy Cascade agent also talks to external tools through configured Model Context Protocol servers.

When the agent runs a migration or inspects a schema, it uses the database credentials in that local shell. To track these actions on the database side, you must create a separate Postgres role just for the agent. You then turn on query logging in your cloud Postgres project so the engine records activity for that role. Next, you route those database event logs to your central log store for review.

This native setup separates machine queries from human queries inside your log files. Your security team can filter the logs by the agent role to see when it logged in. You can also see which tables the role touched during a coding session.

What native logging solves and the gaps it leaves open

Native database roles and logs solve the first step of access control. They decide who can log in and which tables a role can read or change. They also give you a record of past queries after a session ends.

Still, this setup leaves a wide operational gap while the agent works. Because the agent terminal loads your local shell keys, those credentials sit on the developer laptop. If you share one role across a team, the database log cannot tell which developer ran the prompt. Even worse, a static role cannot judge what an individual statement does in flight.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

If a role has write permissions for local testing, it can still run a bad delete query. Also, native Postgres logs do not stop raw data from returning to the editor context. Query results can bring back emails, phone numbers, card numbers, or national IDs into the model prompt. Active data masking is needed to rewrite matched fields in results before they reach the client.

How to tighten agent database sessions in daily work

To reduce risk, teams should stop storing long-lived database keys in local shell files. Give the coding agent a read-only database role by default for schema checks. Require human review before the agent runs any command that changes table structures or data. Keep staging data clean so the agent does not pull real customer records into its prompt history.

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 sits inline in the Postgres protocol beside Postgres, RDS, or Aurora as a sidecar for your Postgres. On every production query from an engineer or AI agent, hoop.dev decides whether to pass, mask, block, or hold it for approval.

First, hoop.dev guardrails refuse disallowed drops or deletes before they run, and risky statements can pause for human review. Next, hoop.dev data masking rewrites sensitive fields in returned rows in memory. 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

Did Windsurf change its name to Devin Desktop?

Yes, Cognition announced on June 2, 2026, that Windsurf is now called Devin Desktop. It keeps the same editor features, and all docs links now point to the new site.

How does the agent reach my Neon database?

The agent runs commands in a dedicated terminal that loads your shell profile and keys. It can also reach external databases through Model Context Protocol servers that you set up.

Why is a native Postgres audit log not enough for AI agents?

A native log only records queries after they run and cannot block bad commands in flight. It also does not mask emails, phone numbers, or card numbers in query results.

The query runs. The emails stay hidden.