Skip to main content
Live
Main content

xAI's Grok Build coding tool was silently uploading entire codebases to Google Cloud

Researchers found the CLI packaged secrets and ignored files into cloud storage; Musk says the retained data will be deleted.

Jaeden Schafer
Editor in Chief · · 5 min read
xAI's Grok Build coding tool was silently uploading entire codebases to Google Cloud

xAI's Grok Build coding assistant was quietly uploading users' entire code repositories to Google Cloud, including files developers had explicitly told the tool to ignore and secrets that had been deleted from git history. Security firm Cereblab published the findings on Monday, and by the same day xAI's servers began returning a new flag, 'disable_codebase_upload: true', that shuts the behavior off. Elon Musk said on X that any data already collected will be 'completely and utterly deleted.'

The scope of what Grok Build was hoovering up is the part that stings. Cereblab documented the CLI packaging whole repositories and shipping them to xAI-controlled cloud storage, well beyond the file-by-file context that comparable agentic coding tools request. The researchers specifically flagged that the uploads included files the tool was told not to open and secrets that had been removed from history — the kind of material developers assume stays local.

Claude Code, Anthropic's CLI-based coding agent and the closest competitor to Grok Build, retains substantially less data by default, per Cereblab. That comparison is doing a lot of work here: developers evaluating AI coding tools have generally assumed the frontier CLIs behave similarly on data handling. Grok Build was an outlier, and there was no clear disclosure that full-repo uploads were happening.

Key facts

  • 01Cereblab published findings on Monday showing Grok Build's CLI uploaded entire user repositories to Google Cloud, including gitignored files and secrets deleted from history.
  • 02As of Monday, xAI's servers began returning a 'disable_codebase_upload: true' flag, and the codebase upload no longer fires in Cereblab's tests.
  • 03Musk said on X that previously uploaded data will be 'completely and utterly deleted' and asked users to opt in to retention for debugging.
  • 04Comparable tools such as Claude Code retain significantly less data than what Grok Build was capturing, according to the Cereblab writeup.
  • 05Security researcher Dr. Lukasz Olejnik of King's College London said the exposed data could include proprietary source code, credentials, and infrastructure details.

Dr. Lukasz Olejnik, an independent security researcher at King's College London, confirmed the volume of data retention was excessive. He said the exposed material could include proprietary source code, information about security vulnerabilities, personal data, infrastructure details, and credentials — essentially the full attack surface of any organization whose engineers had tried the tool.

xAI's initial public response pointed users to the CLI's /privacy command, saying that if zero data retention is disabled, /privacy is available in the CLI to disable data retention, which also deletes previously synced data. Cereblab pushed back: /privacy is a per-session retention toggle, not the switch that fixed this, so it shouldn't be pointed to as the control. In other words, the command xAI cited did not actually govern the repository-upload behavior researchers had exposed.

Musk followed with two X posts of his own. In one, he said previously uploaded data would be deleted. In another, he said privacy settings are always respected but asked users to voluntarily allow xAI to retain their data because it is helpful for debugging issues.

completely and utterly deleted
Elon Musk, xAI founder

There is no public accounting yet of how many developers ran Grok Build against private repositories before the server-side flag flipped, or how xAI intends to verify the deletion. The company has not published a post-mortem, a data-retention policy update, or an independent audit of what was captured and where it was stored. For enterprise users who piloted the tool, the practical question is whether credentials and API keys that touched a Grok Build session need to be rotated regardless of xAI's assurances.

The incident lands in a market where coding agents are the most commercially serious application of large language models. GitHub Copilot, Cursor, Claude Code, and Grok Build all compete for the same developer seat, and trust in how each tool handles source code is now a purchase criterion, not a footnote. A CLI that silently ships gitignored files is a category-level trust problem, not a Grok-specific bug.

Related · from this week
xAI faces expanded lawsuit as woman says stepfather used Grok to make 7,000 explicit images
Jaeden Schafer · 5 min read →

The counterweight worth stating: Cereblab and xAI both agree the upload behavior has been disabled server-side, and Musk has publicly committed to deletion. If xAI follows through with a transparent write-up of what data was collected, how long it was stored, and what deletion looked like in practice, the recovery path is straightforward. If it doesn't, security teams at any company whose engineers touched the tool will have to assume the worst.

The broader read is that xAI's product velocity is running ahead of its data-governance discipline in a segment where the opposite ordering is table stakes. Coding tools live or die on whether CISOs approve them, and CISOs do not approve tools that upload repositories by default. Grok Build's usable feature set will not matter to enterprise procurement until xAI publishes the kind of retention policy, audit trail, and default-off posture that its competitors already ship with. Fixing the flag was the easy part; earning back the review committee is the expensive one.

ShareXLinkedInEmail
AI Box

Every AI model. One chat.

The latest models from ChatGPT, Claude, Gemini, Sora, ElevenLabs — 80+ models in a single chat. Compare answers side by side. Pick the best one every time.

  • ChatGPT, Claude, Gemini, Grok, DeepSeek — in one chat
  • Generate images & video with Sora, Veo, Ideogram
  • Compare any two models side by side
  • From $8.99/mo · 80+ models, all included
Try AI Boxaibox.ai
Trusted by 3,000+ teams
Got a tip?

Working on something we should cover, or seeing a story we missed? Send leads, documents, or feedback to hello@aichatdaily.com. For sensitive tips, see our secure tips page for Signal and PGP options.

Spotted an error? Email hello@aichatdaily.com with the URL and the issue, or read our full corrections policy.

AI Box Daily briefingFree · Daily · No fluff

Stay ahead of everyone in AI.

The tightly edited AI news email engineers, founders, and investors actually open. One email. Every weekday. Five minutes to finish.

Loved by 10,000+ AI professionals
Free forever. Unsubscribe with one click.

The briefing read inside teams at

Keep reading

More from Security

xAI faces expanded lawsuit as woman says stepfather used Grok to make 7,000 explicit images
Security

xAI faces expanded lawsuit as woman says stepfather used Grok to make 7,000 explicit images

A fourth plaintiff joins a Tennessee suit alleging Grok generated child sexual abuse material from a childhood photo.

Jaeden Schafer5 min read
xAI sues Minnesota days before nudify law hits, citing First Amendment
Security

xAI sues Minnesota days before nudify law hits, citing First Amendment

The statute imposes $500,000 per-violation penalties starting August 1st; xAI filed suit just days before it takes effect.

Jaeden Schafer5 min read
xAI sues Grok user for CSAM generation, argues users own AI outputs
Security

xAI sues Grok user for CSAM generation, argues users own AI outputs

Elon Musk's xAI filed its first lawsuit against a user accused of generating child sex images, staking out a legal theory that shifts liability from model to prompter.

Jaeden Schafer5 min read