Hire Software Developers 7
Back to blogs

The Real Cost of Making AI-Generated Code Production-Ready

November 25, 2026
A finished-looking shopfront with an unfinished back, the hidden work in making AI-generated code production-ready

The Real Cost of Making AI-Generated Code Production-Ready

About two years ago I built an app on Lovable. I knew what I was doing, and I set strict security rules. It was a trial, a lead-capture site. Within about two days of testing, while it was public, I found its Supabase tables were readable by anyone.

No real prospect data was ever exposed. But the app worked, and it still wasn't ready. This post is about that gap: what it costs to make AI-generated code production-ready, and to keep it that way.

I still like building with AI. The agent does the job a lot quicker than a developer. What it won't do on its own is the process that normally comes before coding. So my rule now is less vibe, more structured process.

Now scale that up. Say your AI wrote 300 endpoints in a month. For each one, someone has to decide which of your four roles may call it, and whether it lets a user reach another tenant's data. Then come the cases no demo shows. Two users click Pay at once. A migration runs at 5 pm. Something breaks at 3 a.m. and there are no logs.

The code was cheap to write. Getting it ready to run still costs what it always did, because a person has to decide what "correct" means and sign off on it.

Production-ready AI-generated code is code that has passed a production readiness review. Google's SRE book calls that review "a process that identifies the reliability needs of a service based on its specific details" [P1]. It covers architecture, monitoring, emergency response and capacity, not just security [P1].

Disclosure: yousource publishes this and sells development services. The hours below come from the effort model we built for our own reviews. They're our estimates, not measured delivery data.

Key takeaways

  • In the effort model we built for our own reviews, 52 of the 158 first-review hours for a ~50-endpoint app go to work outside the classic security checks.
  • Broken access control is #1 in the OWASP Top 10 2025. It was found in some form in 100% of the applications tested [R1].
  • OWASP's new 2025 category for mishandled exceptions warns that a missing rollback can let an attacker "send money to the destination multiple times" [P3].
  • Supabase leaves indexes to you, and its database backups don't include Storage files [P10, P11].
  • France's CNIL fined a software vendor €1.7M for flaws that earlier audit reports had already found [B23].

What a first review actually covers

Your vibe coding MVP looks done asked whether your app is ready. This one asks what getting it ready costs.

Our model splits a first review into 12 modules, A to L. Eleven test the app. K is the report and the retest. This table shows where the hours go for an app of about 50 endpoints and 3–4 roles.

AreaModules (first-review hours, mid + senior)HoursShare
SecurityA automated scans 12 · B access control and RLS 20 · C authentication 12 · D injection 12 · F AI-code checks 10 · G infrastructure 1278≈ 49%
Production and dataE business logic and race conditions 12 · H data and privacy 8 · I production readiness (restores, logging, monitoring, incidents) 10 · J architecture and scale 12 · L maintainability 1052≈ 33%
Running the reviewKickoff 5 · report 16 · retest 728≈ 18%
Total158

Security is the biggest block, but it's under half. Stop at a classic security audit of scans, access control, auth, injection and config, and you skip about a third of the work, including the failures that wake you up at 3 a.m.

Why access control grows so fast

OWASP's authorization testing cheat sheet treats access control as a matrix of features, logical roles and, optionally, data [R4]. In a multi-tenant SaaS, the data axis is the one that hurts.

Take the ~50-endpoint app. Fifty endpoints, 4 roles and 2 tenant contexts, yours and another tenant's, make 400 checks. Our model gives module B 20 hours for that, which works out to about 3 minutes a check.

Now go back to the 300 endpoints. That's 2,400 checks. At the same 3 minutes a check, that's about 120 hours for one module.

Broken access control kept the #1 spot in the OWASP Top 10 2025 [R1]. In February 2026, an exam app built on Lovable exposed 18,697 user records [B28]. Its access-control logic was inverted, so unauthenticated users got in [B28].

In April 2026, a flaw in Lovable's own API let an ordinary account reach other users' source code and database credentials "in as few as five API calls" [R8]. When it was reported, it had been open for 48 days [R8].

Supabase's docs say it plainly: "A table in an exposed schema without RLS is readable and writable by any role with a grant on it" [R9]. Mine was the same class of flaw. The AI will happily create the table. Deciding who should read it is still your job. More cases in our vibe coding horror stories.

What breaks in AI-generated code that isn't a vulnerability

The other third covers failures no scanner flags. Lost money, slow pages, silent outages, data you can't get back.

Race conditions

A demo has one user. Production has two people clicking Pay at once. OWASP added "Mishandling of Exceptional Conditions" as a new category for 2025 [P3]. Its example is a funds transfer that's interrupted midway. With no rollback, an attacker can use a race condition to "send money to the destination multiple times" [P3].

I know of no study that measures how often AI code gets transactions wrong. My point is narrower. A prompt that says "add a Pay button" doesn't ask for an idempotency key. Our module E sends up to 20 parallel requests at each money-moving endpoint on staging. It passes only if exactly one succeeds.

Slow queries

Supabase's guide says the first fix for slow row-level security is an index on the policy columns, with "Improvement seen over 100x on large tables" [P8]. That work is yours: "You are responsible for using best-practices to optimize and manage your database: adding indexes" [P10].

Logging and alerts

OWASP's A09 description opens: "Without logging and monitoring, attacks and breaches cannot be detected" [P4]. So at 3 a.m. with no logs, your first alert is a customer's email.

Backups and restores

Supabase recommends that projects on its entry-level plan "regularly export their data" [P11]. Point-in-time recovery is sold as an add-on. And "Database backups do not include objects you store via the Storage API" [P11]. Lovable keeps daily backups for up to roughly 14 days, with no point-in-time restore [P12].

Maintainability

In Stack Overflow's 2025 survey, 66% of developers named "AI solutions that are almost right, but not quite" as their top frustration [P25]. Somebody has to find the "not quite" before your customers do.

Where scanners help, and where they don't

Run a scanner on an AI-built repo and you get a long list, mostly noise. Help Net Security reports that in Ghost Security's study of SAST tools, more than 91% of flagged vulnerabilities were false positives [R16]. Ghost sells into this market, so weigh that.

Scanners also can't tell whether one tenant's admin should export another tenant's invoices. HackerOne said it in 2021: "IDORs can not be detected by tools alone" [R6]. XBOW's Alvaro Muñoz says DAST scanners miss them because "It doesn't know which data belongs to which user" [R18].

So use the tools to shorten the list, then have a person make the calls. See what a code audit should actually check.

Who does the work, and who signs off

This part is my opinion. A trained mid-level developer can run most of the checks. They can send the request as role X against tenant Y, fire the 20 parallel payments and check the alert routing. What they can't do alone is decide the result is acceptable.

Should a billing role see audit logs? Is a four-hour restore good enough? Those are business decisions in technical clothes.

That's why, across the production block in our model, seniors put in 30 of the 52 hours. A senior is the cheapest person who can make those calls and sign them.

How many hours does a year of production-readiness review take?

In our model, a ~50-endpoint app needs about 597 hours of production-readiness review in its first year. That's 350 mid-level and 247 senior. An app of about 100 endpoints needs roughly 900–1,200.

This table shows how the 597 hours add up.

Work (our estimates)Mid + senior hoursHow often in year 1
First review, including retest158 (90 + 68)Once
Monthly change review26 (16 + 10)8 times
Quarterly deep review (replaces that month's review)77 (44 + 33)3 times
Year 1 total597 (350 + 247)

The model assumes 5–10 new or changed endpoints a month. It scales the hours 1.5–2×, a range we apply to apps of about 100 endpoints. That's mostly because access control, authentication and input checks all grow with every endpoint.

Why keep reviewing? Because the app keeps changing. OWASP says "most of the problems with authorizations occur because features are added/modified in updated releases" [R4]. It recommends testing "when a new release is created" [R4].

What does making AI-generated code production-ready cost?

At salary cost alone, 900–1,200 review hours a year is roughly $56,000–$75,000 at a US in-house rate. At published Philippine senior engineer salaries, it's $6,600–$18,000.

Here are both baselines.

Basis (salary only, before overhead)Hourly900–1,200 hours
US: BLS median, information security analysts, $129,180/yr [R26]≈ $62≈ $56k–$75k
Philippines: senior software engineer, ≈ $15,300 median base (PayScale) and ≈ $21,100 median total comp (Levels.fyi), up to ≈ $31,500 for the top 10% (PayScale) a year [B32, B33]≈ $7–15≈ $6.6k–$18k

Hourly rates assume 2,080 working hours a year. BLS covers security analysts, not the mix of AppSec and backend engineers this work needs [R26]. A provider adds overhead, QA of the work and margin, so expect a multiple of the offshore line, still far below the in-house one.

The usual alternative is a one-off pentest. TCM Security, which sells them, says web app pentests "can range from $5,000 to $30,000" [R24]. That buys a security snapshot. It won't restore your backup or load-test your database. Put this next to the other running costs of a SaaS.

What skipping it can cost

Coalition's average claim in 2025 was $116,000 [B17].

Regulators punish skipped basics. CNIL fined Nexpublica €1.7M because users could see other people's documents. The vulnerabilities "were known and identified by the company through several audit reports" [B23]. The FTC's 2022 Drizly order binds the CEO personally [B24]. It follows him to any future company that collects data on more than 25,000 people.

Is it too early to bother?

Gold Fig Labs wrote in 2021 that "There is no positive benefit when it comes to security" until customers or regulators force the spend [R31]. The platforms do carry part of the load. Supabase says it "is responsible for Postgres backups and observability" [P10].

But the same docs put indexes, compute sizing and its advisor's fixes on you [P10]. Lovable warns: "Restoring cannot be undone. Any data created or changed after the chosen backup is lost" [P12]. A platform backup is a start. It isn't a tested restore or a schema that scales.

For a prototype with no customer data, I agree with Gold Fig. For a multi-tenant app holding other companies' data, I don't. The Lovable cases above show exposure can land long before product-market fit [B28, R8]. My own trial site was already public when I found my gap.

So don't skip the process that normally comes before coding. If the budget is small, start with three things:

  1. Run the access-control matrix on every endpoint that touches tenant data. Do it as your own tenant and as another one.
  2. Do one tested restore, and write down how long it took.
  3. Turn on error logging, with an alert that a named person actually receives.

How to test AI-generated code covers the rest. If you'd rather hand it over, talk to us about development.

Frequently asked questions

What does production-ready mean for AI-generated code?

It means the app has passed a production readiness review. Google's SRE book calls that "a process that identifies the reliability needs of a service based on its specific details" [P1]. For AI-generated code, it covers access control, race conditions, backups and restores, logging and alerting, architecture and maintainability. Not only security.

How much does it cost to make AI-generated code production-ready?

In the effort model we built for our own reviews, a ~50-endpoint app needs about 597 review hours in year one. A ~100-endpoint app needs roughly 900–1,200. At salary cost only, that's about $56,000–$75,000 at the US BLS median for security analysts [R26]. At published Philippine salaries for senior engineers, it's $6,600–$18,000 [B32, B33].

Does Supabase or Lovable back up my app for me?

Partly. Supabase says it is responsible for Postgres backups [P10]. But its docs recommend that entry-level projects "regularly export their data". Point-in-time recovery is an add-on, and database backups leave out Storage files [P11]. Lovable keeps daily backups for up to roughly 14 days, with no point-in-time restore [P12].

Can a scanner find broken access control?

Not reliably on its own. HackerOne wrote in 2021 that "IDORs can not be detected by tools alone" [R6]. XBOW's Alvaro Muñoz says DAST scanners miss them because "It doesn't know which data belongs to which user" [R18]. A person has to decide what each role and tenant may do.

What should a production readiness checklist for a vibe-coded app check first?

Start with the access-control matrix on tenant endpoints, because broken access control is #1 in the OWASP Top 10 2025 [R1]. Then run one tested restore. Then make sure error logging alerts a named person. As OWASP notes, "Without logging and monitoring, attacks and breaches cannot be detected" [P4].

Sources

back to top
Book 15 min with Albert
Smiling man with short dark hair and glasses wearing a black suit, white shirt, and black tie against blue background.
Tell Albert what you're shipping.
He'll read this before joining the call. Phone number comes next, on the calendar step.
↳ info@you-source.com
↳ 4-hour response
Please wait while we retrieve meeting schedules.
Oops! There's a problem with your request. We're working on fixing it. Please try again later.