How to Configure Windsurf Bigquery Data Masking

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf bigquery data masking by applying column policy tags to cloud roles. When the agent queries tables, those rules rewrite matched fields in the results. Teams often let their coding assistant use a local developer profile for database tasks. If that profile has broad permissions, the agent can read raw emails or card numbers. One broad select query can pull thousands of sensitive values into the chat context. How windsurf bigquery data masking works Cognition renamed Windsur

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 bigquery data masking by applying column policy tags to cloud roles. When the agent queries tables, those rules rewrite matched fields in the results. Teams often let their coding assistant use a local developer profile for database tasks. If that profile has broad permissions, the agent can read raw emails or card numbers. One broad select query can pull thousands of sensitive values into the chat context.

How windsurf bigquery data masking works

Cognition renamed Windsurf to Devin Desktop on June 2, 2026. It keeps the same IDE features and uses the Cascade agent. Cascade can run terminal commands on its own with user permission. It uses a dedicated shell that loads your local aliases and variables. The agent also connects to external systems through local MCP servers.

When the agent runs a query, it uses your local cloud credentials. BigQuery checks the cloud role tied to that account before returning rows. Admins create taxonomies and put policy tags on sensitive table columns. You can attach a masking rule to a tag for phone numbers. When a restricted role queries that column, the database rewrites matched fields in results. The agent receives the altered text instead of the raw value.

This setup relies on strict separation between developer roles and admin roles. You must remove raw read rights from the account the IDE uses. Then you grant the masked reader role to that specific identity. Every query from the agent's shell or MCP tool then follows those tag rules.

What native column rules solve and what they miss

Native policy tags work well for structured tables with known schemas. Once you tag a column, the rule applies to every query from that role. You do not need to rewrite views for each team. It handles static fields like national IDs or card numbers across standard tables.

Still, native warehouse roles only check who logs in at the start. They do not inspect what individual commands or statements do in flight. First, developers often log in with elevated roles to fix production bugs. Because the agent shares the user's shell, it inherits those broad rights. The native masking rule will not trigger if the user holds an exempt role.

Second, column tags only protect fields that an admin has already marked. Unstructured text columns, JSON blobs, and staging tables often lack tags. If an engineer stores emails or phone numbers in a free-form log column, tags miss them. The database returns the full text to the agent.

Data Masking (Static) + BigQuery IAM: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Third, cloud roles cannot stop risky write statements or broad table scans before they run. An agent with write permissions can drop a staging table or update rows by mistake. Native controls decide who can log in, not whether a specific statement is safe right now.

Preparing your workspace for safer agent queries

Start by auditing the local shell profile that your IDE loads. Check which cloud service account or user token sits in your shell variables. Do not let your daily admin profile stay active in that terminal. Create a separate low-privilege role just for local coding sessions.

Next, review all tables that the agent can reach through MCP tools. Make sure columns holding emails, phone numbers, and card numbers have policy tags. Test the setup by running a sample query with the restricted role. Check that the query output rewrites the sensitive values as expected. For unstructured text or shared roles, you will need runtime inspection between the agent and the warehouse.

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

Does Devin Desktop handle database credentials the same way as Windsurf?

Yes, Windsurf became Devin Desktop on June 2, 2026, keeping the same IDE features. Its Cascade agent still runs commands in a dedicated terminal that loads your local shell settings.

Why did my BigQuery masking rule not apply to the AI agent?

The agent uses your local shell environment and cloud login to run queries. If your active local account has raw read permissions, the database skips the masking rule.

Can native BigQuery policy tags mask sensitive data inside unstructured text columns?

No, native policy tags apply to whole columns rather than scanning text inside them. To rewrite emails or card numbers inside free-form text, you need in-flight result inspection.

The query runs. The emails stay hidden.