Microsoft documented attacks in which AI agents comb GitHub for passwords and keys left in code; in one case they went from finding them to stealing data from Azure in five minutes. What to do.
On November 5, 2026, Microsoft Threat Intelligence, Microsoft's threat intelligence team, reported that attackers are using AI agents (programs that decide on and carry out steps on their own) to search public GitHub repositories for passwords, cloud access keys and AI service keys exposed in code. In at least one case, an agent went from finding the credentials on GitHub to pulling data out of Azure Key Vault, the service where companies store their secrets, in five minutes.
What Microsoft observed
Since August, Microsoft has seen attackers use an agentic AI attack framework to send GitHub large volumes of searches that combine the target company's name with keywords for secrets, cloud services or AI providers. Searching public code for secrets is not new; what is new is the speed, because the agent finds the credential, analyzes it and moves on with the attack without a person stepping in at each stage.
Since October 28, using leaked or stolen application credentials, the agents got into several organizations' Microsoft Entra ID tenants and their Azure and Microsoft 365 resources. They went after storage keys, connection strings and AI service credentials, downloaded files from SharePoint and OneDrive, accessed mailbox items and ran scripts on virtual machines. In some cases, the stolen credential belonged to a vendor's application used by several customers, so a single secret opened the door to several organizations.
Why it matters to your business
One slip is enough, such as a configuration file or script with a password pushed to a public repository. Microsoft warns that deleting the file does not fix the problem: the credential keeps working until it is revoked or rotated, and it may remain in the repository history and in third-party copies. That is why it asks companies to assume that any exposed secret, and the application behind it, is already compromised.
What to do
- Check your company's repositories, and those of your software vendors, for passwords, keys and tokens. Tools such as GitHub Advanced Security detect secrets in code.
- If you find an exposed secret, revoke or rotate it right away, even if you already deleted it, and check the logs for who used it.
- Do not store credentials in code. On Azure, Microsoft recommends moving applications to managed identities, which do away with secrets.
- Give each application only the permissions it needs and limit who can register new applications in Microsoft Entra ID.
- Review application sign-ins in Entra ID: according to Microsoft, errors
AADSTS7000215orAADSTS7000222mean someone holds a credential for your app, and a failure followed by a successful sign-in is urgent.
How we help you
Our secure software development team reviews your repositories, takes credentials out of the code and moves them into a secrets vault. Through Microsoft 365 and Azure consulting we tighten your applications' permissions. Book a review of your code.
Sources
Source: Microsoft Threat Intelligence