SpaceXAI’s Grok programming tool was uploading its users’ entire codebase to cloud storage
Quick answer
SpaceXAI's Grok Build AI coding tool was spotted uploading users' entire codebases to Google Cloud before it was reported, and the company turned it off. The Register reports that Cereblab published findings on Monday showing how the Grok Build CLI was packaging and uploading entire code repositorie
SpaceXAI’s Grok Build Caught Uploading Entire Codebases—What Developers Need to Know
On Monday, security researchers at Cereblab published findings that sent a jolt through the AI coding tool ecosystem: SpaceXAI’s Grok Build CLI was packaging and uploading users’ entire code repositories to Google Cloud, including files explicitly excluded and secrets deleted from version history. The company has since disabled the codebase upload feature, but the incident raises fundamental questions about trust, data sovereignty, and how AI coding agents handle sensitive source material.
For developers who rely on AI-assisted coding tools to accelerate their workflows, this is not just a privacy scare—it’s a reminder that the convenience of cloud-powered code analysis comes with real, often opaque, data-exposure risks. Here’s what happened, why it matters, and how to evaluate the tools you invite into your repository.
The Core Issue: Unwanted Exfiltration
Cereblab’s analysis showed that Grok Build’s CLI was bundling entire codebases and uploading them to cloud infrastructure, even when developers had explicitly configured the tool to ignore certain files. The uploads included deleted secrets—credentials that had been removed from Git history but were still recoverable from the repository’s object store. According to the report, the retention policy was “excessive” relative to comparable tools like Claude Code, which typically limit uploads to the context needed for a specific task.
As of Monday, SpaceXAI’s servers returned a disable_codebase_upload: true flag, and the upload mechanism no longer fires. Elon Musk responded on X, promising that all previously uploaded data will be “completely and utterly deleted.” He also emphasized that privacy settings are always respected, but asked users to opt into data retention for debugging purposes.
SpaceXAI initially pointed to a /privacy CLI command as the control for disabling retention. Cereblab pushed back, noting that /privacy is a per-session retention toggle—not the switch that actually fixed the underlying codebase upload behavior. The distinction matters: developers who believed they were managing data exposure through that command may not have been protected at all.
What’s at Stake for Developers
Dr. Lukasz Olejnik, an independent security researcher at King’s College London, confirmed to The Verge that the volume of data retained constitutes an excessive risk surface. The potential exposures include:
- Proprietary source code – your intellectual property, algorithms, and business logic.
- Information about security vulnerabilities – flaws that could be exploited if exposed.
- Personal data – credentials, API keys, configuration files with user information.
- Infrastructure details – internal network topologies, cloud resource names, deployment strategies.
- Credentials – passwords, tokens, and secrets that may no longer be in active use but remain valid for legacy systems.
For any developer or team shipping software, this is a nightmare scenario. Even if the data is eventually deleted, the exposure window—from the moment the upload occurred until discovery and remediation—represents an uncontrolled transfer of sensitive material to a third party’s cloud storage.
How This Fits the AI Coding Tool Landscape
The Grok Build incident is not an isolated event. As AI coding agents become more powerful, they often require access to the full codebase to generate accurate completions, refactors, and tests. Tools like Claude Code, GitHub Copilot, and Cursor all operate on some degree of code context uploading. The difference is in transparency, control, and data handling policies.
When evaluating an AI coding agent, developers should look for three key safeguards:
- Granular file exclusion: The tool must respect
.gitignoreand explicit ignore directives, not just package everything. - Session-bound data retention: Code context should be ephemeral and not stored beyond the immediate request unless the developer explicitly opts in.
- Verifiable deletion mechanisms: Users should be able to confirm that data has been removed, not just be told that it will be.
If you’re shopping for an assistant, our detailed comparison of the best AI coding agents in 2026 provides a head-to-head look at how these tools handle privacy, security, and code analysis, so you can pick one that aligns with your compliance requirements.
What to Do If You Use Grok Build
If you’ve been using Grok Build, the immediate action is to rotate any credentials or secrets that existed in your repositories during the period the upload was active. Even though SpaceXAI claims all uploaded data will be deleted, the safest assumption is that any exposed secrets should be considered compromised. Regenerate API keys, update database passwords, and audit access logs for any unusual activity.
Beyond that, review your AI tool usage policies. Many developer teams automatically grant cloud-based coding tools broad repository access without scrutinizing what data is sent or stored. The Grok Build incident should prompt a policy review: document which tools are allowed, what permissions they require, and how data handling is verified.
For those comparing alternatives, the debate between Cursor vs. Claude Code often focuses on features and speed, but security posture is becoming an equally important axis. Claude Code’s more conservative data retention was explicitly contrasted in the Cereblab report, making it a reference point for developers who prioritize data minimization.
The Broader Lesson: Trust but Verify
The Grok Build incident is a sharp reminder that the convenience of AI coding agents can obscure real data-exposure risks. The tool was designed to help developers—but its implementation uploaded every file, every secret, every overlooked piece of infrastructure detail. This wasn’t a bug; it was a feature that operated beyond the user’s reasonable expectations.
For developers and teams, the lesson is straightforward: do not assume that an AI tool respects your boundaries just because it says it does. Test the tool with a non-sensitive dummy repository first. Monitor network traffic if possible. Read the privacy policy and data retention section carefully—not just the marketing claims.
The response from SpaceXAI—turning off the upload and promising deletion—is an important first step, but trust takes a long time to rebuild. The company’s initial deflection to the /privacy command, which Cereblab noted was not the actual fix, does not inspire confidence. Developers deserve tools that are transparent by design, not by crisis.
As the AI coding tool landscape continues to evolve at breakneck speed, incidents like this will shape industry best practices. The smartest builders will not just use the most powerful tool—they’ll use the one that respects their code as much as they do.
Source: The Verge. Details as reported; verify specifics at the source.