Skip to main content
NEW · Blast Radius: a field playbook for leaked API keys on AWS, GCP and Azure
Back to Blog

Vibe Coding's New Threat: Real Secrets, Exposed and Unwatched

Vibe coding opened a new secret-exposure threat: real keys leak into the public bundles of AI-built sites, and when they do, no one is watching. We planted a zero-permission tracer in an AI-builder bundle and it sat five days untouched, while the same key in a GitHub gist was quarantined in minutes. The builders refuse at the prompt and leak less than ordinary sites, so the danger is not the vendor. It is the deployed front-end that detection never looks at.

Ben Kim
Written by
Ben Kim
Published
6 min read1,121 words
Share:
An isometric scene: one live key sits inside a dashed AI-builder deployment bundle that no one is watching

Vibe coding put app-building in everyone's hands. It also gave secrets a new way to leak. When a real secret lands in the public bundle of a site deployed through an AI builder, that key can sit in plain sight for days with no one touching it. We planted one and watched. Five days later, nothing had happened.

Put the same key in a GitHub repository and it is quarantined in minutes. Put it in an AI-builder bundle and it is still there five days on. The entire detection industry watches repositories. It does not watch deployed front-ends, and vibe coding is growing that unwatched surface fast.

So we reproduced that threat from the inside. We did not scan strangers' apps and count regex hits. We tried to make the builders leak, watched where real keys actually surface, and planted a harmless tracer to see who would come for it. We looked at the five builders people name most, plus Grok Build: Lovable, Bolt, v0, Replit, Base44, and Grok Build.

The keys are really there

We started with what is actually deployed. We took a point-in-time snapshot of just over three thousand live apps running on these platforms and scanned their public HTML, JavaScript bundles, source maps, and config files for credential-shaped material. After collapsing duplicates to unique values and setting aside the ambiguous cases, about ten distinct, unambiguous secrets were sitting in public bundles. Almost all were on Lovable: OpenAI and Perplexity keys, two Google OAuth client secrets, and two database connection strings with the username and password inline. The last two are an accident by any definition. Anyone who opens the page can connect straight to that database. Every one of them was in a JavaScript file under /assets/.

Inventory of the unique, unambiguous secrets found in public bundles: an OpenAI key, a Perplexity key, two Google OAuth client secrets, and two database connection strings with username and password inline

That number is smaller than the headlines claim. It works out to well under one percent of the apps we fetched. The large, round "percent of apps leaking" figures mostly count one value over and over, a single tutorial key copied into forty apps, plus a large bucket of AIza-prefixed Google keys that cannot be told apart, without asking Google, from the public Firebase keys that are supposed to ship to the browser. We did not count those as leaks, because we cannot prove they are. But the ten we can prove were real, and two of them handed over an entire database.

Keys in the front end are not unique to AI builders. Any deployed web app can ship a credential in its bundle, and we have watched this problem for a long time. A visible value is not automatically a leak: some values, like the public Firebase keys above, are meant to reach the browser. The real problem is the live secret mixed in among them, and telling the two apart is half of detection.

Cremit research brief

We email our credential-incident analyses when they are published. Not often.

We never sell your email. Unsubscribe anytime.

The real danger is that no one is watching

A leaking key is old news. What has changed is where the key lands, so we measured that. We built a tracer credential with a policy that denies every permission. It can confirm its own identity and nothing else, so it costs nothing and touches nothing. We planted it in two places.

On a public GitHub gist it lasted minutes. GitHub's secret scanner found it, notified AWS, AWS quarantined the key automatically, and the owner got a warning email, all before we had finished writing it down.

We planted the same kind of key in a public bundle on an AI-builder deployment domain. Five days on, nothing came. No scan, no quarantine, no email, not a single probe of the key from anywhere but our own test. The credential sat in plain sight on the open web, and the entire apparatus that dismantles a GitHub leak in minutes was not looking.

That is what is new here. The attackers' scanners have not turned to this surface yet either. For now it is a quiet window, and it will not stay open for long.

The villain is the surface, not the builder

Start with the builders themselves. Their front door is solid. Ask any of the five to hardcode an AWS secret into browser code and every one refuses. Lovable swaps the key for a decoy. Bolt refuses and calls it "effectively publishing your AWS account to the internet." v0 catches it at intake and moves it into an environment variable. Base44 converts it into a managed secret on its own. Grok Build declines and tells you to rotate it. The disguise does not help: relabel the key as a "build signature" and Lovable still recognizes the AKIA shape and substitutes a decoy. GitHub does the same thing one layer out, blocking the commit before it goes live.

A control group makes it clearer. We ran the same scan against ordinary sites with nothing to do with AI builders. The Netlify sample leaked unambiguous secrets on about 5.6% of hosts, several times the rate of any AI builder in our data. The threat is the surface, not a careless vendor: a deployed front-end that no one scans, and vibe coding is multiplying it every day. The guardrail guards the front door. A key still ships in the bundle when someone hand-edits the generated code, when it was pasted in before the guard existed, or when the app calls a service straight from the client.

Control-group bars: share of hosts with an unambiguous secret is 5.6% for ordinary Netlify sites and under 1% for AI app builders

What to take from it

Platform teams get the good news first: your prompt guardrail is working, and it is worth saying so. The gap is everything behind it, the editor, the older projects, and the served bundle itself. A key in your customers' /assets/ bundle is as exposed as one in a public repo, with none of the alarms.

Anyone shipping on these tools needs one thing in mind. The guardrail is not a vault. A key you paste into code, or hand to a client-side call, ships to every visitor. Keep it on a server, and rotate anything that has ever been in front-end code.

And if you defend credentials for a living, redraw your map. The repositories are well covered. The deployed front-ends of the vibe-coding era are not, and that is where a growing share of real secrets now lives, with no one watching. Detection has to follow the code to where it is actually served.

Method notes: figures are from a single point-in-time scan of live apps, with host discovery drawn from public web-crawl archives; "detected" means a credential-shaped value was found, not that it was verified against its issuer. Unique counts collapse repeated values by a salted hash. The planted tracer was a zero-permission AWS key used only to observe pickup. Affected platforms were notified before publication, and no individual app or company is named.

Share it with your networkLinkedInX

Read next

Get the next one in your inbox

Monthly NHI security brief from Cremit. One email, high signal.

We never sell your email. Unsubscribe anytime.