Why Grok Build’s codebase uploads alarmed security researchers
Security By What The Future Newsroom · July 14, 2026 · 4 min read

Why Grok Build’s codebase uploads alarmed security researchers

SpaceXAI’s Grok Build CLI was found packaging and uploading entire code repositories to Google Cloud before the behavior was turned off. Elon Musk said previously uploaded data will be deleted, while researchers warned the retention was excessive and could expose sensitive development information.

SpaceXAI’s Grok Build AI coding tool has drawn scrutiny after researchers found that its CLI was uploading users’ full code repositories to Google Cloud. The company has since disabled the upload behavior, but the episode highlights how much trust developers place in AI programming tools when those tools run inside sensitive projects.

What researchers found

The issue was reported after Cereblab published findings on Monday about how the Grok Build CLI handled local repositories. According to the source article, the tool was packaging and uploading entire codebases rather than only the files needed for a specific request.

Cereblab said the uploads included files the tool had been told not to open, as well as secrets deleted from history. That matters because a software repository can contain far more than active source files. It can include configuration, infrastructure details, credentials, personal data, and traces of earlier development decisions.

The source article also notes that this amounted to significantly more data retention than similar tools like Claude Code. For teams using AI coding assistants, that comparison is important because the practical privacy risk depends not only on whether data is processed, but on how much is collected, where it is sent, and how long it remains available.

The upload behavior was turned off

After the findings were reported, SpaceXAI turned off the behavior. Researchers said that, as of Monday, their tests showed SpaceXAI’s servers returning a “disable_codebase_upload: true” flag. They also said the codebase upload “no longer fires.”

That change appears to address the specific mechanism Cereblab described. Still, the larger concern is about default behavior in developer tools. A coding assistant may need context to be useful, but sending an entire repository to cloud storage creates a very different risk profile from reading a limited set of files during a session.

For developers, the distinction is not academic. Repositories often hold material that was never meant to leave a local environment or a company-controlled system. Even when individual files look harmless, the full collection can reveal product plans, security assumptions, internal architecture, and operational practices.

Elon Musk promised deletion

Elon Musk responded to the incident in a post on X, saying that all data Grok Build previously uploaded will be “completely and utterly deleted.” In a separate post, Musk also said that “privacy settings are always respected.”

At the same time, Musk asked users to allow SpaceXAI to retain their data, saying it is “helpful for debugging issues.” That request illustrates the tension at the center of AI development tools: companies want diagnostic data to improve services and fix problems, while users want strong limits on what leaves their machines.

SpaceXAI also initially pointed users toward a CLI privacy command. The company said, “If [zero data retention] is disabled, the /privacy command is available in the CLI to disable data retention, which also deletes previously synced data.”

Cereblab disputed that framing. The researchers said “/privacy is a per-session retention toggle, not the switch that fixed this, so it shouldn’t be pointed to as the control.” In plain terms, their point was that the setting users could invoke inside a session was not the server-side control that stopped the broader upload behavior.

Why the data risk matters

Dr. Lukasz Olejnik, an independent security researcher at King’s College London, told The Verge that this level of retention is “excessive.” He said the data potentially at risk could include “proprietary source code, information about security vulnerabilities, personal data, infrastructure details, [and] credentials.”

Those categories explain why full-repository uploads are sensitive. Proprietary source code can represent core business value. Security vulnerability information can show where systems are weak. Infrastructure details can reveal how services are deployed or protected. Credentials can create direct access risks if exposed.

The concern is especially sharp for command-line tools because they operate close to the source of truth. Unlike a web chat where a user may paste a snippet, a CLI coding assistant can be run from inside the working directory of a real project. If its defaults are too broad, users may not realize how much context is being collected.

The lesson for AI coding tools

The Grok Build incident is a reminder that AI programming tools need clear, narrow, and predictable data handling. Users should not have to infer whether an assistant is reading a file, retaining a session, syncing a repository, or uploading historical material.

For SpaceXAI, the immediate fix was to stop the codebase upload behavior and promise deletion of previously uploaded data. For the wider market, the issue points to a basic standard developers will expect from AI coding products: privacy controls should match the actual data flow, and explanations should describe the mechanism that is really being changed.

AI coding assistants can be useful precisely because they understand context. But when that context includes an entire repository, the boundary between helpful assistance and excessive collection becomes critical. The Grok Build case shows why developers, security teams, and toolmakers will keep pressing for more transparent defaults around codebase upload, data retention, cloud storage, privacy settings, and repository security.

← Back to the wire

Read next