{"slug": "when-ai-built-apps-get-risky-data-from-3911-repos", "title": "When AI-built apps get risky: data from 3,911 repos", "summary": "A scan of 3,911 public repositories across nine AI app builders found that the share of apps with at least one critical security finding rises monotonically with code size, from 2.9% of apps under 1,000 lines to 59.2% of apps over 40,000 lines, according to the scanner vendor's corpus analysis. The vendor reported that 66.3% of the repositories have no stars, forks or open issues and 68.1% have not been pushed in 90 days, with a median of 216 days since last push, and that only 19.7% (777 repos) are both maintained and show outside signal. The vendor also corrected its own headline attribution figure from 92.8% to 78.3% after finding it circular, and cautioned that public repositories are not a representative sample of deployed AI-built apps.", "body_md": "Every post in this genre lands on the same sentence: *98% of AI-built apps have\na security flaw, scan yours now.* We sell a scanner, so that conclusion is\nconvenient for us. This post is about the week we spent trying to break it.\n\nThe corpus is now **3,911 public repositories** across nine AI builders — Bolt,\nLovable, Cursor, v0, Replit, Windsurf, Base44, Tempo and Firebase Studio. The\nmethodology, and the correction where we found our own headline attribution\nfigure was circular and revised it from 92.8% to 78.3%, is in\n[the corpus post](https://pathtoship.com/blog/state-of-ai-built-code). This is the follow-on: two new\nfindings, and the three readings of them that turned out to be wrong.\n\n## Most of the flaws are in apps nobody uses\n\nIf AI-built apps were riddled with exploitable holes, you would expect a wave of incidents. So we pulled GitHub metadata for every repository we have scanned:\n\n| Signal | Share of 3,911 repos | \n|---|---|\n| No stars, forks, or open issues | **66.3%** | \n| Not pushed in 90 days | **68.1%** | \n| Median days since last push | **216** | \n| Links a live deployment | 40.3% | \n| Maintained *and* showing some outside signal | **19.7%** (777 repos) | \n\nTwo thirds of the corpus is dormant. A missing row-level-security policy on a portfolio site nobody has touched in eight months is not a security problem — there is no data to leak and nobody to leak it to. Those builders are not negligent. They are correct.\n\nThis changes how every \"98% are insecure\" headline should be read, including ours. The flaws are real and as common as reported. Most of them sit in apps that will never have a user.\n\n**The caveat runs the other way, and it is the more important one.** Stars badly\nundercount real products: an app with two hundred paying customers has no reason\nto collect GitHub stars, and plenty of working products never get a public repo\nat all because the platform hosts them. So public repositories are not a\nrepresentative sample of *deployed* AI-built apps. They are a sample of a\ndifferent population. We can say this corpus is mostly dormant. We cannot say\nthe deployed world is fine, and neither can anybody else scanning public repos.\n\n## The finding that survived every attempt to kill it\n\nThe share of apps carrying at least one **critical** finding rises with the size\nof the app, and it rises monotonically:\n\n| Lines of code | Repos | ≥1 critical | 95% lower bound | ≥1 high | \n|---|---|---|---|---|\n| under 1,000 | 451 | **2.9%** | 1.7% | 26.8% | \n| 1,000–2,000 | 281 | 5.7% | 3.5% | 49.1% | \n| 2,000–5,000 | 510 | 17.6% | 14.6% | 63.1% | \n| 5,000–10,000 | 1,045 | 15.2% | 13.2% | 63.4% | \n| 10,000–15,000 | 532 | 29.9% | 26.2% | 81.8% | \n| 15,000–25,000 | 460 | 38.5% | 34.1% | 88.3% | \n| 25,000–40,000 | 259 | 50.6% | 44.5% | 86.1% | \n| over 40,000 | 373 | **59.2%** | 54.2% | 88.2% | \n\nThree in a hundred under a thousand lines. Nearly six in ten past forty\nthousand. Intervals are Wilson rather than normal, because at small *n* with a\nproportion near zero or one the normal approximation produces intervals of zero\nwidth, which is nonsense.\n\nWe tried three ways to make it go away.\n\n**Is it one platform's scaffold?** No. It holds independently for all nine\nbuilders, with lifts between 2.1× and 6.4× comparing under-10,000-line apps to\nover-10,000-line apps. Nine for nine.\n\n**Is it an artifact of a scanner change?** No — and this was the real risk,\nbecause the corpus was mid-migration between two scanner builds while we\nmeasured, which is an excellent way to fool yourself. Split by build, the lift\nis 3.5× in one and 3.6× in the other. Same gradient.\n\n**Is it false positives piling up?** Probably not, though this is the one we\ncannot fully close. Our scanner over-flags: a hand audit of 374 critical and\nhigh findings this month found more false positives than our earlier published\nestimate, and the four most common classes were fixed the same week. We will\npublish the post-fix rate when it is measured, not before. But an error rate\nthat does not climb with app size cannot manufacture a 20× slope — it inflates\nevery row about equally. Unless false positives concentrate in large apps, which\nthe post-fix audit will check, the *shape* survives the false-positive problem\neven though the *levels* do not.\n\n## What we wanted it to mean, and what it means\n\nThe first instinct was to call it a threshold: *AI-built apps cross a risk cliff\nat 10,000 lines.* Clean, quotable, and wrong.\n\nIf large apps were genuinely sloppier, there would be more findings **per line**.\nWe measured that. Findings per 10,000 lines *falls* with size, 0.708 to 0.178.\nFor about an hour that looked like a better story — large apps are actually\ncleaner per line.\n\nThat was wrong too, for a dull reason. Our scanner aggregates findings per rule:\none entry per rule tripped, with repeats collapsed into the title as `(3x)`. The\nmost criticals any repository can report is therefore bounded by the rule table\n— the maximum we observed was 8, against 57 possible critical rules — while line\ncounts run past ninety thousand. Per-line density *has* to fall as size grows.\nIt is an artifact of our own output format and says nothing about the code in\neither direction.\n\nWhat is left is unglamorous and true: **this is exposure, not degradation.** The\nmore you build, the more likely something slipped through somewhere. Nobody gets\nworse at writing code as their app grows. There is simply more of it to get\nwrong, and one leaked key is enough.\n\n## What to do with this\n\nIf your app is a few hundred lines and nobody uses it, genuinely: don't worry about this. The 2.9% figure is real.\n\nIf you are past ten thousand lines and have users, the base rate is about 30% and climbing with every feature. The three findings that dominate that range, in order:\n\n1. **Row-level security never enabled** on Supabase tables. The anon key is in\nyour client bundle by design. Without RLS, that key reads the whole table.\n2. **A secret on the client side of the boundary** — anything under`NEXT_PUBLIC_` or`VITE_` , or hardcoded in a component. It is bundled into\nJavaScript you ship to strangers.\n3. **API routes with no authorization check.** Attackers do not use your\ninterface. They call your endpoints directly.\n\nNone of that requires a tool. You can check all three by hand in an afternoon.\n\n## What this does not measure\n\n- **Precision:** the scanner over-flags. A 374-finding hand audit this month\nfound more false positives than we had estimated; the main classes are fixed\nand the post-fix rate will be published once measured. Until then, read\nabsolute rates as upper bounds and the gradient as the finding.\n- **Recall:** nothing here says what the scanner*misses* . No coverage claim, no\n\"catches X% of issues.\" That needs a ground-truth corpus with planted\nvulnerabilities, which we have not built.\n- **Users, incidents, or harm:** this measures code. Not one number here is\nevidence that anybody was breached.\n- **Private repositories:** public only — which, given the dormancy finding, is\nprobably the less serious half of the population.\n\nEvery figure above regenerates from the dated corpus snapshot it cites, and the snapshot carries the scanner fingerprint that produced it. If you want a slice of the dataset for your own writing, ask. We would rather more people published numbers on this than have ours be the only ones — particularly since ours have needed correcting more than once.", "url": "https://wpnews.pro/news/when-ai-built-apps-get-risky-data-from-3911-repos", "canonical_source": "https://pathtoship.com/blog/when-ai-built-apps-actually-break", "published_at": "2026-11-19 21:31:32+00:00", "updated_at": "2026-11-19 21:44:49.966762+00:00", "lang": "en", "topics": ["ai-safety", "ai-tools", "ai-products", "developer-tools"], "entities": ["Bolt", "Lovable", "Cursor", "v0", "Replit", "Windsurf", "Base44", "Tempo"], "also_reported_by": [], "takeaway": "The share of AI-built apps with at least one critical finding climbs from 2.9% under 1,000 lines of code to 59.2% over 40,000 lines, a lift of 2.1× to 6.4× that held across all nine builders and both scanner builds.", "recommendation": {"advice": "Prioritize security review by codebase size: apps past 10,000 lines showed 29.9%–59.2% critical-finding rates versus 2.9% under 1,000 lines, so scan larger AI-built apps first.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/when-ai-built-apps-get-risky-data-from-3911-repos", "markdown": "https://wpnews.pro/news/when-ai-built-apps-get-risky-data-from-3911-repos.md", "text": "https://wpnews.pro/news/when-ai-built-apps-get-risky-data-from-3911-repos.txt", "jsonld": "https://wpnews.pro/news/when-ai-built-apps-get-risky-data-from-3911-repos.jsonld"}}