How to Configure Windsurf CockroachDB Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf cockroachdb audit log by turning on database logging for the agent role. Then you route those database event logs to your central storage for review. Windsurf is now called Devin Desktop by Cognition. Its agent runs terminal commands on its own after the user gives permission. Teams often let the agent use a local developer profile to reach the cluster. When that database role has broad rights, the agent can read or change sensitive tables. How a windsurf cockroachdb audi

Audit Log Integrity + End-to-End Encryption: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up a windsurf cockroachdb audit log by turning on database logging for the agent role. Then you route those database event logs to your central storage for review. Windsurf is now called Devin Desktop by Cognition. Its agent runs terminal commands on its own after the user gives permission. Teams often let the agent use a local developer profile to reach the cluster. When that database role has broad rights, the agent can read or change sensitive tables.

How a windsurf cockroachdb audit log works in practice

Windsurf, now named Devin Desktop, uses an agent that runs in a dedicated terminal. On macOS it uses zsh, and on Linux it uses bash. This terminal loads the local shell setup of the user. Any local aliases and stored keys are ready for the agent to use. The legacy Cascade agent also talks to external tools through Model Context Protocol servers.

When the agent runs a database client or script, it logs in to CockroachDB. CockroachDB checks the user role and grants permissions based on cluster rules. Admins turn on native audit logging inside the database to watch these sessions. You can set the database to record queries against specific tables or by specific roles. The database then writes each event to local log files on the cluster nodes.

Security teams collect these files and send them to a log tool. Each log entry shows the database role, the time, and the query text. If every developer shares one database user, the logs only show that shared name. To fix this, teams create separate database roles for each developer or agent setup.

What native database logging solves and what it misses

Native database logging gives your team a clear record of past queries. It helps you see which database role ran a command and when it happened. You can check these records during a security review or after an outage. Setting up strict roles also stops the agent from touching tables it does not need.

Still, native roles and logs only act at login or after a query runs. Once a session starts, the database trusts every command that fits the role permissions. A native log records that a bad delete statement ran, but it does not block it. It also cannot demand a live human check before a drop statement runs in production.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Native audit logs also do not mask sensitive fields in query results. When the agent queries a customer table, the database sends back raw emails and phone numbers. Those raw card numbers and national IDs then enter the local terminal and model context. Data masking is needed to rewrite matched fields in results before they reach the agent.

Why local shell keys create tracking gaps

Because the Devin Desktop terminal loads the user shell setup, local keys sit exposed. A developer might store a production database password in their shell file for quick work. When the agent runs a terminal command, it inherits that same database access right away. The database only sees a valid login from that static user role.

It cannot tell if a human typed the query or if the AI agent wrote it. Rotating those static keys across many developer laptops takes a lot of manual work. If a key leaks, someone can log in from outside without any tie to an identity provider. Teams need a way to tie every single query to a real user identity. They also need controls that inspect and filter individual statements in flight.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does Windsurf still exist under the same name?

On June 2, 2026, Cognition renamed Windsurf to Devin Desktop. It keeps the same IDE features and uses an agent that runs terminal commands with user permission.

Can CockroachDB logs tell if an AI agent ran a query?

CockroachDB logs only record the database role that opened the session. If the agent uses the personal credentials of a developer, the log just shows that developer role.

Do native audit logs stop an agent from reading sensitive data?

No, audit logs only write down what query ran for later review. To hide emails or card numbers in results, you must apply data masking before results return.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.