Agentic AI Attacks Turn Leaked GitHub Secrets Into Breaches

Agentic AI Attacks Turn Leaked GitHub Secrets Into Breaches

Estimated reading time: 8 minutes · Last updated:

Agentic AI attacks are making an old, slow technique fast. Microsoft Threat Intelligence says threat actors have used an AI offensive framework, with tooling such as ARTEX, to search public GitHub repositories for leaked credentials, cloud keys and AI service API keys, then let the agents act on whatever they find. In one case the team tracked, an agent moved from a GitHub search to pulling data out of Azure Key Vault in five minutes. The searches began in August 2026. A follow-on campaign using stolen application credentials, seen from 28 October 2026, reached Entra ID tenants, SharePoint, OneDrive and Azure AI resources. For defenders the lesson is blunt: a secret pushed to a public repository should be treated as already stolen.

Key takeaways

  • Five minutes: The threat intelligence team saw an AI agent go from searching GitHub for client secrets to exfiltrating Azure Key Vault data in five minutes.
  • Started in August 2026: From August 2026 an agentic framework sent large volumes of GitHub queries pairing target company names with secret, cloud and AI-provider keywords.
  • Entra ID sign-ins: From 28 October 2026, sign-ins from 199.19.77[.]84 used stolen app credentials to enter dozens of applications across multiple tenants.
  • Self-correcting agent: After HTTP 400 errors, the agent retried Azure Resource Manager calls with corrected API versions within about 28 to 80 seconds and got HTTP 200.
  • AI keys targeted: The agents favoured API keys for major AI providers and OAuth apps that can reach Foundry Tools, formerly Azure Cognitive Services.

Why Leaked Secrets Now Get Used in Minutes

Hunting public code for passwords and keys is not new. What held it back was human effort: somebody had to locate repositories, read through them and work out how to use any credential that turned up. The team says agentic frameworks strip out most of that labour. The agents scan many repositories quickly, interpret the results themselves and launch the next stage, so the operator rarely needs to touch a keyboard.

Agentic AI means software that plans and carries out multi-step tasks on its own instead of waiting for a person to issue each command. Starting in August 2026, the team saw such a framework fire large volumes of searches at GitHub. A typical query paired a target organisation's name with secret-related keywords, plus a term tied to a cloud service or another AI provider.

Speed matters because the exposure does not end when the file is fixed. The team notes that a published credential keeps working until it is revoked or rotated, and copies can survive in edit history, caches, archives and logs. Deleting the commit is not a fix.

How Stolen App Credentials Opened Entra ID Tenants

From 28 October 2026, the team recorded successful service principal sign-ins mainly from 199.19.77[.]84 and 199.19.77[.]18, the second being a Tor exit node that may also carry unrelated traffic. A service principal is the identity an application uses to authenticate, giving it programmatic access to whatever the app is permitted to reach. The agent signed in as dozens of applications across multiple tenants, and in some cases a multitenant credential stolen from a vendor-owned app opened several downstream customer tenants.

Inside, the actor chased operations that hand back more credentials: connection strings, storage account keys, publishing credentials, App Service settings, AI and machine learning datastores, and Azure Kubernetes Service user credentials. Compromised apps downloaded SharePoint and OneDrive files, touched mailbox items and ran Graph searches for useful content.

The team tied two more addresses to the campaign with less certainty. Traffic from 65.87.223[.]26 carried shell commands hidden in a user agent and tried to obtain App Service tokens, while 157.22.126[.]128 probed AI workloads on Azure AI services. Todyl separately reported a similar campaign involving the same IPs.

An Agent That Debugs Its Own Failed Requests

One detail separates this from a scripted attack. On a victim's Azure Resource Manager instance, the control plane through which Azure resources are created and managed, the team watched the agent fail, adjust and try again.

A batch of calls listing secret metadata across several Key Vaults returned HTTP 400 because they used a data-plane API version against the control plane. About 28 seconds later the same paths were retried with API version 1 July 2023 and returned HTTP 200. A request for an Azure SQL server's firewall rules failed on an outdated version and worked about 60 seconds later, with only the api-version parameter changed. An Application Insights query recovered the same way roughly 80 seconds after its error.

That is what a junior engineer reading error messages would do, squeezed into seconds. It is also why the threat intelligence team treats fixed indicators as weak protection: the actors can change IP addresses, user agents and other fingerprints whenever they like.

Why AI Service Keys Were a Priority Target

In several cases the same tools got hold of a token for a single-tenant OAuth app inside the target organisation and used it to enumerate other cloud resources. Some agents took secrets from Azure Key Vault and searched Azure DevOps for more. Others invoked Run Command, the Azure feature that executes scripts on virtual machines, which the team warns can expose stored credentials and give an attacker persistence or lateral movement.

Throughout, the agents showed a marked appetite for keys that unlock AI services: API keys for major AI providers and OAuth apps that can reach Foundry Tools, previously named Azure Cognitive Services. The team says the actor appeared to test stolen Azure AI resources and may have tried to use them to support the wider operation.

The team also points to multiple public reports of attackers seizing AI credentials, sometimes to run the same agentic workflow. That loop is the worrying part: one stolen key can pay for the compute behind the next round of scanning.

What Microsoft Tells Defenders to Do First

Containment starts with the confirmed address. The team advises adding 199.19.77[.]84/32 to Conditional Access as a blocked named location, in a policy for workload identities and a user-scoped one for replayed sessions, blocking that exact IP rather than the whole ASN, the address block run by one network operator. That control requires a Workload ID Premium licence and only applies to single-tenant applications registered in the organisation's own tenant. Affected apps should lose every client secret, certificate and federated credential, and anything in a Key Vault they could read should be rotated.

For hunting, sign-in error AADSTS7000215 signals an invalid secret and AADSTS7000222 an expired one; either means somebody holds a credential for the app, and a failure followed by success is urgent. The team also suggests watching for a single address signing in as three or more service principals, some attempts failing.

ARTEX defaults include headless Chromium driven by Playwright, Nmap, wget, curl, Norma SDK WebFetch and Python HTTP clients, whose default user agents can tip defenders off. The team says honeypots, tarpits and fake wins reduced traffic reaching real assets in its own testing.

IP addresses Microsoft linked to the activity
Address What Microsoft observed Confidence
199.19.77[.]84 Service principal sign-ins from 28 October 2026, Key Vault and Storage exfiltration, adaptive ARM calls Confirmed by Microsoft
199.19.77[.]18 Service principal sign-ins; a Tor exit node May include unrelated traffic
65.87.223[.]26 Shell commands in a user agent, attempts to get App Service tokens Potentially associated
157.22.126[.]128 Reconnaissance of AI workloads on Azure AI services Potentially associated

Where defenders gain and lose ground

The case for

  • GitHub already scans public repositories for secrets automatically, and organisations can enable public monitoring to catch leaks in repositories they do not own.
  • Push protection in GitHub Advanced Security for Azure DevOps can stop supported secrets before they are committed.
  • Moving OAuth apps to managed identities removes the secret from code entirely, closing the entry point Microsoft describes.
  • Decoys and fake wins exploit the agent's autonomy, and Microsoft says they produced high-confidence signal in its testing.

The case against

  • Agents rotate IPs, user agents and other fingerprints, so blocklists age quickly.
  • A multitenant credential stolen at the vendor can open many customer tenants at once.
  • Tokens already issued stay valid until expiry even after the credential is removed.
  • Self-correcting retries within seconds shrink the time a security team has to notice and react.

What to be careful about

  • Organisations that only delete an exposed secret from GitHub, without rotating it, remain open because copies persist and the credential still works.
  • Customers of a software vendor whose multitenant app credential leaks can be breached without any mistake of their own.
  • Stolen Azure AI and third-party AI API keys can be run up by attackers to power further agentic attacks.
  • Managed service providers face downstream exposure through Partner Center access and GDAP relationships with customer tenants.

The bottom line

The campaign the team describes needs no new vulnerability. It feeds on secrets developers leave in code, often to get an OAuth app working quickly, and on agents that exploit them faster than most security teams can notice. Its advice, to scan repositories, rotate anything exposed and replace client secrets with managed identities, is familiar. What has changed is the window. When a leaked key can become a Key Vault breach in five minutes, rotation after discovery is damage control rather than prevention. Two questions stay open: the team has not attributed the 28 October sign-ins to a named group, and it describes two of the related addresses as only potentially tied to the campaign.

What to watch

  • Watch for Microsoft or Todyl to attribute the 28 October sign-in activity to a named group; no date has been given.
  • Watch for updates to Microsoft's threat analytics reports in the Defender portal on whether 65.87.223[.]26 and 157.22.126[.]128 are confirmed as part of the campaign; no timetable has been set.
  • Watch for further reports of stolen AI service keys being used to run agentic attack tooling; no date has been set.

Frequently asked questions

Is deleting a leaked secret from GitHub enough?

No. Until somebody revokes or rotates a leaked credential, it goes on working, the team says, and copies can persist in edit history, caches and archives. It advises rotating immediately and checking how the credential has been used.

What do Entra error codes AADSTS7000215 and AADSTS7000222 mean in this attack?

AADSTS7000215 indicates an invalid secret and AADSTS7000222 an expired one. The team says either suggests somebody holds a credential for your app, and a failure followed by a successful sign-in needs urgent attention.

Can blocking the attacker's IP address stop agentic AI attacks?

Only partly. The team recommends blocking 199.19.77[.]84/32, but notes actors can change IPs and user agents at will, so it pairs blocking with behavioural hunting and decoys that waste the agent's time.

Why did attackers want AI API keys?

The team observed the agents focusing on keys for major AI providers and apps with access to Foundry Tools. Public reports it cites show attackers sometimes use stolen AI credentials to run the same agentic workflow.



Share:

Categories

Newest course every month

Advertise your offline course to a wider audience with our landing page.

You May Also Like

Microsoft says agentic AI attacks scan GitHub for leaked secrets and can reach Azure Key Vault in five minutes. What...
CrowdStrike AI Kill Switch lets defenders stop rogue agents, as the company agrees to acquire two AI security startups, Fiddler...
Barracuda's survey of 2,000 IT leaders finds 94% of firms report a cybersecurity skills gap, 68% lack AI-risk skills and...