Article: xAI released the source code for its Grok Build tool on July 15, 2026, just two days after researchers proved the software was silently uploading entire git repositories, home directories and secret files to Google Cloud Storage.

The incident that triggered the release

On July 13, a security researcher showed that Grok Build ignored its advertised privacy controls. When a user flipped the “stop uploads” toggle, the tool kept streaming data to a cloud bucket. The uploads grabbed every file in the working directory and, in at least one case, swept up the entire home folder, exposing SSH keys and password databases.

xAI hid a server-side flag behind the user checkbox. Two days later the company announced that Grok Build was being open-sourced under the Apache 2.0 license, framing the move as a way to broaden developer access.

What the repository still contains

A quick look at the new repository shows the exfiltration routine still there. It sits inside a conditional that checks the hidden flag—still present, just disabled. The code also contains blocks copied from OpenAI and OpenCode without attribution, and it embeds instructions for sub-agents to conceal their existence, a technique that hampers forensic analysis.

Why the lingering code matters

Developers who adopt Grok Build now have to trust xAI to keep a single flag in the correct state across every patch. That trust is fragile for three reasons:

  • Hidden control path – The flag lives on the server side, invisible to end users. A misconfiguration or a malicious insider could flip it without any audit trail.
  • Code reuse without credit – Unclear licensing provenance could expose users to legal risk if the borrowed code carries incompatible terms.
  • Obfuscation instructions – Built-in hiding mechanisms make it harder for security tools to detect malicious activity the tool might trigger.

The open-source label does not automatically bring community-driven review. xAI’s repository does not accept external pull requests, so the codebase will evolve in a closed loop despite being publicly readable.

How Grok Build stacks up against alternatives

Tool License Community contributions Vendor lock-in
Grok Build Apache 2.0 No (xAI blocks PRs) Low (supports multiple models)
Codex CLI Apache 2.0 No (locked to OpenAI) High (OpenAI only)
OpenCode MIT Yes (accepts community work) Low (multi-provider)
Claude Code Proprietary No High (Claude only)

The only clear advantage Grok Build offers is its ability to point at local models or other vendors, reducing dependence on a single provider. All other points—license openness, contribution model and code provenance—are either on par with or worse than existing options.

What developers should do right now

  • Audit the upload path – Examine the repository’s network code and confirm that no outbound connections to unknown endpoints remain.
  • Rotate secrets – Regenerate any SSH keys, API tokens or password stores that lived near Grok Build before July 13.
  • Run in isolation – Deploy the tool inside a sandbox or container that lacks access to privileged files or credentials.
  • Monitor flag state – If you host your own instance, verify that the hidden flag stays disabled after every update.

These steps don’t eliminate the risk of a future change on xAI’s side, but they reduce the chance that existing exfiltration logic will silently reappear.

Bottom line

Open-sourcing Grok Build after a data-exfiltration scandal does not erase the underlying vulnerability. The repository still carries the hidden upload routine, and the only safeguard is a flag that the company controls. Until the code is stripped of that logic or the flag’s state becomes auditable, developers should treat Grok Build as a high-risk component and limit its use to environments that contain no sensitive data.