Abbi Labs

Breach breakdowns

Breakdown: an AI hacking agent spent two weeks hunting Perplexity for AI keys, and at another company it found a live credential in deleted git history

By Abbi Labs · Published 3 December 2026

The agent started by reading JavaScript bundles. Check yours first.

The Abbi Labs quick check opens your live, public site as a signed-out visitor and looks for secret-looking keys in its JavaScript (OpenAI, Anthropic, Stripe, AWS, Supabase service_role and others), exposed .env and .git files, and Supabase tables readable with your public key. It doesn't read your git history or test your link-fetching features, so do those checks below yourself. No sign-up.

No app handy?

Example result · our deliberately broken demo app

6 issues found: 3 critical, 1 high, 1 medium, 1 low

  • Critical: Stripe live secret key in public JavaScript
  • Critical: /.env file readable by anyone
  • High: Git repository exposed (/.git/HEAD)

The demo's problems are planted on purpose. Paste your own URL above to see yours.

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.

Somebody gave a set of AI coding agents one goal: get a key that can call two of the newest frontier models on Amazon Bedrock. Then they let the agents run.

For about two weeks from late October, those agents went at Perplexity. Throwaway sign-ups, around 290 proxy addresses, 48,000 requests in 13 minutes at the peak, and a long list of tricks to make Perplexity's servers fetch AWS's internal metadata address. Perplexity says none of it worked.

Then Perplexity found the attacker's own server sitting open on the internet, and inside it, live workspaces for two other companies. At one, the agent had found a live customer credential in deleted git history and used it to take over that customer's workspace.

Everything below comes from Perplexity's report unless I say otherwise. Where something isn't confirmed, I say so.

What happened

How the agent looked for keys

This is the part worth reading slowly, because none of it is exotic. Per the recovered task logs, the agent:

The worker agent created 276 follow-up tasks on its own in 19.5 hours, up to 14 at once. When a path was a dead end, it opened new tasks to get around it. One prompt, then no human needed.

What's confirmed and what we don't know

Why this matters if you build with AI

For years the answer to "would anyone bother attacking my little app?" was "probably not by hand". That answer is going. This campaign shows an agent doing patient, boring work for 19 hours without anyone watching: read every commit in every fork, try every staging name, sign up again when blocked. It doesn't care how small you are. It cares whether you have a key.

And look at what actually landed. Not a clever exploit. A credential in git history that someone thought they'd deleted, and a demo environment with an open management API. If you've ever committed a .env and then removed it, or spun up a staging copy and forgot it, that's the same shape.

It also lines up with earlier breakdowns. Google's threat intel team reported stolen AI keys running up $100,000 in a day. AI provider keys are worth stealing now, and the hunt is automated.

Run the agent's checklist on your own app (15 minutes)

  1. Your git history, all of it. Deleting a file or a commit doesn't remove it from history, from forks, or from other people's clones. Scan everything, including old branches:
    gitleaks git .          # whole history, all commits
    git log -p --all | grep -nE 'sk-[A-Za-z0-9_-]{20,}|sk_live_|AKIA[0-9A-Z]{16}|ghp_|github_pat_|service_role' | head
    Anything real you find: rotate it in the provider's dashboard first. A history rewrite comes after, and it can't reach forks. More in Pushed your .env to GitHub?
  2. Your live JavaScript. The agent pulled bundles with a real browser. Do the same: open your site, then DevTools, Sources, and search the loaded files for sk-, sk_live_, AKIA, service_role. Or run the free check above. Anything with a NEXT_PUBLIC_ or VITE_ prefix ships to every visitor. See this guide.
  3. Every hostname you've ever had a certificate for. Certificate-transparency logs are public. This lists what the agent would see:
    curl -s "https://crt.sh/?q=%25.yourdomain.com&output=json" | jq -r '.[].name_value' | sort -u
    Old staging, demo and preview apps on that list should be deleted or put behind a login. Company B's way in was a demo environment.
  4. Files you'd never serve on purpose. The agent guessed .env.production and similar paths in storage. Check your site and any public bucket:
    for p in .env .env.production .env.local .git/HEAD; do
      echo "$p $(curl -s -o /dev/null -w '%{http_code}' https://yourdomain.com/$p)"
    done
    You want 404 on every line. For Supabase buckets, see public storage buckets.
  5. Any feature that fetches a URL a user gives you. Link previews, "import from URL", "summarise this page", webhooks, an AI tool that can browse. That's where the SSRF attempts went. If it runs on a server with a cloud metadata endpoint, check the destination before fetching. A rough first gate in Node:
    import { lookup } from "node:dns/promises";
    import net from "node:net";
    
    const blocked = new net.BlockList();
    for (const [ip, bits] of [["0.0.0.0", 8], ["10.0.0.0", 8], ["100.64.0.0", 10],
      ["127.0.0.0", 8], ["169.254.0.0", 16], ["172.16.0.0", 12], ["192.168.0.0", 16]])
      blocked.addSubnet(ip, bits, "ipv4");
    for (const [ip, bits] of [["::1", 128], ["fc00::", 7], ["fe80::", 10]])
      blocked.addSubnet(ip, bits, "ipv6");
    
    // Call before every fetch of a user-supplied URL, and again on every redirect hop
    export async function isSafeUrl(raw) {
      const url = new URL(raw);
      if (url.protocol !== "https:" && url.protocol !== "http:") return false;
      const addrs = await lookup(url.hostname, { all: true });
      return addrs.every((a) => !blocked.check(a.address, a.family === 6 ? "ipv6" : "ipv4"));
    }
    
    // fetch(url, { redirect: "manual" }) and re-check each Location header yourself
    This is a first gate, not the whole fix. Perplexity's defence checked the resolved address at connection time, which also stops DNS rebinding (a name that resolves to a safe address when you check and an internal one when you fetch). On AWS, require IMDSv2 on your instances so a plain GET to the metadata address gets nothing.
  6. Other people's IDs. The agent asked for other users' threads and files by ID. Sign in as one test user and request another's record. See change the ID, see someone else's data.
  7. Rate limits that one person can't reset by signing up again. Per-account limits didn't stop this attacker. It made a new account. Limit per IP as well, slow or block disposable email domains on sign-up if you can, and look in your logs for bursts of 404s on paths you don't have.
  8. A spend cap and an alert on every AI key. If one does leak, a cap turns a disaster into an annoying email. See AI API key in the frontend.

Check what a stranger's agent sees first.

Paste your URL and Abbi Labs opens your live site signed out: secret-looking keys in your JavaScript, exposed .env and .git, open Supabase tables. Read-only, no sign-up. It won't read your repo's history, so pair it with the gitleaks step above.

Run a free scan

My take

The funny part is the attacker's own server was wide open, 29 folders of it, and that's how anyone knows any of this. The unfunny part is how ordinary the wins were. A credential somebody thought was deleted. A demo box nobody was watching. An agent will happily read 4,328 forks to find that one commit, so assume it will, rotate anything that was ever committed, and take down the staging copies you forgot about.

Scan your live app free

Sources

Know someone shipping with AI tools? Send them this.

Related

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.