Five minutes from GitHub to Key Vault: a secrets checklist for AI-built apps
Attackers are using agents now too. Five things to check before you ship.
Yohan Choi
· 2 min read
AI tools let us build apps faster than ever, and accidentally exposed keys are growing just as fast. Now the people hunting for those keys are using agents too.
#What happened
According to multiple security outlets, Microsoft Threat Intelligence warned on November 5 that threat actors are using ARTEX, an agentic AI framework, to search public GitHub repositories for exposed secrets such as credentials, API keys and AI inference keys. The activity began in August, and in one case it took five minutes to go from a GitHub search to exfiltrating data from Azure Key Vault.
GeekNews surfaced the other side of the problem: apps built with Lovable, Bolt, Cursor or v0 often ship with OpenAI keys or Supabase service-role keys sitting in the browser bundle.
#Pre-launch checklist
- 1. Know which keys reach the browser. In Next.js, anything prefixed
NEXT_PUBLIC_is visible to everyone. Supabase's anon key is designed to be public, but the service-role key must never be on the client. - 2. Search your build output. Look for strings like
sk-,service_roleorsecretin the deployed JS files. A key can end up in the bundle even when it is not obvious in the source. - 3. Turn on repository secret scanning. GitHub secret scanning and push protection stop an accidental commit at the moment it happens.
- 4. Restrict even public keys. Pair any public key with Row Level Security, domain restrictions and usage limits.
- 5. If a key leaks, rotate it. Don't just delete it. Removing it from history is not enough, because it may already be copied. Reissue the key immediately and revoke the old one. When an attack takes five minutes, rotation speed is your defense.
#Give your agents rules too
When you hand work to a coding agent, state in its rules file that secrets live only in environment variables and never in client code. This site manages its Supabase keys under the same rule.
As building gets faster, the habits that keep it safe have to be automated too.
Sources
Cybersecurity Dive: coverage of the Microsoft ARTEX report
Cloud Security Alliance: Five Minutes from Search to Key Vault
GeekNews: pre-launch key check