↓ Skip to main content
  1. Articles/

xAI Open-Sourced Grok Build. The Code That Uploaded Your Repo Came With It.

·1064 words·6 mins·
Florent Clairambault
Author
Florent Clairambault
CTO & software engineer — writing daily about spec-driven development and agentic coding

xAI Open-Sourced Grok Build. The Code That Uploaded Your Repo Came With It.

Openness is supposed to be the industry’s trust-repair move of last resort: when a vendor gets caught doing something users didn’t consent to, publish the source and let people verify the fix themselves. xAI followed that script almost to the letter on July 15 — and then undercut it by leaving the exact code in question sitting in the repository, merely switched off from the server side. It’s a useful case study in the difference between auditable and trustworthy, and it lands one week after this blog covered the original incident.

A Quick Recap of What Happened
#

On July 13, independent researcher cereblab published a wire-level traffic capture showing that Grok Build — xAI’s Rust-based coding CLI, built on SpaceXAI-leased compute in the wake of the Cursor acquisition — was uploading entire git repositories to a Google Cloud Storage bucket named grok-code-session-traces, regardless of what the agent actually needed to complete a task. On a 12GB test repository, model-turn traffic to xAI’s /v1/responses endpoint totaled roughly 192KB; the storage channel moved 5.10GiB in 73 chunks — a gap of roughly 27,800x between what the task required and what left the machine. A planted canary file the agent was explicitly told never to open still showed up in the uploaded bundle. The “Improve the model” privacy toggle, which developers reasonably assumed controlled whether their code left their machine, controlled nothing of the sort — it only governed training use, while a separate, undocumented flag governed the upload itself (full writeup here).

xAI’s response at the time was a server-side flag flip (disable_codebase_upload: true) and an Elon Musk post promising that “all user data that was uploaded to SpaceXAI before now will be completely and utterly deleted.” No security advisory. No deletion timeline. No way for an affected developer to confirm their own data was actually gone.

The Open-Source Release
#

Two days later, on July 15, xAI published the entire Grok Build source — 844,530 lines of Rust covering the agent harness, terminal UI, tool layer, and plugin/extension system — to GitHub under an Apache 2.0 license, alongside a usage-limit reset for all users. Framed as a transparency move, the release lets anyone inspect exactly how the CLI decides what to read, what to send, and where it goes.

Here’s what an inspection actually turns up, according to independent analysis of build 0.2.99: the upload function is still there. It’s gated by the same server-side flag xAI flipped on July 13, meaning the capability to resume bulk-uploading repositories exists in the shipped binary today, and xAI can re-enable it remotely without pushing a new release or a changelog entry a user would ever see. The fix isn’t a fix in the sense of code that was removed — it’s a switch that happens to be set to “off” right now, sitting inside a codebase now marketed as open and auditable.

Two more details cut against the transparency framing. First, xAI is not accepting external contributions to the repository — this is source-available for inspection, not open development in the collaborative sense the license nominally implies. Second, GitHub Issues are disabled on the repo, which means the community that’s supposed to benefit from “you can audit this yourself” has no first-party channel to report what it finds. As one analysis summarized it: xAI is offering “open-source theater” — the appearance of the industry’s standard trust-repair gesture, without the parts of it (external review, issue tracking, an actual code change) that would make the gesture mean anything.

“Auditing a Tool Is Not the Same as Trusting a Vendor”
#

That line, from a follow-up analysis published after the source dropped, is the sharpest single summary of the gap here. Simon Willison, reviewing the release, credited xAI for making Grok Build’s internals genuinely inspectable — that part is real, and it’s more than most closed coding agents offer. But inspectability answers “can I verify what this does,” not “will the vendor tell me when that changes.” A dormant server flag means the honest answer to “is my code safe from bulk upload right now” is: however xAI’s backend is configured today, which you cannot see, verify, or get notified about — open source repository notwithstanding.

The comparison that keeps surfacing in coverage of this story is instructive. Cereblab’s original tests, and follow-up analysis, found that Claude Code, Gemini CLI, and Codex read individual files as agents actually need them and don’t bundle-and-ship the whole checkout plus git history off-box under equivalent conditions. That’s not a coincidence of implementation detail — it reflects a design choice about where the trust boundary sits. Claude Code’s sandbox.credentials model, which blocks agent commands from reading credential files and secret environment variables at the resource level, is a control you can point to and reason about independent of server-side state you can’t see. A codebase you can read is worth something. A codebase you can read whose actual runtime behavior is one unannounced flag away from changing is worth quite a bit less, and calling it “open source” doesn’t close that gap.

What Developers Should Actually Do
#

The guidance from the original incident still stands, and the open-source release doesn’t change it: if you ran Grok Build against a repository containing real secrets — API keys, database passwords, SSH keys, cloud tokens, anything committed and later deleted from working files but still in git history — rotate those credentials now. Don’t treat Musk’s deletion promise or the July 15 release as resolution; neither comes with a verification mechanism.

If you want to actually audit Grok Build rather than take xAI’s framing at face value, the source is there to read — specifically, look at how the upload path is gated and confirm for yourself that “disabled” means “removed” or merely “flagged off.” For agentic coding tools generally, the standing lesson from this saga is the one worth carrying forward: a privacy toggle or an open-source release is only as good as the specific behavior it actually constrains. Ask what the control covers, not what it’s named.


Sources:

AI Tools

Grok Build Was Quietly Uploading Entire Codebases to xAI's Cloud — the Privacy Toggle Did Nothing

Independent wire-level traffic analysis published July 13-14 found xAI’s Grok Build CLI silently uploading entire git repositories — full history, unredacted secrets, files the agent never even opened — to a Google Cloud Storage bucket. On a 12GB test repo, model traffic was ~192KB while the upload channel moved 5.10GiB: a roughly 27,800x gap between what the task needed and what left the machine. The ‘Improve the model’ privacy toggle didn’t stop it; only a quiet server-side flag flip did.

Jul 15, 2026 · 6 min read

AI Tools

GhostApproval: Claude Code Correctly Identified the Attack — Then Showed You a Lie Anyway

Wiz Research disclosed GhostApproval on July 8: a symlink trust-boundary flaw in six AI coding agents — including Claude Code, Cursor, Windsurf, Amazon Q, Augment, and Google Antigravity — where the agent’s own reasoning correctly flags a malicious file target, but the permission dialog shown to the user displays the decoy filename instead. Anthropic initially rejected the report as outside its threat model; the fix that quietly landed nine days earlier turned out to be unrelated.

Jul 14, 2026 · 6 min read

AI Tools

Claude Code Shipped Six Releases in a Week — and the Press Got the Biggest One Wrong

Claude Code shipped six releases (v2.1.199–204) between July 2 and 8, including a 7MB binary/memory cut, a security fix for leaking API endpoints in background sessions, and OTel telemetry for Dynamic Workflows. The most-reported change — a supposed ‘Auto to Manual’ permission-mode reversal — isn’t what the changelog actually says, and no primary Anthropic source backs the version of the story that’s spreading.

Jul 8, 2026 · 5 min read

AI Tools

GuardFall: 10 of 11 Open-Source AI Coding Agents Fail a 30-Year-Old Shell Trick

Adversa AI’s GuardFall research shows that 10 of 11 popular open-source AI coding agents — including Aider, Cline, Goose, opencode, and OpenHands, collectively ~548,000 GitHub stars — can be tricked into running destructive shell commands their own safety filters were built to block, using decades-old bash tricks like quote splitting and $IFS expansion. Only Continue held up under testing.

Jul 5, 2026 · 6 min read

AI Tools

DuneSlide: Cursor's Sandbox Had Two Ways Out, and Prompt Injection Found Both

Cato AI Labs disclosed DuneSlide — two CVSS 9.8 vulnerabilities (CVE-2026-50548, CVE-2026-50549) that let zero-click prompt injection escape Cursor’s sandbox and achieve full remote code execution. Both bugs were patched in Cursor 3.0 back in April, but Cursor’s security team initially rejected the report in February, citing threat-model limitations, before reopening it under escalation.

Jul 3, 2026 · 6 min read