heydevTalk to founders

Startup Tech

Technical Due Diligence on a Vibe-Coded App: What Investors Open First, Plus a Sample Report

Akshit Ahuja

Akshit Ahuja

Co-founder, Chief Speed Officer

Published
A closed laptop and a bound due diligence report on a dark boardroom table, the report open to a scorecard table with three glowing orange tabs marking its pages and a fountain pen resting across it

An investor likes the traction and wants to "have someone look at the tech". Your app was built with Lovable, Bolt, Replit or Cursor, and you are not sure what that someone will find. This post is for founders raising pre-seed to Series A on an AI-built product, and for the angels and associates asked to review one.

Technical due diligence on a vibe-coded app answers one question: can this company keep shipping the product safely after the money arrives? A reviewer checks, roughly in this order, who owns the accounts, whether secrets have leaked, whether one customer can see another's data, the payment code, whether a new engineer can change the code, IP and licences, and cost at scale. Below is each check with the commands that run it, then a full sample report.

Why AI-written code changes due diligence

AI-written code is normal now. In March 2025, Y Combinator managing partner Jared Friedman said a quarter of the Winter 2025 batch had codebases that were 95% AI-generated. No serious investor marks you down for using AI to write code.

What changes is where the risk sits. A human-written codebase that works usually has someone who knows why it works. In an AI-written one, the founder often knows what the app does and has never read how. The security numbers reflect that. Veracode tested over 100 language models in 2025 and found 45% of the code samples failed security tests and introduced OWASP Top 10 vulnerabilities. Symbiotic Security scanned 1,072 vibe-coded apps in June 2026 and found flaws in 98% of them.

So the reviewer's job shifts. Architecture diagrams matter less. Three questions matter more: does anyone understand the dangerous parts, is customer data isolated, and does the company own everything it runs on?

What investors open first: the eight checks

This is the order we work in on a real review. The order follows the money: the first four checks are the ones that change deal terms. Every command below runs on a normal Lovable, Bolt or Replit export with a Supabase backend; swap in your own stack where it differs.

1. Who owns the accounts

Before the code, a reviewer asks for a list of every account the product runs on and who controls it. Vibe-coded apps are often spread across a founder's personal Google login, a Lovable workspace, a Supabase project, Stripe, Vercel or Netlify, an OpenAI account and a domain registrar.

AccountWhat the reviewer wants to see
Code (GitHub, Lovable, Bolt, Replit)Repo in a company-owned organization, not a personal account
Database (Supabase, Neon, Firebase)Project in a company organization, with at least two admins
Payments (Stripe)Account in the company's legal name
Hosting and domainCompany billing card, two-factor on, more than one person with access
AI and email APIs (OpenAI, Anthropic, Resend)Keys on a company account with a spend limit set

The test that settles it: can someone who is not the founder deploy a clean copy of the app from the README, using only company-owned accounts? If the answer is "only the founder can deploy it", that is a red flag, whatever the code looks like.

2. Leaked secrets, in the bundle and in the history

AI builders often put keys where browsers can read them. The reviewer builds the app and searches the output for anything that looks like a key:

scan
npm run build
grep -rhoE 'eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+|sk-(proj-)?[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]{20,}' dist/ .next/static/ 2>/dev/null | sort -u

Then they scan every commit with Gitleaks, because a key deleted last month is still in the git history:

scan
gitleaks git --redact -v .

A Supabase anon or publishable key in the bundle is fine; it is meant to be public. A service role or secret key is not. Supabase's docs say it bypasses every Row Level Security policy, which means full access to every table.

Deleting the file does not fix a leaked key. GitHub's own guidance is to revoke or rotate the secret first, because old commits can survive in clones, forks and cached views. The reviewer will ask when each leaked key was rotated. Supabase is also retiring the old anon and service_role keys by the end of 2026, so rotating now and moving to the new key types is one job, not two.

3. Can one customer see another customer's data?

This is the check that most often turns into a condition on the deal. On Supabase, the protection is Row Level Security (RLS): rules inside Postgres that decide which rows each user may read or write. The check starts with one query listing which tables have RLS switched on:

which
select c.relname as table_name,
       c.relrowsecurity as rls_on,
       (select count(*) from pg_policies p
         where p.schemaname = 'public' and p.tablename = c.relname) as policies
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind = 'r'
order by 1;

Then the reviewer asks for data the way a logged-out stranger would, with only the public key:

request
curl "https://<project-ref>.supabase.co/rest/v1/invoices?select=*&limit=5" \
  -H "apikey: $SUPABASE_PUBLISHABLE_KEY"

Any rows coming back is a critical finding. Then the same requests as two different logged-in users, trying to read and write each other's rows. "RLS is on" is not the end of the check. In our vibe-coded app audit sample, the two worst policy bugs were on tables where RLS was switched on: one let any user make themselves an admin, the other let users write into other accounts.

4. The money paths

Next the reviewer reads every function that touches money. Two patterns show up again and again in AI-built apps:

does
grep -rn "constructEvent" --include=*.ts --include=*.js . | grep -v node_modules

If the app has a Stripe webhook and that search returns nothing, anyone can send it a fake "payment succeeded" event. The second pattern is a checkout that charges whatever amount the browser sends instead of looking the price up on the server. Both are an hour to fix and both are on every reviewer's list. We covered a third, Stripe retrying an event and crediting the customer twice, in the double-credit webhook bug.

5. Can anyone besides the founder change it safely?

This is the real question behind "is the code good?". The reviewer looks at who wrote what, whether anything is tested, and how fast the code is changing:

who
git log --format='%an' | sort | uniq -c | sort -rn
ls .github/workflows 2>/dev/null
grep -n '"test"' package.json
git log --since="90 days ago" --oneline | wc -l

A single author, no tests and no CI is the normal state for a seed-stage vibe-coded app, and reviewers know that. What they want is a plan: tests around signup, payments and data access first, and a second person who has deployed the app. The fastest way to show this is a new engineer getting it running locally from the README, and saying how long it took.

6. IP: does the company own what it sells?

This section describes what reviewers check, not legal advice; your lawyer signs off on the IP. Three separate questions:

  • People. Every contractor and co-founder who committed code (the git log list above) should have signed an IP assignment to the company. A missing one is a classic pre-close condition.
  • AI tools. Read your builder's terms. Lovable's terms say you own the apps you build and the AI output, subject to third-party rights in the underlying models, and that output may be similar to what other users get. They also grant Lovable a licence to use your data for model training unless you opt out.
  • Copyright. The US Copyright Office concluded in January 2025 that AI output is protected only where a human author determined enough of the expressive elements; prompts alone do not count, but human arrangement and modification do. Commit history showing human review and edits is your evidence.

Then licences of the packages you ship:

licences
npx license-checker --production --summary

MIT, Apache and BSD are fine. AGPL in a hosted product deserves a question to your lawyer, because it can require sharing source code with users.

7. Cost and scale

The reviewer wants three months of hosting, database and AI bills, divided by active users. AI features are where this goes wrong: one unthrottled endpoint calling a large model can cost more per user than the plan charges. They will also run EXPLAIN ANALYZE on the queries your main pages make. A missing index is harmless at 10,000 rows and a slow dashboard at a few million. It is five minutes to fix either way, and it shows whether anyone has looked.

8. If the product is an AI product: evals and model risk

If AI is the product rather than just how it was built, add four questions. Is there a test set of real inputs with expected outputs? Are prompts versioned? What happens when the model you use is retired? (We wrote about the September 2026 OpenAI model shutdowns for exactly this reason.) And is customer data sent to a model provider that the privacy policy does not mention?

The sample due diligence report

Below is the report format we deliver, filled in for "Invoicely", the demo invoicing app (Vite, React, Supabase, Stripe, OpenAI) from our audit sample post. The code findings are real: we built the app, audited it, and the full terminal evidence is in that post. Rows marked "scenario" are written to show the format. A demo app has no contractors, accounts or bills, so we made up a typical seed-stage situation for those rows. Nothing marked "scenario" was tested.

Executive summary

Verdict: proceed, with three conditions before close. The product does what it claims. Three critical findings currently expose every customer's invoices to anyone on the internet and let anyone mark an invoice paid. All three are small, well-understood fixes, about four hours of work in total, with no redesign needed. The company does not yet control its own database and payment accounts (scenario). Nothing found requires a rebuild.

Scorecard

AreaRatingSummary
Account ownershipAmber (scenario)Supabase project and Stripe account sit on the founder's personal login; domain and GitHub are company-owned
SecretsRedSupabase service role key and OpenAI key shipped in the browser bundle
Customer data isolationRed`invoices` table has RLS off: 50,000 invoices across 502 accounts readable and editable while logged out. Any user can make themselves admin
PaymentsRedStripe webhook does not verify signatures; checkout charges the amount the browser sends
MaintainabilityAmber (scenario)One author, no automated tests, no CI. Small codebase, readable
IP and licencesAmber (scenario)One contractor without a signed IP assignment. No copyleft licences in production dependencies
Scale and costGreenMissing index on `invoices.user_id`; fine at today's size, five-minute fix
DependenciesGreen4 advisories; only one ships to users (React Router open redirect)

Findings that affect the deal

#FindingWhat it means for the investorFix effort
1Service role key in the browserAnyone can read, change or delete every table, including the user list. Assume the key has been copied1 to 2 hours, plus rotation
2RLS off on `invoices`A reportable data breach waiting to happen; every customer's financial data is public30 minutes
3Unsigned Stripe webhookRevenue figures can be faked by anyone who finds the endpoint1 hour
5Users can make themselves adminBecomes a full takeover the moment any server code trusts the `role` column30 minutes
6Checkout trusts the browser's amountA $5,000 invoice can be paid for $0.501 hour
ASupabase and Stripe on personal accounts (scenario)The company does not control its customer data or revenue account1 day, mostly waiting on transfers
BContractor without IP assignment (scenario)Part of the codebase may not belong to the companyLegal, not engineering

Conditions before close

  1. Rotate the service role and OpenAI keys, remove them from the frontend, and move admin reads to a server function (Findings 1, 4, 8).
  2. Turn on RLS for invoices with per-user policies, verify Stripe webhook signatures, and price checkouts on the server (Findings 2, 3, 6). The reviewer re-checks these before close.
  3. Transfer the Supabase project and Stripe account into the company's organization, and get the signed IP assignment (A, B, scenario).

Within 90 days of close

  • Tests around signup, payments and data access, run in CI on every push.
  • Fix the profile role policy and the cross-account insert (Findings 5, 7).
  • Add the index on invoices.user_id and take the React Router upgrade (Findings 9, 10).
  • A second engineer deploys the app from the README alone.

Not reviewed

The live infrastructure was not penetration tested. Database tests ran on a local Postgres copy with Supabase's roles recreated, not through the hosted API. Findings 3, 4, 6 and 8 come from reading code, not from exploiting live Stripe or OpenAI accounts. The full method and its limits are in the audit post.

Fix or rebuild: what actually kills a deal

Founders worry that "vibe-coded" means "rebuild". It rarely does. Everything in the sample report above is a fix measured in hours. The findings that do push a reviewer towards "rebuild before we invest" look different:

Usually a fix (hours to days)Pushes towards a rebuild
Keys in the bundle, once rotatedEvidence a leaked key was used to access customer data, and no logs to show how much
RLS off or wrong on some tablesA data model with no concept of accounts, so tenants cannot be separated without a redesign
Unsigned webhook, client-side pricesBilling logic spread through the frontend with no server-side source of truth
No tests, one authorNobody, including the founder, can deploy or change the app without the AI tool that wrote it
Personal accountsCore code or data that legally belongs to someone else

The left column gets you conditions on a term sheet. The right column gets you a lower price or a pass. Most AI-built apps we review are firmly in the left column. If yours might be in the right one, find out before an investor's reviewer does. We wrote up the fix-or-migrate decision for Lovable apps separately.

The two-week prep checklist

If you expect diligence in the next month, this is the data room a reviewer wants on day one. Having it ready cuts a week off the process and tells the reviewer someone is in charge.

ItemWhat to hand over
Account mapEvery account from check 1: owner, admins, billing, two-factor status
Read accessGitHub repo, a read-only database role on a staging copy, Stripe read-only access
Architecture noteOne page: what runs where, which AI tools built which parts, what calls which API
Known issuesYour own list of problems and what you are doing about each
Security fixes logKeys rotated (with dates), RLS changes, webhook fixes
People and IPEveryone who committed code, with signed IP assignments
CostsThree months of hosting, database and AI bills, plus monthly active users
AI usage (if AI product)Models used, what data they receive, evals, plan for model retirement

Week one: run checks 2, 3 and 4 above and fix every critical finding. Week two: account transfers, IP paperwork, the known-issues list. The 12-point AI-generated code security check covers the security side in more depth.

Getting a report like this before your investor does

Technical due diligence on a vibe-coded app is mostly the same eight checks every time, and the findings are mostly cheap to fix. The only expensive version is the one where the investor's reviewer finds them first.

The HeyDev audit is $999, delivered in 5 business days, for apps up to about 25,000 lines built with Lovable, Bolt, Replit, Cursor, Base44 or by hand. You get a report in the format above that you can hand straight to an investor, a 45-minute walkthrough call, and a free re-check of your critical fixes. Investors can order the same review on a company they are looking at.

Book a 30-minute call or email mahima@heydev.us with your repo, your stack, and when the diligence is due.

FAQ

Frequently asked questions

Do pre-seed investors actually do technical due diligence?
Rarely as a formal process. At pre-seed it is usually a technical angel or partner spending an hour in the repo and asking a few pointed questions. It gets more formal from seed and Series A, and acquirers always do it. The questions in this post are the same at every stage; only the depth changes.
Will investors care that the code was written by AI?
Less than founders fear. A quarter of Y Combinator's Winter 2025 batch had codebases that were 95% AI-generated, so it is normal. What investors care about is whether someone at the company understands the code, whether customer data is isolated, and whether the company owns everything it would need to keep running.
How long does technical due diligence take?
For a seed-stage product, a focused review takes about a week of elapsed time: a day or two to get access, two to three days of review, and a day to write up. Founder preparation matters more than reviewer speed. Missing account access is the most common delay we see.
What is the difference between a code audit and technical due diligence?
A code audit asks what is broken in the code and how to fix it. Due diligence asks what that means for the deal: is the risk fixable before close, what does it cost, and does the company own and control everything. A good due diligence report contains an audit, plus ownership, team and cost sections.
Should I fix issues before due diligence or disclose them?
Fix the critical ones, then disclose the rest with a plan. A leaked key you already rotated is a line in a changelog. The same key found by the investor's reviewer is a question about what else you missed. Reviewers trust a founder who hands them a known-issues list.

Sources

  1. 01TechCrunch: A quarter of startups in YC's current cohort have codebases that are almost entirely AI-generated (March 6, 2025)
  2. 02Veracode: 2025 GenAI Code Security Report (July 30, 2025)
  3. 03Symbiotic Security: We scanned 1,072 vibe-coded apps, 98% had security flaws (June 2026)
  4. 04US Copyright Office: Copyright and Artificial Intelligence, Part 2: Copyrightability (January 29, 2025)
  5. 05Supabase docs: API keys
  6. 06GitHub docs: Removing sensitive data from a repository
  7. 07Lovable: Terms of Service (updated August 28, 2026)
  8. 08Gitleaks: secret scanner for git repositories

#technical due diligence #vibe coding #fundraising #code audit #Supabase #Row Level Security #intellectual property #founders #investors

Written by

Akshit Ahuja

Akshit Ahuja

Co-founder, Chief Speed Officer

Ex-Spinny, a $1B+ startup / Backend and AI systems

Backend systems specialist who thrives on building reliable, scalable infrastructure. Akshit handles everything from API design to third-party integrations, ensuring every product HeyDev ships is production-ready.

Keep reading

Related articles