Vai al contenuto

Research

What we found in 1,252 public Lovable and Bolt repos

About 1 in 9 exposed a server-side key, most often an AI or database credential. Hallucinated packages were rare. Full method and numbers.

· 9 min di lettura · A cura del team vetkit

Questo articolo non è ancora disponibile in italiano; viene mostrata la versione inglese.

Data card on a dark green background: 1 in 9 of 1,252 Lovable and Bolt repos exposed a server-side key, next to four bars comparing the main findings.Data card on a dark green background: 1 in 9 of 1,252 Lovable and Bolt repos exposed a server-side key, next to four bars comparing the main findings.

In November we took a random sample of 1,400 public GitHub repositories made with Lovable or Bolt and ran them through the scanner behind vetkit. 1,252 scans finished. In 145 of those repos (11.6%) we found a server-side credential in the open: either committed to the code, or read through a public environment variable that puts it in the browser bundle of any build.

Some reports put the share of vibe-coded apps with security flaws as high as 98%. Ours is lower mostly because we dropped keys that are public by design. Every flagged secret went through fixed classification rules, and we checked a sample of them by hand.

Share of 1,252 scanned repos
Server-side key committed or shipped to the browser
11.6% · 145 repos
Secret behind a public VITE_ / NEXT_PUBLIC_ variable
7.0% · 88 repos
Real credential committed to the repo
6.6% · 83 repos
AI provider key exposed (either way)
6.0% · 75 repos
Dependency on a package that does not exist
0.5% · 6 repos

Static scan of the default branch on 19 November 2026. Current files only, so secrets are a floor.

How we picked the repos

Lovable projects ship with a dev dependency called lovable-tagger. Bolt exports carry a .bolt folder. GitHub code search for those two markers gave us 8,596 repositories. We dropped forks, archived repos, templates, anything with template, starter or tutorial in the name, anything created before 2025 and anything over 150 MB. That left 7,014 Lovable and 801 Bolt repos, and we drew 1,000 and 400 of them at random with a fixed seed.

Each repo was shallow cloned and scanned with seven checks: secrets (gitleaks with our rules), committed credential files and missing lockfiles, dependency advisories from OSV, hallucinated packages, unfinished code, Supabase and Vite configuration mistakes, and LLM prompt and key handling. 94 scans hit our ten minute limit and 54 repos had been deleted or made private by the time we got to them. The numbers below cover the remaining 878 Lovable and 374 Bolt repos.

Secrets committed to the repo

The scanner flagged a known credential format (an OpenAI key, a Stripe key, a database URL with a password and so on) in 165 repos. We ran gitleaks again on each of them and sorted every hit by what it is for and whether it grants anything.

82 of the 165 were false alarms. Supabase anon keys belong in the browser. So do Firebase web config keys and most Google Maps keys. A password for a Postgres container on localhost protects nothing. We also dropped Google API keys whose purpose we couldn't tell from the surrounding code. That left 83 repos (6.6%) with a real server-side credential in a file anyone can read.

CredentialRepos
Database password for a cloud host (Neon, Supabase pooler, MongoDB Atlas)27
Google Gemini API key22
Supabase service_role key13
OpenAI API key6
OpenRouter API key6
Resend API key4
Groq or Stripe API key3 each
14 other types (GitHub tokens, webhook URLs, OAuth client secrets…)1 or 2 each

A repo can hold more than one type, so the column adds up to more than 83.

The service_role key is the worst one on the list. It bypasses row level security, so whoever holds it can read and change every table in the project.

Most of these keys were not in .env files. 55 of the 83 repos had one in a source file: an API client, a one-off database script, a file called test-gemini.js. Eight had it in a markdown setup guide. Only 26 kept their secrets in env files and nowhere else, and a committed env file is as public as any other file.

Keys shipped to the browser

The second pattern doesn't need a commit. Vite exposes every environment variable that starts with VITE_ to client code and pastes its value into the JavaScript bundle at build time. Next.js does the same with NEXT_PUBLIC_. So VITE_OPENAI_API_KEY is never a secret, wherever the env file lives. In any deployed build, it can be read from the downloaded JavaScript.

88 repos (7.0%) used a server secret through a public prefix in client code. The most common names were VITE_GEMINI_API_KEY (25 repos) and VITE_OPENAI_API_KEY (14). We also saw VITE_ANTHROPIC_API_KEY, VITE_SUPABASE_SERVICE_ROLE_KEY, a Telegram bot token, two crypto exchange secrets and, in three repos, VITE_ADMIN_PASSWORD.

Counting both patterns, 75 repos (6.0%) exposed a key for an AI provider. Whoever finds one can run up the owner's bill.

Browser-exposed AI keys showed up in 5.5% of repos created in the first half of 2025, 5.4% in the second half and 2.4% in 2026 so far. The groups are 471, 369 and 412 repos, so this may be noise.

Supabase policies

455 repos had a supabase folder with migrations, which let us read their row level security policies. This is source analysis. Someone may have changed the live database by hand since, in either direction.

62 of them (13.6%) had a policy that appears to let a signed-in user update their own row in a table that also holds their role, plan or credits. It usually looks harmless:

supabase/migrations/…sql
create policy "Users can update own profile"  on public.profiles for update  using (auth.uid() = user_id);

It checks whose row it is. It doesn't check which columns change. If profiles has a role column, a user can send one request from the browser with the public anon key and set it to admin. We read eight of these by hand and all eight followed this pattern. We did not search every migration for a trigger or column grant that would block the change, so treat 62 as an upper bound.

44 repos (9.7%) had at least one table in the public schema, reachable through the Supabase API, with row level security off or never turned on. 132 (29.0%) had a policy that lets any signed-in user change every row of some table, usually using (true) for the authenticated role. That is fine for an internal tool where sign-up is closed. On an app where anyone can register, a stranger can edit your customers table. 66 (14.5%) had an edge function that writes with the service role and has no visible auth check.

Bolt repos had higher rates here: 20.9% against 9.9% for self-assignable roles, and 13.1% against 7.9% for tables without row level security, on 153 Bolt and 302 Lovable projects. We don't know why.

Stubbed-out features

31.2% of repos had what our scanner calls simulated logic in production code. We opened ten at random. Eight were real gaps. A contact form shows a success message and sends nothing. A forgot-password page has // Simulate API call where the request should be. An OCR endpoint returns made-up text. A KYC backend authenticates with a placeholder API key check. The other two were a mock data file in an admin folder and a fake loading delay for an animation.

Most of these aren't security bugs. The UI looks done, so nobody notices that the backend isn't there.

What we expected and did not find

Hallucinated packages get a lot of attention. The worry is that a model invents a package name, someone registers it on npm, and the next install pulls in malware. In our sample 6 repos (0.5%) depended on a package that doesn't exist on npm or PyPI. Counting versions that were never published and imports of missing packages, it was 12 (1.0%). So it does happen, just far less often than leaked keys.

Old dependencies were almost universal. 95% of repos had at least one high-severity advisory in their lockfile, mostly in build tooling like vite, postcss, glob and minimatch, pinned on the day the project was generated and never updated. Worth an update, but it is a different kind of problem from a leaked service_role key, so it is not in our headline.

The committed .env file also looks worse than it is. 259 repos had one, and in 228 of them we found no server secret inside. Usually it holds the Supabase URL and anon key, which are public by design.

Checking your own app

If you built something with Lovable, Bolt or a similar tool, these checks would have caught most of what we found:

  1. Search for VITE_ and NEXT_PUBLIC_ variables. If a name contains SECRET, SERVICE_ROLE, PASSWORD or an AI provider, move that call into an edge function or server route and rotate the key.
  2. Search the whole repo, markdown and scripts included, for sk-, AIza, service_role and connection strings with a password in them. Rotate anything real. Deleting the line is not enough, because it stays in git history.
  3. For every table with a role, plan, credits or is_admin column, make sure users can't update those columns themselves. Move them to a table users can't write, or restrict the update with a trigger or column privileges.
  4. Look for using (true) on policies for the authenticated role and decide whether every person who signs up should really have that access.
  5. Search src for “Simulate”, “in a real app” and TODO. Each hit is worth a look.

vetkit's free Quick Scan, linked below, covers the secret and dependency checks. The rest are in a full scan.

Method and limits

  • Population: public repos found by GitHub code search for lovable-tagger in package.json or files under .bolt/, created between 1 January 2025 and 19 November 2026. Code search ranks results, so the candidate pool is not a perfect random draw of all such repos. The sample from that pool is.
  • Bolt was oversampled (400 of 801, against 1,000 of 7,014 for Lovable). The percentages above describe the scanned sample. Weighted back to the pool sizes, the 11.6% headline becomes 11.0%.
  • Scan: vetkit engine on a shallow clone of the default branch, run on 19 November 2026. Current files only. Secrets that were committed and later removed are not counted.
  • We did not test any credential, call any API with one or visit any deployed app. Every number here is about source code, not running services.
  • Secrets were classified with fixed rules (local hosts, placeholders, public-by-design keys) and spot checked by hand. Supabase and unfinished-code findings were spot checked on 8 and 10 random repos.
  • 148 of the 1,400 sampled repos could not be scanned. Timeouts lean toward larger projects.
  • For the 11.6% figure, the 95% margin of error is about ±1.8 points. The Lovable and Bolt subgroups are smaller and their margins wider. We did not run significance tests on the differences between them.

We are not publishing repository names.

Richiedi l’accesso anticipato

Raccontaci qualcosa del tuo team e dei repository che vuoi sottoporre ad audit. Accogliamo i team a piccoli gruppi e ti risponderemo via email.

Usiamo questi dati solo per rispondere alla tua richiesta. Informativa sulla privacy