Sign in

Why Elon Musk's xAI is facing backlash over claims it uploaded users' code

 xAI's Grok Build is under scrutiny after researchers claimed it uploaded entire Git repositories to cloud storage. Here's what the investigation found.

Updated on: Jul 14, 2026, 23:37:20 IST
Share
Share via
  • facebook
  • twitter
  • linkedin
  • whatsapp
Copy link
  • copy link

A new controversy has started around xAI's Grok Build coding tool after a security researcher claimed it was uploading users' entire code repositories to xAI's cloud without clearly informing them.

xAI's Grok Build is under scrutiny after researchers claimed it uploaded entire Git repositories to cloud storage. (REUTERS)
xAI's Grok Build is under scrutiny after researchers claimed it uploaded entire Git repositories to cloud storage. (REUTERS)

The issue became widely discussed after software security expert Hari posted about it on X. Hari claimed, “I reversed xAI's official Grok Build binary. In a controlled session with zero tool-calls, it uploaded the complete codebase to xAI's storage. It ships a malware-like background code collector.” Hari wrote on X, "SpaceXAI was caught uploading your code to its cloud."

OpenAI CEO Sam Altman reacted to Hari's post by replying with a one-word response: "concerning."

xAI later responded publicly to the allegations on X. The company said it takes user privacy seriously and respects customer choices. xAI said enterprise customers using Zero Data Retention (ZDR) never have their code or trace data stored.

What researchers found

According to The Hacker News, Grok Build was not just sending files needed for coding tasks. It was uploading entire Git repositories, including the full commit history, to a Google Cloud Storage bucket operated by xAI.
A Git repository is a folder where a project's files and their complete history of changes are stored. The investigation was carried out by a researcher who publishes under the name cereblab.

The researcher tested Grok Build version 0.2.93. During testing, the researcher intercepted one of the uploads sent by Grok Build. The intercepted upload allowed the researcher to recreate the uploaded Git repository. The recreated repository included a file that Grok had specifically been instructed not to read during the coding task. This suggested that files were uploaded even if the AI model never opened or used them.

Size of the uploads

The researcher also measured how much data Grok Build sent during testing. In one test using a 12 GB repository, the AI model itself only exchanged about 192 KB of data while answering the request.

However, the separate storage upload transferred 5.10 GiB of repository data. According to the researcher, this was nearly 27,800 times more data than the model actually needed to complete the coding task, according to The Hacker News.

Also read: How China is threatening US national security through AI theft: Explained

The canary file test

The researcher planted a special test file called never_read_canary.txt inside the repository. The file contained a unique marker to see whether it would be uploaded. Even though Grok Build never read that file during the coding task, it was found inside the uploaded repository. The uploaded bundle also contained the repository's complete Git commit history.

Secret files and credentials

The investigation also looked at how Grok Build handled secret files. According to The Hacker News report, if Grok opened a file, its contents were sent directly to the AI model. In one test, a tracked .env file containing API keys and database passwords was uploaded without redacting the information. The same file was also included in a session archive sent for storage. However, the report said the behavior itself was concerning because sensitive files could be uploaded without removing confidential information.

Privacy settings

The researcher also tested Grok Build with the "Improve the model" option turned off. Despite disabling that option, the repository was still uploaded to storage. The Hacker News report said the server continued returning the setting trace_upload_enabled: true. According to the researcher, turning off model training does not stop code from being uploaded.

Comparison with other AI coding tools

However, the researcher said sending an entire repository and its history is much broader than sending only the files needed for a task. The researcher compared Grok Build with other AI coding tools, as noted by The Hacker News. Claude Code and OpenAI Codex did not upload entire repository bundles during testing. Grok Build was the only tool in the comparison that uploaded the full workspace.

xAI's response

On July 13, Grok Build version 0.2.93 stopped making storage upload requests. The server also reportedly changed its settings to disable_codebase_upload: true and trace_upload_enabled: false, according to The Hacker News.

Elon Musk's comments

xAI mainly addressed the issue through posts on X instead of releasing a formal security advisory or changelog. Elon Musk also commented on the issue. Musk said all user data uploaded before the changes would be "completely and utterly deleted", Elon Musk on X.

  • Durva More
    ABOUT THE AUTHOR
    Durva More

    Durva More is a Senior Content Producer at Hindustan Times, where she covers finance, and global news. She brings experience across digital and television journalism, with a strong focus on breaking news, business reporting, and international affairs. Before joining Hindustan Times, Durva worked as an International News Writer at The Economic Times, covering a diverse range of subjects including global politics, business, sports, entertainment, and major world events. She also worked as a Business Reporter with NDTV Profit. A postgraduate diploma holder in Journalism from the Asian College of Journalism, Durva is passionate about field reporting and storytelling. She thrives on the adrenaline of chasing stories, speaking with people from different walks of life, and amplifying voices that deserve to be heard. Her reporting is driven by curiosity, accuracy, and a commitment to making complex subjects accessible to readers. When she is not chasing stories or covering breaking news, Durva enjoys reading books and painting. She loves exploring new ideas, meeting people, and learning about different perspectives. For her, both journalism and art are ways to understand the world and tell stories that matter.Read More

Stay updated with US News covering politics, crime, weather, local events, and sports highlights. Get the latest on Donald Trump and American politics along with Horoscope 2026.