How to Configure Windsurf SQL Server Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf sql server approval by pairing editor terminal prompts with database roles. This setup asks a user to check each command before the agent runs a query. Many teams start by giving their coding agent a shared database login. If that login has broad rights, one bad prompt can change or delete live data. Good database rules and local command checks help reduce this risk. How windsurf sql server approval works with native roles Cognition renamed Windsurf to Devin Desktop in Jun

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 windsurf sql server approval by pairing editor terminal prompts with database roles. This setup asks a user to check each command before the agent runs a query. Many teams start by giving their coding agent a shared database login. If that login has broad rights, one bad prompt can change or delete live data. Good database rules and local command checks help reduce this risk.

How windsurf sql server approval works with native roles

Cognition renamed Windsurf to Devin Desktop in June 2026. The product keeps the same editor features and agent workflow. Its agent can run terminal commands on its own after the user gives permission. Those commands run in a dedicated shell on the local machine. That shell loads the user profile, including shell aliases and stored variables. The legacy Cascade agent also talks to local tool servers defined in a settings file.

On the database side, SQL Server splits server logins from database users. A login in the master database lets a person reach many databases on one server. A contained database user has its own password and stays inside one database. An admin must turn on the contained database setting before creating that user type. SQL Server offers thirteen different types of database users for different needs.

Admins then put the database user into fixed database roles to limit actions. Every database role includes the basic right to reach the database. The data reader role lets the user read all data from all user tables. It also lets the user read all views in that database. The data writer role lets a user add, change, or delete table data. Admins also use deny roles to block reading or writing on all user tables. You cannot change the built-in rights of these fixed database roles.

What native roles solve and what they leave open

Native roles and editor prompts solve basic login and local execution problems. A read-only role stops the agent from dropping tables or changing rows. A deny writer role blocks data changes even if other roles allow them. Meanwhile, the editor asks the developer before the agent runs a shell command. This gives the person at the keyboard a chance to read the query text.

Still, this setup leaves a wide gap during daily work. Database logins decide who can log in, not what a single query does in flight. A user in the data reader role can still read every user table. That includes tables with emails, phone numbers, card numbers, and national IDs. If the agent needs to fix a bug, a developer may grant write roles. Even worse, someone might grant the database owner role for a quick task. The database owner role can run any maintenance task and even drop the database.

Approval Chains & Escalation + Kubernetes API Server Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Local editor prompts also put all the burden on one tired developer. The shell loads local variables, so database passwords often sit in plain text files. If a developer clicks approve too fast, a bad write query runs right away. Teams cannot ask a second person to check risky queries from inside the editor. They also lack a central log showing which prompt ran which SQL statement.

Steps to tighten agent database permissions

Start by creating a separate SQL Server user just for your coding agent. Choose a contained user if the agent only needs to reach one database. Put that user in the data reader role for safe daily debugging. Add the deny data writer role so the account cannot change table rows. Never put an automated coding agent into the database owner role.

Next, require user permission in the editor for every terminal command the agent runs. Check your shell startup files and remove plain passwords for production databases. Keep local tool server files clean and limit them to test databases when possible. When the agent must run a write query, review the exact statement before approving.

Add runtime guardrails beside SQL Server

Role grants and network rules are needed setup for SQL Server. Still, an allowed user or agent tool can send a bad delete or read raw customer fields over a valid session. In practice, hoop.dev sits inline in the TDS protocol beside the database as a sidecar for your SQL Server. For every query an agent or human runs in production, hoop.dev decides whether to pass, mask, block, or escalate it for review.

With hoop.dev SQL Server controls, rules refuse banned statements before they run, hold risky queries for human review, and mask matched sensitive values in supported result columns in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for HIPAA, PCI DSS, SOX, and GDPR audits. See the source 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 and features, and old docs links redirect to the new site.

Can I edit the permissions inside SQL Server fixed database roles?

No, SQL Server does not let you change the permissions assigned to fixed database roles. You must combine roles, such as pairing a reader role with a deny writer role.

How does the agent get database credentials in the terminal?

The agent runs commands in a dedicated shell that loads your normal user shell profile. Any aliases or variables stored in that profile are available to the agent during commands.

The query runs. The emails stay hidden.