Grok CLI Uploads Entire Repos, Secrets to Google Cloud

The 30-Second Skim
- What happened: xAI's Grok Build CLI transmits unredacted file contents, including secrets, and uploads entire repositories to Google Cloud Storage by default, with no user-facing disclosure of the full data collection scope.
- Key facts & numbers: xAI's Grok Build CLI transmits the full contents of files it reads—including unredacted .env secrets—to xAI via POST /v1/responses and archives them in a session_state uploaded to Google Cloud Storage, with no redaction or user warning. Grok Build CLI uploads entire Git repositories, including never-read files and full git history, as a codebase snapshot to the grok-code-session-traces GCS bucket, verified by a 5.10 GiB upload from a 12 GB repo with zero storage failures. Google Cloud Storage hosts the grok-code-session-traces bucket where Grok's session data is stored, a mechanism embedded in the CLI binary but not disclosed in install or quickstart documentation.
- What happens next: Grok isn’t just reading your code—it’s uploading your whole repo, secrets and git history included, to Google Cloud, and turning off 'Improve the model' doesn’t stop it.
- xAI's Grok Build CLI transmits the full contents of files it reads—including unredacted .env secrets—to xAI via POST /v1/responses and archives them in a session_state uploaded to Google Cloud Storage, with no redaction or user warning.
- Grok Build CLI uploads entire Git repositories, including never-read files and full git history, as a codebase snapshot to the grok-code-session-traces GCS bucket, verified by a 5.10 GiB upload from a 12 GB repo with zero storage failures.
- Google Cloud Storage hosts the grok-code-session-traces bucket where Grok's session data is stored, a mechanism embedded in the CLI binary but not disclosed in install or quickstart documentation.
- The CLI binary contains a first-party Rust crate (xai-data-collector) that enables file tracking and GCS uploads, with constants and source paths like 'gcs.rs' and 'storage.googleapis.com' hardcoded and observable via strings extraction.
Why It Matters
Developers using Grok risk exposing sensitive credentials and full codebases without consent, as uploads occur by default and cannot be fully disabled through settings, increasing data leakage risks for organizations relying on private repositories. The 27,800× data volume disparity between model interaction and storage confirms bulk collection is systemic, not incidental.
Sources Cited
- Hacker News — What xAI's Grok Build CLI Actually Sends to xAI
Related Coverage
Ask SkimNews