Skip to content
IFAI

AI tools

Grok Build caught uploading entire code repos to cloud

Published Reach 50

xAI's Grok Build CLI was caught silently packaging and uploading users' entire code repositories—including Git histories, SSH keys, and secrets—to Google Cloud storage. The company has since disabled the uploads server-side, and Elon Musk promised all previously synced user data will be utterly purged.

Grok Build caught uploading entire code repos to cloud
Image: theverge.com

If you gave xAI's new coding CLI a spin recently, you might want to cycle your SSH keys immediately.

AI safety research outfit Cereblab just dropped a bombshell report on Monday, revealing that Grok Build, xAI's command-line coding assistant, was secretly packaging and uploading users' entire code repositories to a Google Cloud Storage bucket.

It gets worse. The tool was slurping up entire Git histories, including sensitive credentials and secrets that developers had explicitly deleted from their commits. Even when users told the tool not to touch specific files, it ignored the rules and uploaded them anyway. In at least one horrifying case, a user had their entire home directory swept up, exposing their SSH keys and local password manager databases.

The cloud purge and the pushback

Security experts quickly sounded the alarm. Dr. Lukasz Olejnik, an independent security researcher at King’s College London, called the data collection excessive, pointing out that proprietary code, vulnerability reports, infrastructure setups, and private credentials were left sitting on third-party cloud storage.

xAI quietly pushed a server-side hotfix on Monday. Cereblab confirmed that xAI's backend now sets the disable_codebase_upload flag to true, which finally stopped the automatic exfiltration.

Elon Musk took to X to promise that every bit of data previously uploaded by Grok Build will be completely and utterly deleted. But in another post, Musk insisted that privacy settings are always respected and even asked developers to keep data retention on because it is helpful for debugging issues.

xAI also suggested users could run the /privacy command in the CLI to disable retention and wipe synced data. Cereblab immediately called foul on that claim, explaining that /privacy is merely a per-session toggle that had nothing to do with stopping the repository upload bug in the first place.

Why it matters

This is about as bad as an AI developer tool rollout can get.

For anyone writing code for a living, local tools need to respect system boundaries without exception. While rival tools like Claude Code operate with careful scopes and explicit permissions, Grok Build essentially acted like data exfiltration malware by vacuuming up files it was explicitly told to avoid, along with whole home directories.

Musk's promise to wipe the servers is nice, but we think developers shouldn't take any chances here. If you ran Grok Build on your machine, you need to rotate your SSH keys, API secrets, and server access tokens right away.

It also highlights a reckless pattern in frontier AI tooling right now. Teams are so desperate to ingest complete project context to make their coding agents appear smarter that they blow past basic security hygiene. When an AI tool treats your private credentials as disposable training and debugging fuel, it does not matter how good its completions are, trust vanishes instantly.

Sources (2)

  1. [1]
    theregister.com(opens in a new tab)Originaltheregister.com
  2. [2]
    theverge.com(opens in a new tab)Reporttheverge.com

Best of AI, daily