Research · AI-built apps

We scanned 107 AI-vibe-coded repos. 82% ship a critical finding.

We scanned 107 public GitHub repositories whose code was produced with AI / vibe-coding tools (Cursor, Lovable, bolt.new, v0, Windsurf, Replit Agent) using a deterministic pipeline of 8 scanner tools (4 built-in: secret, auth, config, quality pattern scanners + 4 external via --enhance: gitleaks 150+ rules, semgrep auto + p/secrets 800+ rules, Trivy, OSV-Scanner) and found 19,310 security findings across 98 of 107 repositories. 82% of repositories had at least one critical finding.

The headline: most of the volume is transitive dependency CVEs inherited from the npm ecosystem, not bugs the model wrote. But the authored-code findings that remain are a consistent, repeating pattern — committed .env files, localhost URLs leaking into source, missing RLS policies on Supabase queries, unprotected API routes, and eval/exec calls — and they appear in repo after repo at strikingly similar rates.

01. What we scanned

The scan is purely static + pattern-based — no dynamic analysis, no taint tracking, no execution. It finds evidence of patterns that look like misconfigurations or vulnerabilities; it does not prove exploitability.

02. The headline

That headline number — "82% of AI-generated repos have critical findings" — is real, but it requires context. Among the 19,310 findings:

The 82% figure counts both. If you subtract the dependency CVEs and only look at what the model itself produced, the picture is different — and that is the more interesting picture.

03. What the model actually wrote wrong

Of the 6,901 authored-code findings, the top repeating patterns are:

#FindingCountWhat it means in plain language
1.env file committed to repository3,513The repo contains an actual .env file (not .env.example) with what looks like credentials in it. Anyone can clone the repo and read the keys.
2localhost URL in source931A hardcoded http://localhost:... URL is in committed code. This often signals dev-only config that was never changed before deployment — Supabase URLs, Stripe webhooks, OAuth callbacks, etc.
3Supabase query without verified RLS policy825A Supabase query was detected in code without a corresponding RLS-policy check. The model likely assumed RLS was on; whether it actually is requires the deployed schema to confirm.
4PHP dangerous function call452Calls to system(), exec(), shell_exec(), passthru(), popen(), proc_open(), or backtick operators.
5Express/Flask API route without verified auth middleware353An HTTP route handler was detected in a server file with no auth middleware attached in the immediate vicinity.
6eval() / exec() detected266Direct use of dynamic code execution in JavaScript/Python.

The pattern across these six is more telling than any single number. These are not exotic zero-days. They are the same six mistakes, repeated, in repo after repo.

The top CWEs (Common Weakness Enumeration) reinforce the same shape:

The credential problem (CWE-798) is dominated by committed .env files and a portion of the 231 secret-category findings (73 of which are flagged as generic-api-key).

04. The dependency tax

The single largest category of findings — 12,409 of 19,310 (64%) — is dependency CVEs pulled in by transitive npm packages. The most-repeated CVE advisories across all 107 repos are:

These are not bugs the model wrote. They are inherited from the npm ecosystem that any modern JS/TS project — AI-generated or not — draws from. The honest framing: AI-generated JS/TS apps inherit a large transitive CVE surface as a consequence of the ecosystem the model draws from, not necessarily as a consequence of the model itself. Human-written JS/TS apps on the same stack typically inherit the same surface.

The implication is practical, not moral: shipping AI-generated code with npm install and no audit means shipping these CVEs to production by default.

05. What this does NOT show

A scan like this has limits. We're being explicit about them so the numbers above are read accurately:

06. What to do about it

Three concrete recommendations for anyone shipping AI-generated code (or any code, really):

  1. Never commit .env files. Add .env to .gitignore on day one, install a pre-commit hook (e.g. gitleaks or pre-commit's detect-private-key) that blocks secrets, and use a .env.example with placeholder values for documentation. The 3,513 committed .env files in this scan are the single most preventable category of finding.
  2. Run a dependency audit before deploy. npm audit, pip-audit, trivy fs, or osv-scanner should be a default gate in CI. The 12,409 dependency CVEs in this scan are a direct product of skipping that step. Many are unmaintained transitive deps that get force-installed by default scaffolding — a one-line npm audit fix (or, better, a curated dependency tree) clears most of them.
  3. Verify auth middleware and RLS policies exist on every route / table. This is the structural fix for the 353 unprotected Express/Flask routes and 825 Supabase queries in this scan. For every API route, attach an explicit auth middleware in the route definition — not in a global filter that future routes may bypass. For every Supabase table, enable RLS and add a policy for every operation the app performs. Verify both on the deployed schema, not just in the local code.

These three changes do not require new tools. They are the same checks that should be part of any production-ready codebase — human-written or AI-generated.

07. Methodology footnote

This report is a narrative summary of a structured batch scan. The full structured data is available in:

Scan date: 2026-07-26. Scanner: deterministic Clira pipeline (gitleaks, Trivy, OSV-Scanner, Clira config scanner, Clira auth scanner) + Clira quality scanner. Sample: 107 public GitHub repositories with code produced using AI / vibe-coding tools.

Evidence fields (per-repo secrets, credentials, payloads) are excluded from the aggregated summary by policy and are not reproduced in this report.

This is what a deterministic, pattern-based scan finds across AI-scaffolded code — committed .env files, missing RLS, unprotected routes, inherited dependency CVEs. Want the same lens on your repo? Run the free self-check, or send the repo for a fix-ready report.

Full data and methodology:

docs/AI_GENERATED_CODE_FINDINGS.md · docs/ai_generated_code_summary.json