# AI-Built App Rescue, Audit and Hardening UK

Source: https://dijituldevelopments.co.uk/ai-built-app-rescue/
Updated: 2026-11-20

> dijitul developments audits, hardens and rescues vibe-coded apps built with AI tools such as Lovable, Bolt, Cursor and Replit, for UK businesses. We check keys, database access rules, logins, API routes, backups and costs, fix what is unsafe, and put the code and accounts in your name. Every job is a fixed-price quote after a free chat.

## Problems this solves

- The app works in the demo, but you are not sure it is safe to put real customers on it
- An API key for payments, email or an AI model is sitting in the front-end code
- A logged-in user can see someone else's records by changing an ID in the address bar
- There is no staging copy, no tests and no backup anyone has ever restored
- The monthly bill for credits, tokens or AI calls keeps climbing and nobody can say why
- Each new prompt fixes one thing and breaks two others
- The person who prompted the app has moved on and nobody else understands it
- An investor, customer or insurer has asked how the app was built and tested

## Key facts

- Covers apps built with Lovable, Bolt, Cursor, Replit and similar AI coding tools, live or still in prototype
- Supabase's docs say a table in an exposed schema without row-level security is readable and writable by any role with a grant on it
- Supabase says a secret key bypasses every row-level security policy and must never go in a browser, a shipped app or source control
- Vite's docs say variables prefixed VITE_ are bundled into client-side code and should not contain API keys
- Broken Access Control is category A01 in the OWASP Top 10:2025, ahead of Security Misconfiguration and Software Supply Chain Failures
- Lovable's docs say its built-in security scans cannot guarantee complete security, and suggest a professional review for apps handling sensitive data
- The code repository, database, hosting, domain and API accounts all end up in your name
- Vendor facts on this page were checked against each vendor's own documentation on 20 November 2026

## Why AI-built apps need a second look

Lovable, Bolt, Cursor and Replit let someone with an idea reach a working app quickly. Lovable's documentation describes a full-stack AI development platform for building web applications using natural language, Bolt's an AI-powered builder that runs in your browser, and Cursor's a coding agent that works in your codebase.

A prompt asks for a feature. It rarely asks for an access rule, a backup, a rate limit or a test, so those are often missing. When we checked on 20 November 2026, Lovable's security documentation said its built-in scans cannot guarantee complete security and that you are responsible for the app meeting the security needs of its use. Cursor's said AI can behave unexpectedly. That is no criticism of the tools: it is the normal distance between a prototype and software a business depends on.

This page covers the AI-tool case. For a project abandoned by a developer or agency, see software rescue. For an independent review of any codebase, see our code audit.

## What usually goes wrong

- **Keys in the browser.** Vite's docs say `VITE_` variables are exposed in client-side code and should not contain API keys. Next.js inlines `NEXT_PUBLIC_` variables into the JavaScript sent to the browser. A secret key in either can be read by anyone.
- **Missing or wrong row-level security.** Lovable's built-in backend is built on Supabase's open-source foundation, and Bolt projects can use Supabase too. Supabase's docs say a publishable key in the browser only reaches what row-level security (RLS) allows, and that a table in an exposed schema without RLS is readable and writable by any role with a grant on it. Its Security Advisor flags tables with RLS off and policies with an always-true condition such as `USING (true)`.
- **No access checks on the server.** API routes trust whatever user ID the browser sends. Broken Access Control is A01 in the OWASP Top 10:2025.
- **No tests, staging or tested backup.** Supabase's docs say automatic daily backups cover Pro, Team and Enterprise projects, and recommend that free-plan projects export their data regularly.
- **Dependencies and licences nobody chose.** Packages can be outdated, vulnerable, abandoned or licensed in a way that does not suit a commercial product. OWASP lists Software Supply Chain Failures as A03:2025.
- **Costs that grow with use.** Lovable's docs say one credit balance pays for building, hosting, the backend and AI features. Bolt's say larger projects use more tokens per message. An unprotected endpoint calling a paid AI model can be run up by anyone who finds it.

## What the audit covers

We start with the builder's own checks. When we checked on 20 November 2026, Lovable documented a Quick scan and a Deep scan, Bolt a project security audit and a database security check, and Cursor a tool called Bugbot that reviews pull requests. Replit said every app is scanned automatically before it can be published. We run what applies, then read the code by hand.

- **Keys and secrets**: where each lives, what it can do, whether it was ever committed to Git
- **Database tables**: every RLS policy read, then tested as two different users and as a logged-out visitor
- **API routes, server functions and webhooks**: who can call them and what they trust
- **Login, password reset, sessions and admin screens**
- **File storage**: which buckets are public
- **Dependencies and licences**, using `npm audit` and a licence report
- **Backups, environments, deployment and monitoring**
- **Accounts and billing**: who owns the workspace, repository, database, domain and each API account

Anything critical, such as a live secret key in the front end, we tell you about straight away.

## Harden in place, or rebuild

We do not recommend a rebuild by default. If the data model is sound and the code is readable, hardening the existing app is the less disruptive route:

- **Stop the leaks.** Rotate exposed keys, move secret calls into a server function, switch on RLS and write the policies. Supabase's docs say it is deprecating its legacy `anon` and `service_role` keys by the end of 2026, so we move projects to publishable and secret keys too.
- **Add the safety net.** A staging copy, tests around sign-in, payments and data access, backups with a restore actually tried, error tracking and alerts.
- **Control the spend.** Rate limits, usage caps and billing alerts on anything metered.
- **Clear what blocks change.** Remove dead code, pin dependency versions and write down how to deploy.

A rebuild makes sense when the data model is wrong for the business or access control cannot be added cleanly. The prototype is not wasted: it is the clearest specification you could hand us. We rebuild in stages on a stack such as Laravel or Next.js with PostgreSQL, with a tested data migration.

## Getting your code and data out of the builder

This is what each vendor's own documentation said when we checked on 20 November 2026:

| Tool | Code | Database and backend |

| Lovable | You keep full ownership of your code. Projects sync to a GitHub repository that is private by default, and paid plans can download the codebase. | No one-step move from the built-in backend to your own Supabase project: you export and restore the database, then move storage files and set up authentication and secrets again. |
| Bolt | Download the project as a zip file on desktop, or connect GitHub. The repository starts private and the project stays on the `main` branch. | A Bolt database can be claimed, with its data, into your own Supabase account on a Pro or Teams plan. |
| Replit | Download the project as a zip file, or connect a GitHub repository. | Each app has separate development and production databases. Secrets, the database and deployment configuration are not included when a project is copied. |
| Cursor | The agent edits files in your own workspace. | Depends on what the project was set up with, so we start by finding out. |

We do the export with you and check the copy builds and runs outside the builder before changing anything.

## Who owns the code and the accounts

By the end, everything is in your business's name: the builder workspace, the Git repository, the database project, hosting, the domain and every API account. Where the app was built under a freelancer's or former employee's personal login, we help you transfer or recreate each account, rotate every key that person could have seen, and record who has access to what.

You own the code we write and your data. For code the AI tool generated, that tool's terms apply, and we point you to them instead of guessing.

Afterwards we can look after the app under software maintenance, or hand over to your own developer. Start with a free chat: tell us which tool built the app and what worries you.

## What we deliver

- A written audit report with severity-rated findings in plain English
- Exposed keys rotated, and secret calls moved to server-side code and out of the Git history
- Row-level security policies and server-side access checks, with tests showing one user cannot read another's data
- Login, sign-up, password reset and API routes reviewed and fixed, with rate limits on anything that costs money to run
- A staging environment, automated tests on the critical flows and a repeatable deployment
- Backups with a restore actually tried, plus error tracking and uptime alerts
- Usage caps and billing alerts on AI, database and hosting accounts
- The code in a Git repository you own, every account in your business's name, and handover notes

Technologies: Supabase, PostgreSQL, Row-level security, Vite, Next.js, TypeScript, Git, OWASP Top 10

## FAQs

### Is an app built with Lovable, Bolt, Cursor or Replit safe to launch?

It can be, but it needs checking first. These tools produce working software quickly; what is often missing is access rules, tests, backups and spend limits. dijitul developments audits the app, fixes what is unsafe and tells you plainly what is fine as it is. Lovable's own docs suggest a professional security review for apps handling sensitive data.

### Do we have to rebuild our vibe-coded app from scratch?

Not by default. If the data model is sound, dijitul developments hardens the existing app in place: keys, row-level security, server-side access checks, tests and backups. We recommend a staged rebuild only when access control or the data model cannot be fixed cleanly, and we explain why in writing.

### Our API key is visible in the browser. What should we do now?

Treat it as compromised. Revoke or rotate it in the provider's dashboard, check that provider's usage and billing for anything unexpected, and move the call behind a server function so the new key never reaches the browser. dijitul developments can do this with you, then check the Git history and the rest of the code for other secrets.

### What is row-level security, and why does it matter on Supabase?

Row-level security (RLS) is a PostgreSQL feature that decides which rows each user can read or change. Supabase's docs say a publishable key in the browser only reaches what RLS allows, and that a table in an exposed schema without RLS is readable and writable by any role with a grant on it. dijitul developments checks every table and tests the policies as different users.

### Can we get our code out of Lovable, Bolt or Replit?

Yes, according to each vendor's documentation when we checked on 20 November 2026. Lovable syncs to GitHub and lets paid plans download the codebase, Bolt offers a zip download and GitHub sync, and Replit offers a zip download. The database, secrets and hosting move separately, which dijitul developments plans and tests before anything is switched over.

### Can we keep using our AI coding tool after the app has been hardened?

Yes, and it is a sensible way to keep the speed. dijitul developments sets up version control, a staging copy, automated tests and a review step, so changes written with an AI tool are checked before they reach live customers.

### Who owns the code and the accounts at the end?

You do. dijitul developments finishes every job with the repository, database project, hosting, domain and API accounts in your business's name. The code we write and your data belong to you. If the app was built under someone's personal login, we help you move it and rotate the keys.

### How much does it cost to audit or rescue an AI-built app?

It depends on the size of the app and what the audit finds, so there is no price list. After a free chat and a quick look at the code, dijitul developments quotes a fixed price for the audit, then a fixed price for each agreed stage of hardening or rebuild.

## Pricing and contact

Every project gets a fixed-price quote after a free initial chat and a short scoping stage. You own the code and the data. Book a free chat: https://dijituldevelopments.co.uk/contact/ · 01623 650333 · info@dijitul.uk
