TL;DR: A July 13 GitHub commit exposed an API key with access to at least 52 xAI models, and security researchers said it continued to function after removal, underscoring how quickly leaked secrets can outlive detection according to Swarmnetics and GitGuardian. Access review without rapid revocation is no longer a meaningful control when credentials remain valid after exposure.
Editorial analysis by NHI Mgmt Group, based on content published by Swarmnetics: “Second API Key Slip for Musk’s AI Models by DOGE Staffer Raises Questions About Security”.
Key questions
Q: What breaks when an exposed API key is still active after being removed from GitHub?
A: The incident response window collapses if the credential remains valid after repository takedown.
Q: Why does one leaked AI model key create outsized risk?
A: Because a single machine credential can authorize many model endpoints or services, turning one secret into a broad access path.
Q: How do organisations know whether secret scanning is actually working?
A: Look for fewer valid secrets left in circulation after detection, not just higher detection counts.
Practitioner guidance
- Establish immediate revocation triggers for exposed API keys When a key appears in code, logs, or public repositories, revoke it first and investigate second.
- Map every AI model key to a named owner Assign explicit ownership for each secret so security teams know who can revoke it, rotate it, and confirm that dependent integrations were updated.
- Narrow model access scopes to the smallest service purpose Split broad credentials that can reach many models into separate keys for separate functions, so a single leak does not expose the whole model estate.
Bottom line: The article shows that exposed machine credentials can remain usable after discovery, which turns a disclosure into an active identity governance problem.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Leaked API keys are still a live identity problem, not a disclosure problem. The article shows that removal after discovery did not immediately end access, which means the identity remained usable beyond the moment of exposure. That breaks the assumption that disclosure itself is the control boundary. Practitioners should treat credential invalidation as the real security event, not the leak notification.
A few things that frame the scale:
- 13% of organisations suffered breaches of their AI models, according to IBM's Cost of a Data Breach 2025 report.
A question worth separating out:
Q: What should organisations do after a machine credential is exposed in GitHub?
A: Treat the exposed credential as compromised, revoke it, review dependent integrations, and confirm that no downstream service still accepts it. Then trace ownership, search for similar secrets, and inspect repositories, logs, and build artifacts for related leaks.
👉 Read our full editorial: Second xAI API key leak shows AI model access remains fragile