Skip to content

Services, Wiki-Artikel und Blog-Beiträge durchsuchen

↑↓NavigierenEnterÖffnenESCSchließen
Secrets Management: An AI Agent Reads an Azure Key Vault in Five Minutes
Cloud Security

Secrets Management: An AI Agent Reads an Azure Key Vault in Five Minutes

An AI agent found a client secret on GitHub and pulled data from an Azure Key Vault five minutes later. What Microsoft saw and how to defend against it.

Vincent Heinen Head of Offensive Services
6 min read
OSCP+ OSCP OSWP OSWA

Featured image AI-generated, editorially reviewed (EU AI Act Art. 50).

TL;DR

On November 5, 2026, Microsoft described a case in which an AI agent pulled data from a company's Azure Key Vault five minutes after searching GitHub. The key was a client secret found on GitHub, which the agent used to sign in as an application. Such secrets remain valid until they are revoked, even after they have been deleted from the code. Push protection, short lifetimes, immediate revocation and managed identities reduce the risk.

Table of Contents (7 sections)

On November 5, 2026, Microsoft Threat Intelligence described an attack: an AI agent searched GitHub for credentials and discovered an application's client secret. It used the secret to sign in as that application. Five minutes after the search began, it exfiltrated data from the company's Azure Key Vault.

Azure Key Vault in five minutes: the Microsoft case

Since August 2026, Microsoft has observed large numbers of automated search queries on GitHub. In these queries, an agentic attack framework often combines the name of a target organization with keywords for secrets, cloud services or AI providers. As soon as the agent finds something, it evaluates the hit and carries out the next steps. As a result, the attacker has to step in less often.

Microsoft first recorded successful sign-ins as a service principal, the identity of an application, on October 28, 2026. Dozens of applications in multiple tenants were affected. The attackers then accessed storage keys, App Service settings and connection strings. They downloaded files from SharePoint and OneDrive and searched Azure DevOps for more secrets. In at least one case, five minutes passed between the search on GitHub and the exfiltration from the Key Vault.

In the same attacks, Microsoft observed sequences consistent with the agent troubleshooting on its own. A query against several Key Vault resources failed with HTTP 400 because it used the wrong API version. About 28 seconds later, the same query ran successfully with the correct version. The report does not say whether this sequence is connected to the five-minute case.

Microsoft points to a similar campaign that the security vendor Todyl described and that uses the same IP addresses. Starting on November 1, 2026, an attacker signed in to managed service providers (MSPs) with stolen app secrets that were still valid. Todyl counted about 45 app registrations at roughly 18 organizations. By the time of Todyl's report, 27 organizations had been reached, including customers of the MSPs. According to Todyl, no Microsoft vulnerability was involved.

Microsoft names ARTEX as an example of such tools. The AI penetration testing platform was published as open source on GitHub in July 2026. It uses well-known penetration testing tools such as Nmap, curl and Playwright. According to Microsoft, it does not introduce any new attack techniques. The language model it runs on can be chosen freely. Germany's Federal Office for Information Security (BSI) points out that frameworks such as ARTEX, CAIRN or PentAGI largely automate attacks, even with freely available open-weight models. The article on AI-powered cyberattacks covers the wider threat landscape.

Why a client secret on GitHub stays valid

A client secret is the password an application uses with Microsoft Entra ID. Anyone who has it can sign in as that application and gets access to everything the application has permissions for.

Removing it from the code is not enough. According to Microsoft, credentials that have become public remain usable until they are revoked or rotated. Copies exist in the Git history, in caches and in archives.

More than 64 percent of the secrets that GitGuardian had confirmed as valid in 2022 still worked in January 2026. In 2025, the vendor found 28.65 million new hardcoded secrets in public GitHub commits, 34 percent more than in 2024.

The agents in the Microsoft case specifically looked for keys to AI services. In 2025, GitGuardian recorded about 1.28 million leaked secrets for AI services, an increase of 81 percent over the previous year. These figures come from a secret scanning vendor.

GitHub secret scanning and push protection

Push protection scans code for hardcoded secrets during a push and blocks the push if GitHub detects one. The feature is available by default for public repositories. For users, it is also enabled by default and applies even in repositories where secret scanning is turned off. If GitHub finds a secret in a public repository, it notifies the relevant provider.

GitGuardian points out, however, that keys from new AI providers are more likely to slip through push protection because the detection patterns still have to catch up. Microsoft recommends that organizations also scan their own repositories. In Azure DevOps, GitHub Advanced Security is available for this. The comparison of DevSecOps tools gives an overview of such tools.

Managed identity instead of a client secret

Microsoft recommends moving applications away from secret-based authentication. According to Microsoft Learn, managed identities are the best method for workloads in Azure: there are no accessible credentials, and Entra ID manages them entirely. According to Microsoft, this rules out a secret in the code from the outset.

Where a secret is still needed, three settings limit the damage. An app management policy sets a maximum lifetime for password secrets. Service principals get only the permissions their application needs. Conditional Access for workload identities can block sign-ins from specific addresses, but it requires the Workload ID Premium license and applies only to single-tenant apps. The wiki entry on cloud key management explains how keys are managed in the cloud.

Secret leaked: what to do now

For an incident, Microsoft lists the following steps:

  1. Revoke or rotate the secret at the issuer. Deleting it where it was found does not end the risk.
  2. Remove all client secrets, certificates and federated credentials from the affected app, including any that an attacker has added. Tokens that have already been issued remain valid until they expire.
  3. Rotate everything stored in a Key Vault that the app could read.
  4. Review the sign-in logs of the service principals. The errors AADSTS7000215 (invalid secret) and AADSTS7000222 (expired secret) show that someone holds a key for the app. If such a failure is followed by a successful sign-in, the case is urgent.
  5. Watch for behavior: an address that signs in to three or more service principals, or an app that requests tokens for Resource Manager, Key Vault, Storage and Graph within a short time.

What does agentic AI mean for penetration testing?

For organizations that are still working on the basics, the BSI recommends an immediate action program built on quick wins. The focus is on the ability to respond to incidents and on securing the simplest attack paths.

Microsoft writes that defenders must also use AI to keep pace with such attacks. AWARE7 uses ARTEX itself, exclusively on behalf of clients. In this setup, the DeepSeek V4 model runs on two Nvidia RTX PRO 6000 cards owned by AWARE7, so data from the test stays in-house. The agents in the Microsoft case also targeted access to AI services. An organization's own AI agents and their keys therefore belong in the scope of an AI penetration test.

Sources

s7.Club der Souveränen

Digital sovereignty.First-hand experience.

Our path beyond the US cloud: tools and lessons from our own infrastructure.

Portrait of Chris Wojzechowski
By Chris Wojzechowski

AWARE7

Over 500 IT decision-makers already read along

Every other Friday. Unsubscribe at any time. Privacy policy

Latest issues (German)

All issues

Initial consultation on this topic

Talk to our certified security experts for 30 minutes, free and without obligation.

Share this article

About the author

Vincent Heinen
Vincent Heinen

Head of Offensive Services

E-Mail

M.Sc. in IT Security with more than 5 years of experience in offensive security analysis. Leads the delivery of penetration tests, specializing in web applications, network infrastructure, reverse engineering and hardware security. Responsible for several responsible disclosures.

OSCP+ OSCP OSWP OSWA
Certified ISO 27001ISO 9001AZAV

Call us

Mon-Fri, 8 am to 5 pm CET, personal and without obligation.

0209 8830 6764
Call now