Government worker accidentally exposed xAI API credentials on GitHub repository giving public access to 50+ AI models

Security incident at government agency

A worker at a federal efficiency department made a serious mistake by uploading sensitive API credentials to a public code repository. The exposed key gave anyone access to dozens of artificial intelligence models from a major tech company.

The incident happened when the employee pushed a Python script to GitHub that contained private authentication tokens. Security monitoring services that scan code repositories for leaked credentials quickly detected the exposure.

This is concerning because the same person has been given access to important government databases including social security records and other sensitive federal systems. The leaked credentials allowed unauthorized access to over 50 different AI language models.

Has anyone else seen similar cases where government contractors or employees accidentally exposed API keys? What are the best practices to prevent this kind of security breach when working with sensitive systems?

yikes, this is exactly why government workers need better security training. i’ve seen this at my company too - developers just copy/paste code without thinkin. we use pre-commit hooks now that scan for api keys before anything gets pushed to repos. also, ppl - use env variables!