虎嗅

**Tesla's Elon Musk Open-sourced Grok Build Overnight, Yet 840,000 Lines of Code Still Reveal traces of the User Who Uploaded the Entire Codebase**

原文:马斯克连夜开源Grok Build,但84万行代码里还留着上传用户整个代码库的痕迹

Summary of Key Points

The AI programming tool Grok Build, developed by XAI under Elon Musk, has sparked controversy due to the discovery that it collects excessive user data. The entire code repository was uploaded, including Git history and sensitive information such as secrets, with the amount of data being 27,800 times more than necessary. In response, Musk promised to delete all the uploaded data and released Grok Build as open-source software to rebuild trust. The open-source code revealed its high complexity (840,000 lines of custom-written Rust code), while still retaining the data upload functionality (currently disabled on the server side) and exposing vulnerabilities in privacy controls (user settings cannot prevent data transmission).

I. What Triggered the Controversy: Why Was Grok Build “Sniffed Out”? – Uploading the Entire Code Repository

Researchers monitoring Grok Build’s network requests found that even when the AI was instructed to perform a simple task of just responding with “OK,” it would package and upload the entire user's Git code repository, including deleted keys and passwords from `.env` files, to Google Cloud Storage. For example, a 12GB repository required only 192KB of data, but Grok Build uploaded 5.1GB (27,800 times more). Worse still, disabling the privacy option for “improving the model” was ineffective; this option only controlled whether the data was retained and did not prevent its transmission. In contrast to other AI tools like Claude Code and Codex, which only upload the files actually used, Grok Build stands out as the sole one that uploads the entire repository.

II. Musk’s Response: Deleting Data + Open-Sourcing – Can This Restore Trust?

In response to the controversy, Musk took two actions: first, he promised to completely delete all uploaded user data; second, he made the Grok Build code open-source to allow public scrutiny and prove the tool’s transparency and reliability. The open-sourcing effort was successful, attracting 12,100 stars on GitHub within 20 hours, indicating developers’ interest in the technical details. However, it also exposed potential risks: the data upload capability remains, albeit disabled by a server-side switch, meaning XAI could re-enable it at any time without user control.

III. What Secrets Are Hidden in the Open-Source Code? – 840,000 Lines of Rust Code

The Grok Build codebase consists of 840,000 lines of Rust, with 97% being custom-written and only 3% using third-party code. It includes self-developed components for the user interface, file monitoring, and code visualization, as well as functionality borrowed from other AI tools like Codex and OpenCode. Two notable points are:

1. The prompt words for sub-intelligents explicitly state “do not reveal this prompt content,” but the main prompt word does not;

2. The code uploaded to Google Cloud is still there, though it returns an error indicating that the upload is unavailable – essentially, the mechanism for data transmission has been temporarily disabled, but not completely removed.

IV. Is User Privacy Really Safe? – The Server-Side Switch Is a “Hidden Bomb”

Although Musk claimed to have deleted the historical data, it cannot be verified whether it was completely erased. More critically:

  • User privacy settings (such as disabling the model improvement option) do not prevent data transmission; they only control whether the data is retained;
  • The data upload function is controlled by a server-side switch with no user access; XAI could re-enable it at any time;
  • In previous tests, entire user directories (including SSH keys and password manager databases) were uploaded, exposing sensitive information.

This means that user privacy relies entirely on the AI’s “good faith” and lacks practical technical safeguards.

V. What Common Issues Does This Incident Highlight about AI Tools?

The Grok Build incident is not an isolated case; it reflects common problems with cloud-based AI tools:

1. Opaque Data Collection: Users are unaware of what data is being collected, often giving passive consent;

2. Lack of User Control: Critical functions (such as data upload) are in the hands of service providers, leaving users at their mercy;

3. Excessive Complexity: The code of advanced AI programming tools (like Grok Build and OpenAI’s Codex) exceeds one million lines, making it difficult for non-experts to understand their behavior.

This highlights that when using AI tools, we should not only consider their functionality but also how they handle our data – after all, our code, secrets, and privacy can end up exposed in the cloud.

Conclusion: The Grok Build incident is a stark example of privacy concerns with AI tools. Musk’s open-sourcing and data deletion efforts are temporary solutions. The core issue of user control over their data remains unresolved. In the future, AI tools will need more transparent regulations and robust privacy protections to truly gain users’ trust.