Elon Musk vows purge after Grok Build reportedly uploaded entire Git repositories to the cloud
Security researcher finds xAI's Grok Build CLI uploaded .env secrets and full Git repositories to the cloud.

An in-depth analysis of xAI's Grok Build CLI has revealed that version 0.2.93 transmitted unredacted file contents, including secrets stored in .env files, along with entire Git repositories and their commit history to cloud storage. According to security researcher Cerelap, whenever Grok Build accessed local files, their contents were sent verbatim as part of model requests made to the POST /v1/responses endpoint.
During testing, the researcher found unredacted fake API keys and database passwords stored in an .env-style file within the captured request data. The same sensitive information was also present in a session state archive uploaded through the POST /v1?storage endpoint.
Another concerning finding was the presence of a separate background upload mechanism. According to the analysis, Grok Build could package and upload an entire Git repository, rather than limiting the transfer to only the files required for a specific coding task.
A lacking disable option
Grok Build includes an "Improve the model" toggle, which many developers would reasonably interpret as a control for data collection. However, disabling the setting did not stop the uploads. Even after the option was turned off, server responses continued to return trace_upload_enabled: true, and the repository uploads proceeded as normal.
A fix rolled out quietly
A day after the report became public, the researcher tested the same Build CLI v0.2.93 client again and noticed a key change. The server was now instructing the application to disable codebase uploads and turn off trace uploads. Across six separate tests, the researcher found no evidence that Git repositories were being uploaded, suggesting xAI had quietly deployed a server-side fix after the issue was disclosed.
However, there are important limitations to these findings. The fix was verified using only a single device and account, meaning it is unclear whether the change has been rolled out globally, is being introduced in phases, or is only temporary. The researcher also stressed that there is no evidence the uploaded code was used to train xAI's AI models, accessed by employees, or that every user received the same server configuration. The findings relate to previously undisclosed data collection rather than any confirmed misuse of user data.
What remains unclear is xAI's response to the issue. The company has not issued a security advisory or explained why the repositories were uploaded, how the data was handled, how long it was retained, or whether repositories already uploaded to its servers will be deleted. The official changelog for Build CLI v0.2.98, released on July 12, 2026, also makes no mention of the repository upload behaviour.
Elon Musk's Reply
Following the disclosure, xAI rolled out a server-side fix that stopped Grok Build from uploading entire Git repositories, according to security researcher Cereblab. The company also said users can disable data retention and delete previously synced data using the /privacy command.
Responding to the incident on X, Elon Musk said xAI would permanently delete all user data uploaded before the fix was deployed.
"As a precautionary measure, all user data that was uploaded to xAI before now will be completely and utterly deleted. Zero anything whatsoever will remain."
While Musk also encouraged users to continue sharing diagnostic data to help improve the product, the researcher argued that the real fix was the server-side change that disabled repository uploads, rather than the /privacy command.

OpenAI launches Presence to bring AI agents into customer support and enterprise workflows
Samsung Galaxy Fold 8 Ultra, Fold 8, Flip 8 launched: Here is how much it costs in India with discounts
Florida pastor sues OpenAI, says ChatGPT's medical advice delayed emergency treatment: Report
US accuses China's Moonshot AI of using Anthropic's Fable to build K3 model
Apple's biggest Mac refresh in years could bring 11 new models: Report
