AI agents find leaked GitHub secrets in seconds: rotate credentials faster

Microsoft described an AI agent that found a leaked client secret on GitHub and reached Azure Key Vault within five minutes. The lesson: find exposed credentials first and automate rotation.

A developer seen from behind works at dual monitors of code in a Riyadh office in late afternoon light.

Key points

  • Microsoft disclosed an ARTEX-based AI agent that went from a public GitHub search to pulling Azure Key Vault data in five minutes.
  • In a GitGuardian test, an agent found eight of nine planted secrets, starting within 6 to 13 seconds, even when prompts never mentioned credentials.
  • GitGuardian counted 28.65 million new hardcoded secrets in public GitHub commits in 2025, up 34%; over 64% of secrets valid in 2022 still worked in January 2026.
  • Valid credentials produce normal-looking sign-ins, so controls tuned to failed logins may stay silent.
  • The FBI issued a FLASH alert on ARTEX, citing intrusions reaching privileged access in under three hours.

Microsoft Threat Intelligence reported in early November 2026 that an AI agent built on ARTEX, an open-source AI penetration testing framework, searched public GitHub, found a leaked application client secret and signed in to Microsoft Entra ID as a service principal. Five minutes after the search began, it was pulling data from Azure Key Vault. When some requests failed because of a wrong API version, the agent corrected itself within about 28 seconds without human help.

What the research shows

The source article, an opinion piece from GitGuardian, argues that the problem is not new but the speed is. In a controlled test, an ARTEX build without a secrets scanner was pointed at a simulated repository holding nine planted credentials. It found eight in every run where it investigated, including one key deleted in the next commit, because Git history keeps old revisions.

The volume of exposed secrets is large. GitGuardian counted 28.65 million new hardcoded secrets in public GitHub commits in 2025, and more than 64% of those confirmed valid in 2022 still worked in January 2026. Personal repositories of developers are part of the exposure.

Why detection is hard

A valid credential yields a valid sign-in that looks like an application doing its job, so controls built around failed logins and brute force may not react. Broad standing permissions then widen the impact.

What the article recommends

  • Find exposed credentials first across public GitHub, internal repositories and their history, pipelines, collaboration tools and developer machines.
  • Treat any leaked secret as compromised until it is revoked or rotated, and automate rotation.
  • Prevent new leaks with push protection, pre-commit scanning and guardrails on AI coding assistants.
  • Favor short-lived, narrowly scoped credentials.

What to do now

  1. Inventory secrets exposed in public GitHub, including developers' personal repositories linked to your organization, and check which are still valid.
  2. Scan internal repositories across full commit history, plus CI/CD pipelines, ticketing and messaging tools.
  3. Revoke or rotate any exposed credential, prioritizing production, sensitive data and privileged identities; map dependent applications first.
  4. Review sign-in and access logs after rotation for new keys, accounts and role assignments created by the exposed identity.
  5. Enable push protection and pre-commit scanning, and add guardrails to AI coding assistants.
  6. Move toward short-lived, narrowly scoped credentials and automate rotation outside weekly change windows.

How useful was this story?

Related frameworks

Need help acting on this?

Our consultants can assess your exposure and map the change to your controls and evidence.

Talk to an expert

Regulatory updates in your inbox

SAMA, NCA and SDAIA changes and what they mean for your institution — once a month.

E-mails in

We confirm by e-mail; unsubscribe any time. Manage your subscription · Past issues

Schedule a Free Assessment