How to Configure Windsurf Snowflake Sandbox

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf snowflake sandbox by giving the agent a narrow database role. Then you let the agent run queries through its built-in terminal or local tools. Cognition renamed Windsurf to Devin Desktop on June 2, 2026. It keeps the same IDE and features under the new name. Teams often start by placing a wide admin role in the local shell file. When permissions are too broad, a bad query can drop tables or read private rows. How a windsurf snowflake sandbox works In Devin Desktop, the a

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 snowflake sandbox by giving the agent a narrow database role. Then you let the agent run queries through its built-in terminal or local tools. Cognition renamed Windsurf to Devin Desktop on June 2, 2026. It keeps the same IDE and features under the new name. Teams often start by placing a wide admin role in the local shell file. When permissions are too broad, a bad query can drop tables or read private rows.

How a windsurf snowflake sandbox works

In Devin Desktop, the agent runs terminal commands on its own with user permission. It uses a dedicated terminal that loads the user's shell file. On macOS it uses zsh, and on Linux it uses bash. Because the shell file loads, all user aliases and shell variables are ready. The legacy Cascade agent also uses MCP servers defined in its local settings file.

To build a safe test area, data teams first make a separate database schema. They create a custom role that can only read or write inside that test schema. Next, they put the credentials for that scoped role into the developer's shell variables. When the coding agent runs a script or tool, it picks up those local keys. The database checks the role at login and keeps the session inside the test area.

What native roles solve and what they miss

Native roles and separate schemas do a good job of walling off production tables. They decide which user or agent can log in and which objects they see. If the agent only has a test role, it cannot touch the main billing schema. This stops accidental writes to live tables when the agent tests new SQL code.

Still, static setup only checks who logs in at the start of a session. It does not check what individual queries do while they run in flight. Test schemas often hold copies of real customer rows from production snapshots. When the agent runs a broad select query, the database returns all matching rows. Sensitive fields like emails, phone numbers, card numbers, and national IDs flow into the prompt. Also, local shell variables keep static keys on the laptop where any script can read them.

Snowflake Access Control + AI Sandbox Environments: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Steps to tighten agent database sessions

First, remove broad warehouse roles from the local shell profile on developer machines. Give each developer a unique test role with permissions limited to a single scratch schema. Set strict row limits and short query timeouts on the warehouse used by the agent. This keeps a bad join from running up huge compute bills during an agent loop.

Second, keep real customer data out of the test tables that the agent reads. If you clone production data for testing, scrub sensitive columns before the agent runs queries. Data masking rewrites matched fields like emails and card numbers in query results. Finally, require user permission in the IDE before the agent runs destructive terminal commands. Reviewing each schema change keeps your test area clean and predictable for the whole team.

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

Is Windsurf the same tool as Devin Desktop?

Yes, Cognition announced on June 2, 2026 that Windsurf is becoming Devin Desktop. It has the same IDE and features, and old docs links redirect to the new site.

How does the coding agent find local database keys?

The agent runs commands in a dedicated terminal that loads your normal shell profile. Any aliases or variables exported in your zsh or bash setup are available to it.

Why are read-only roles not enough for a test database?

A read-only role still lets the agent pull full tables into its context window. If test tables hold real emails or phone numbers, those values enter the model prompt.

The query runs. The emails stay hidden.