How to Configure Windsurf Snowflake Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf snowflake permissions by creating a dedicated role in your data warehouse. Then you give the coding agent a scoped login that uses only that role. Many teams skip this step and let the agent use a developer login instead. That choice gives the AI agent wide rights across every table and schema. A bad prompt or small mistake can change live data or leak private rows. How windsurf snowflake permissions work in practice In June 2026, Cognition renamed Windsurf to Devin Deskto

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 snowflake permissions by creating a dedicated role in your data warehouse. Then you give the coding agent a scoped login that uses only that role. Many teams skip this step and let the agent use a developer login instead. That choice gives the AI agent wide rights across every table and schema. A bad prompt or small mistake can change live data or leak private rows.

How windsurf snowflake permissions work in practice

In June 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE features. Its agent can run terminal commands on its own once the user gives permission. It runs those commands in a dedicated terminal using zsh on macOS or bash on Linux. That shell loads the user profile, including all local aliases and saved shell variables.

If your shell profile holds warehouse keys, the agent can use them right away. The legacy Cascade agent also talks to local MCP servers defined in your local settings. Both paths mean the agent acts with the exact role tied to those local credentials. To lock this down, you must create a separate role in Snowflake for the agent.

You grant that role read rights on only the specific schemas the agent needs. Next, you create a dedicated service user and assign the new role to it. You then store the credentials for that scoped user in your local workstation setup. When the agent runs a script or tool, Snowflake checks the assigned role first.

Why static role grants are only half the setup

Native warehouse roles do a great job of deciding who can log in. They also limit which schemas and tables a specific session can read or change. Still, static roles cannot inspect what an individual query does while it runs. Once a role has read rights on a table, it can pull every column by default.

That table might hold emails, phone numbers, card numbers, or national IDs. A static role cannot rewrite those fields in query results before the agent reads them. Also, if a developer needs the agent to test a schema change, read rights fail. Teams often grant write rights to the role and forget to remove them later.

That leaves the agent with standing rights to drop tables or delete live rows. Local terminal checks in the IDE ask the user before running a shell command. Yet a busy developer can click approve without reading a long SQL script. Static roles alone cannot pause a single risky statement for a second team review.

Snowflake Access Control + AI Agent Permissions: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Best practices for scoping AI agent warehouse roles

Start by separating human logins from the credentials your coding agent uses on your machine. Never keep admin keys in the default shell profile that the agent terminal loads. Build a distinct warehouse role that has no rights to change data by default. Grant it permissions only to sample schemas or non-production clones whenever that is possible.

Keep raw personal data out of the schemas that you assign to this role. If the agent must query live tables, use secure views that hide sensitive columns. Set short query timeouts on the warehouse user so bad joins do not waste money. Review the query history for that dedicated user every week to spot odd patterns.

Rotate the credentials for the agent user on a regular schedule to reduce risk. Remove temporary schema grants as soon as a sprint or coding task ends. These habits keep your warehouse safer when an AI agent runs local commands.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev sits inline in the protocol beside each supported service as an open-source proxy, a sidecar for your database or API. For every query or command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.

First, hoop.dev guardrails block banned queries before they run or hold risky ones for review, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can the Windsurf agent read warehouse credentials from my shell profile?

Yes, the agent terminal loads your standard zsh or bash profile when it starts. Any exported variables or aliases in that file are available to commands the agent runs.

Should an AI coding agent share my personal Snowflake role?

No, sharing your personal role gives the agent the same broad rights you have. Always create a separate user and a narrow role just for the coding agent.

Do read-only warehouse roles stop sensitive data exposure?

Read-only roles stop the agent from changing or deleting your tables. Still, they still return emails, phone numbers, and card numbers unless you mask those columns.

The query runs. The emails stay hidden.