How to Configure Cursor Bigquery Approval
You set up cursor bigquery approval by requiring manual checks for every database tool call. You also assign a narrow Google Cloud role to the local user account. Many engineering teams start by giving their AI editor a broad service account key. That shortcut lets the agent run any SQL query across every dataset right away. When roles are too wide, one bad prompt can change tables or pull private rows. How native cursor bigquery approval works AI coding editors reach external data sources in
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 cursor bigquery approval by requiring manual checks for every database tool call. You also assign a narrow Google Cloud role to the local user account. Many engineering teams start by giving their AI editor a broad service account key. That shortcut lets the agent run any SQL query across every dataset right away. When roles are too wide, one bad prompt can change tables or pull private rows.
How native cursor bigquery approval works
AI coding editors reach external data sources in two main ways. First, the agent can run local shell commands through a built-in terminal tool. Second, the editor can talk to a Model Context Protocol server for BigQuery. Both paths use the cloud credentials stored on the developer laptop.
In manual mode, the editor pauses before it runs a command or tool call. A prompt appears on screen showing the exact action the agent wants to take. The developer reads the proposed query and clicks approve or reject. If the developer turns on auto-run settings, the editor skips this check. The agent then sends queries straight to BigQuery using the local cloud login.
On the Google Cloud side, Identity and Access Management controls what that login can do. Admins grant roles at the project, dataset, or table level. A viewer role lets the user read data and run select queries. An editor or admin role lets the user drop tables and change schemas. BigQuery checks these permissions when the query arrives from the laptop.
What native setup solves and what it misses
Combining local editor prompts with read-only cloud roles stops many basic mistakes. A read-only role keeps the AI agent from deleting tables or changing production rows. Local approval prompts let the developer catch obvious syntax errors before a query runs. This base setup decides who can log in and which datasets they can reach.
Still, this setup leaves a wide gap during daily work. Local approval happens on the same machine where the developer writes code. Developers get tired of clicking approve on dozens of routine schema checks. Many users turn off manual prompts so the agent can work faster. Once prompts are off, the agent can run any query allowed by the cloud role.
Even when prompts stay on, a single human check cannot catch every risk. A developer might approve a select query without knowing the table holds customer emails. When the query runs, BigQuery sends raw phone numbers and card numbers back. Those values go straight into the AI model context window and third-party logs.
Approval Chains & Escalation + BigQuery IAM: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Static cloud roles also lack context about individual statements in flight. Google Cloud IAM cannot ask a peer to review one high-cost query on the fly. It either allows all reads on a dataset or blocks them all. Teams also struggle to tie a shared service account query back to one developer prompt.
Best practices for safer AI database workflows
Start by removing shared service account keys from developer laptops. Have each engineer log in with their own personal identity instead. Give the AI tool a dedicated role that only reads non-sensitive datasets. Keep production tables with national IDs or card numbers out of reach by default.
Next, separate routine metadata reads from heavy data queries. Agents need to check table names and column types often while writing code. They rarely need to pull thousands of raw customer rows to fix a bug. Requiring a second person to approve sensitive queries keeps one mistake from leaking data. Rewriting matched fields like emails and phone numbers in results also keeps model context clean.
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 AI editor change BigQuery tables on its own?
Yes, if auto-run mode is on and the local account has write permissions. Using a read-only database role stops the agent from modifying or deleting your data.
Does local prompt approval stop sensitive data from reaching the AI model?
No, approving a query sends the full result set back to the editor. If the table contains emails or card numbers, those values enter the model context.
Why shouldn't teams use a shared service account key for AI agents?
Shared keys sit on laptops in plain text and never expire on their own. They also make it impossible to see which developer ran a specific BigQuery statement.
Related guides
In this post