How to Configure GitHub Copilot Bigquery Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up github copilot bigquery read only access by pairing a viewer role with a local tool server. The AI agent uses this local server to run queries without changing any table data. Many teams start by reusing a developer account that already has broad project permissions. This shortcut lets an automated agent drop tables, alter schemas, or read private user tables by mistake. How github copilot bigquery read only access works GitHub Copilot runs inside your editor and reaches outside sy

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 github copilot bigquery read only access by pairing a viewer role with a local tool server. The AI agent uses this local server to run queries without changing any table data. Many teams start by reusing a developer account that already has broad project permissions. This shortcut lets an automated agent drop tables, alter schemas, or read private user tables by mistake.

How github copilot bigquery read only access works

GitHub Copilot runs inside your editor and reaches outside systems through local tools or terminal commands. To query a cloud data warehouse, the agent relies on a local server or script. That local process holds cloud credentials and sends SQL queries to the warehouse on the agent's behalf.

A safe setup starts in your cloud identity console. You create a dedicated service identity just for the AI assistant. Next, you grant that identity permissions to run query jobs and read specific datasets. You leave out permissions that create, update, or delete tables and views.

Once the role is ready, you link those credentials to the local tool that serves the editor. When you ask the assistant a question about your data, it writes a SQL query. The editor passes that query to the local tool, which runs the job under the restricted identity. If the assistant tries to run a write statement, the cloud warehouse blocks the request right away.

Where native cloud roles fall short

Native cloud roles do a great job of blocking writes at the dataset or table level. They stop an agent from dropping a production table or inserting bad rows. They also let you limit which datasets the assistant can query during a coding session.

Still, cloud roles decide who can log in, not what individual queries do in flight. If an agent has read access to a customer table, it can pull every column in that table. The role cannot rewrite results to mask emails, phone numbers, card numbers, or national IDs on the fly.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Static credentials on developer laptops create another risk for security teams. Local tool files often store long-lived keys in plain text on the machine. If a laptop gets lost or a bad package reads local files, those keys can leak. Also, shared service keys make it hard to see which person ran a specific query in the logs.

Managing query cost and approval steps

Read-only access does not mean risk-free access in a cloud data warehouse. A poorly written query from an AI agent can scan huge tables and drive up your monthly bill. Because the agent writes SQL on its own, it might skip partition filters or join massive tables by accident.

Editor settings let you require manual approval before the agent runs a tool or shell command. Turning on approval prompts gives the developer a chance to check the SQL before it runs. Still, human reviewers get tired and often click approve without reading every line of a long query. Teams need clear guardrails that inspect each statement and keep sensitive columns safe during daily work.

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

Can GitHub Copilot query BigQuery directly out of the box?

No, the editor assistant needs a local tool server or command line script to talk to your cloud project. That local helper uses your cloud credentials to send queries and return results to the chat window.

Why is a read-only role not enough to protect customer data?

A read-only role blocks data changes, but it still returns full rows from any allowed table. Without dynamic data masking, query results will include raw emails, phone numbers, card numbers, and national IDs.

How can teams stop AI agents from running expensive queries?

Teams should set query scan limits on the cloud account and require human approval for tool runs. Checking queries before they run helps catch missing filters on large tables before they cost money.

The query runs. The emails stay hidden.