DOGE API key leak

Posted on Wednesday, July 23, 2025 by AUSTIN HARRIS, Global Sales

Marko Elez, a 25-year-old employee at Elon Musk’s Department of Government Efficiency (DOGE), inadvertently exposed a private API key for xAI, Musk’s artificial intelligence company, in a public GitHub repository over the weekend. The leak granted potential access to over 50 large language models (LLMs) developed by xAI, raising serious concerns about operational security within DOGE and the U.S. government.

DOGE API key leak: DOGE employee Marko Elez exposes sensitive xAI API key on GitHub

The API key was embedded in a Python script titled agent.py uploaded by Elez to GitHub on July 13. The leak was first identified by GitGuardian, a cybersecurity firm specializing in secret detection across public and private codebases. GitGuardian’s automated systems flagged the inclusion of the private key and issued alerts to relevant parties.

According to Philippe Caturegli, Chief Hacking Officer at the security consultancy Seralys, the exposed key provided access to at least 52 LLMs in the xAI ecosystem, including grok-4-0709, the latest model created on July 9, 2025. Grok, xAI’s flagship generative AI chatbot integrated into Twitter/X, relies on these LLMs. Notably, xAI had just announced a contract with the U.S. Department of Defense valued at up to $200 million, days after Grok drew controversy for generating antisemitic content.

Despite immediate takedown of the compromised repository following notification, Caturegli confirmed that the API key remains active. “If a developer can’t keep an API key private, it raises questions about how they’re handling far more sensitive government information behind closed doors,” Caturegli stated.

A pattern of security lapses

Elez’s history within Musk’s organizations and the federal government has been marked by controversy. Before joining DOGE, Elez worked at several Musk ventures. His government career began at the Department of the Treasury, where internal disputes arose over his handling of unencrypted personal data. Following his resignation amid revelations linking him to racist and eugenicist social media posts, Elez was reinstated after lobbying efforts by Vice President J.D. Vance and approval from President Donald Trump.

Since his return, Elez has been granted access across numerous federal agencies, including the Social Security Administration, Department of Labor, Customs and Border Protection, Immigration and Customs Enforcement (ICE), Department of Homeland Security, and Department of Justice. Reporting by The New York Times, Business Insider, and The Washington Post has detailed his expanding reach into sensitive government databases, including the Executive Office for Immigration Review’s Courts and Appeals System (EACS).

Notably, this is not the first instance of a DOGE employee leaking xAI’s internal keys. In May 2025, cybersecurity outlet KrebsOnSecurity reported on another DOGE staffer who exposed a private xAI key on GitHub for two months, compromising models tailored to proprietary data from SpaceX, Tesla, and Twitter/X.

Caturegli warned, “One leak is a mistake. But when the same type of sensitive key gets exposed again and again, it’s not just bad luck, it’s a sign of deeper negligence and a broken security culture.”

Marko Elez


More App Developer News

APAC 5G expansion to fuel 347B mobile market by 2030



How AI is causing app litter everywhere



The App Economy Is Thriving



NIKKE 3.5 anniversary update livestream coming soon



New AI tool targets early dementia detection



Jentic launch gives AI agents api access



Experts warn ai-generated health content risks misinterpretation without human oversight



Ludo.ai Unveils API and MCP Beta to Power AI Game Asset Pipelines



AccuWeather Launches ChatGPT Integration for Live Weather Updates



Stop Using Business Jargon: 5 Ways Buzzwords Damage Job Performance



IT spending rises as banks balance legacy and innovation



Tech hiring slumps as Software Developer job postings fall



AI is becoming more widespread in collaboration tools



FCC prohibits new foreign router models citing critical infrastructure risks



ChatGPT Carbon Footprint Matches 1.3 Million Cars Report Finds



Lens Launches MCP Server to Connect AI Coding Assistants with Kubernetes



Accelerating corporate ai investment returns



Enviromates tech startup launches global participation platform



Private Repository Secures the AI-driven Development Boom



UK Fintech Platform Enviromates Connects Projects Brands and Consumers



Env Zero and CloudQuery Announce Merger



How Industrial AI Is Transforming Operations in 2026



AI generated work from managers is damaging trust among employees



Foresight Secures $25M to Bridge Infrastructure Execution Gap



UNESCO AI initiatives driving sustainable development in Africa



Copyright © 2026 by Moonbeam

Address:
1855 S Ingram Mill Rd
STE# 201
Springfield, Mo 65804

Phone: 1-844-277-3386

Fax:417-429-2935

E-Mail: contact@appdevelopermagazine.com