AI failures · Security or operational lapse
U.S. Government Staff Member: Private xAI API Key Published in a GitHub Script (2025)
Verified Checked against its sources on 1 source quoted
- Where it happened
- International or several countries
- Organization
- A U.S. government office (employer of the person who published the key); xAI (the key opened its models)
- Date
- Reported in July 2025; TechRadar's report is dated 16 July 2025
- Function
- Government staff member's handling of an AI service API key
- Work stage
- Source code repository on GitHub
- System
- xAI API (at least four dozen xAI large language models)
- Technology
- Conventional software (not AI)
- Type of failure
- Security or operational lapse
- Caught by
- A researcher
Summary
A government staff member, reported as an employee of the Department of Government Efficiency, committed a script to GitHub that included a private API key for xAI. TechRadar reports the key gave access to at least four dozen large language models developed by xAI, including Grok, and at least 52 according to a security consultancy. TechRadar reports the key was first flagged by GitGuardian and that the repository has since been removed, but that the key still worked and had not been revoked at the time of its report. TechRadar describes the person who published the key as a government employee, not as an xAI employee, and does not say who the key belonged to.
Consequence
- The repository containing the key was removed
Who caught it A researcherFound outside the organization
This is a security or operational lapse at an AI company or in an AI tool, not a failure of AI output or action. It is tracked here, kept separate from incident counts, and carries no lesson.
Key dates
- July 2025Event
- November 3, 2026Checked against sources
Developments are added when the record is reviewed. Next review: November 3, 2027.
Evidence
Each passage is quoted from its source. The record shows the date it was last checked.
-
The API key allowed access to four dozen LLMs, including Grok
Supports: the exposure
A code script was committed to GitHub named 'agent.py' that included a private application programming interface (API) key for xAI
Supports: the script and the key
This was first flagged by GitGuardian, a firm which scans GitHub for API secret tokens, database credentials, and certificates – and alerts affected users.
Supports: how it was found
The code repository that contains the private API key has since been removed
Supports: repository removed
the key still works and has not yet been revoked, so the issue is far from resolved.
Supports: the key stayed live after the repository was removed, as reported at the time
an employee at Elon Musk's Department of Government Efficiency, had access to sensitive databases at the US Social Security Administration, Justice, and Treasury departments
Supports: the person was a government employee
A staffer with access to the personal data of millions of Americans has apparently leaked the API Key to at least four dozen LLMs developed by artificial intelligence company xAI, including X's (formerly Twitter) own chatbot Grok.
Supports: the leak and what the key reached
The exposed API key allowed access to at least 52 different LLMs used by xAI
Supports: number of models, per a security consultancy
Suggested citation. Eminence Scan, “U.S. Government Staff Member: Private xAI API Key Published in a GitHub Script (2025)”, Eminence Growth Solutions, last verified November 3, 2026, https://eminencegrowthsolutions.com/tools/eminence-scan/record/fail-131/.
Using our research: you may read and quote Eminence Scan with credit to “Eminence Scan, Eminence Growth Solutions” and a link; all other rights reserved. Terms: Using our research.
Spotted an error, or a development we have missed? Report a correction. How we check records: research methodology.
