How to Configure Windsurf SQL Server Sandbox
You set up a windsurf sql server sandbox by making a read-only database user. Then you link that user to the coding agent in your local editor. Many teams give their coding agent full owner rights to get moving fast. Broad roles let the agent change or delete tables when a prompt goes wrong. A good setup limits what the agent can read and change from the start. Setting up a windsurf sql server sandbox with native roles First, note that Cognition renamed Windsurf to Devin Desktop in June 2026.
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 sql server sandbox by making a read-only database user. Then you link that user to the coding agent in your local editor. Many teams give their coding agent full owner rights to get moving fast. Broad roles let the agent change or delete tables when a prompt goes wrong. A good setup limits what the agent can read and change from the start.
Setting up a windsurf sql server sandbox with native roles
First, note that Cognition renamed Windsurf to Devin Desktop in June 2026. It keeps the same editor and features, including the Cascade agent. The agent runs terminal commands on its own once you give it permission. It uses a dedicated shell that loads your local profile and variables. It also talks to Model Context Protocol servers that you define in your setup.
To build your database sandbox, you start inside SQL Server. A database user is the identity a login uses inside one database. If the agent needs many databases, you create a login in the master database. If it only needs one database, you can use a contained database user. An admin must turn on contained databases on the server and database first.
Next, you assign fixed database roles to control what the agent can do. The reader role lets the user read all data from all user tables. It also lets the user read all views in that database. If you want to block writes, you add the deny data writer role. That role stops the user from adding, changing, or deleting any table data. Avoid the owner role, because it can change settings and drop the whole database. Remember that you cannot change the permissions built into fixed database roles.
How the agent reaches the database from your machine
Once the database user is ready, you link it to the editor. Many developers put database credentials in their shell profile or a tool file. Because the agent loads your shell settings, it can read those stored values. When you ask the agent to check a schema, it runs a command. Or it calls a local tool server that queries the database for you.
You can ask the editor to prompt you before it runs terminal commands. This step lets you check the command text before it hits your database. Pairing user prompts with a read-only role keeps most simple mistakes from breaking tables.
Kubernetes API Server Access + AI Sandbox Environments: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native roles solve and what they leave open
Native database roles and contained users solve the first big problem. They decide who can log in and which tables they can read or write. If the agent tries to drop a table with a reader role, it fails.
Still, native database roles leave a big operational gap open in practice. The reader role lets the agent read every row in every user table by default. It cannot tell a safe schema check apart from a huge data dump. If a table holds emails, phone numbers, or card numbers, the agent gets them. Those raw values then flow into the model context and external logs. Also, static passwords sitting in a shell file can leak if a prompt misfires. Native roles only check who logs in, not what each query does in flight.
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 renamed Windsurf to Devin Desktop on June 2, 2026. It keeps the same editor features, terminal runner, and Cascade agent tools.
Should I use a login or a contained user for the sandbox?
Use a contained database user if the agent only needs one or two databases. This keeps the user inside the target database instead of the master database.
Does the SQL Server reader role hide sensitive columns from the agent?
No, the fixed reader role grants read access to all user tables and views. It does not rewrite or mask fields like emails, phone numbers, or national IDs.
Related guides
In this post