AI-written code fails security tests more often than most founders expect. In Veracode's 2025 GenAI Code Security Report, which tested more than 100 large language models on 80 coding tasks, AI-generated code introduced security vulnerabilities in 45 percent of cases. Broken access control, where one user can see, change or delete data that belongs to someone else, sits at number one in the OWASP Top 10:2025. It is also the most common serious problem in vibe-coded apps: the AI built the feature, the feature works, and nobody asked what happens when a different account, or no account at all, makes the same request.
This checklist is for UK founders and teams whose app was built with Lovable, Bolt, Replit, Cursor or Claude Code on top of Supabase. It runs from the database outwards and ends with what UK GDPR, the ICO and Cyber Essentials expect. If you are still choosing a builder, our comparison of Lovable, Bolt, Replit and Cursor covers how each one handles the backend.
- Turn on Row Level Security for every table in an exposed schema, then test it as two different users and while signed out.
- The publishable (anon) key is meant to be public; a secret (service_role) key never is.
- A 2025 scan found inadequate Row Level Security in 170 of 1,645 Lovable projects: check yours rather than assume.
- Payments must be confirmed by verified webhooks on the server, never by the browser.
- Platform scans help, but Lovable's own documentation says they cannot guarantee complete security.
- Under UK GDPR, a notifiable breach must be reported to the ICO within 72 hours of becoming aware of it.
Why are vibe-coded apps often insecure?
Because AI app builders are tuned to make a feature work for the person typing the prompt, not to stop the next person misusing it. Independent testing shows the weakness is in the generated code itself, not only in how people use the tools.
The person prompting is usually signed in as the owner, testing the happy path. So the AI writes a query that fetches "the orders", the screen fills up, and the job looks done. Whether the query should only ever return your orders is a rule that has to live somewhere, and in a Supabase app that somewhere is the database.
Veracode's research puts numbers on this. When a model could choose between a secure and an insecure way to write the same code, it chose the insecure option 45 percent of the time. Security results had not improved over time, and larger models did not perform significantly better than smaller ones, even as the code itself became more accurate.
Base: 80 curated coding tasks across more than 100 large language models
| Test area | Failure rate |
|---|---|
| All tasks | |
| Java tasks | |
| Cross-site scripting (CWE-80) | |
| Log injection (CWE-117) |
The second reason is speed. When each change takes seconds, tables, buckets and functions pile up without anyone listing what each one exposes. The problems are rarely clever; they are gaps nobody looked at.
What was CVE-2025-48757, the Lovable Row Level Security flaw?
CVE-2025-48757 is the identifier for a 2025 disclosure that many Lovable-built apps shipped with missing or weak Row Level Security, so their Supabase data could be read, and in some cases changed, by anyone. Matt Palmer published the statement on CVE-2025-48757 on 29 May 2025.
The team behind it scripted visits to the homepages of apps listed on Lovable's Launched showcase, captured the requests each one made to its backend, and checked what the public key could fetch. The scan identified 303 endpoints across 170 projects, approximately 10.3% of the 1,645 analysed, with inadequate RLS settings. Exposed endpoints included users, transactions and subscriptions tables and functions returning third-party API tokens. Only homepages were scanned, so the real exposure may have been wider.
- 1,645 Lovable projects analysed from the Launched showcase
- 170 projects, about 10.3%, had inadequate Row Level Security
- 303 exposed endpoints across those 170 projects
The lesson is not that one builder is uniquely unsafe: any Supabase front end depends on the same database rules. Lovable now runs security scans, covered below, but older or heavily re-prompted projects still need checking.
How does Supabase decide who can see what?
Through Row Level Security (RLS). Your front end uses a publishable key that anyone can read, and Postgres policies on each table decide which rows that key, and each signed-in user, can reach.
Supabase's API keys guide is plain about the design: anyone can read the publishable key (called the anon key in older projects), "so it only reaches what Row Level Security allows". A policy says, for example, that a user may read a row only if its user_id matches their own.
That design has one sharp edge. If RLS is off on a table in an exposed schema, the publishable key can reach that table directly from anyone's browser, without going through your screens at all. Supabase's Row Level Security guide says: "Enable RLS on every table in an exposed schema." Its Security Advisor marks a public table without RLS as an error and warns that anyone with your project URL can read, edit and delete all data in it.
| Rule | Publishable (anon) | Secret (service_role) |
|---|---|---|
| Safe in a web page or app | Yes | No |
| Safe in source control | Yes | No |
| Limited by Row Level Security | Yes | No, bypasses it without a user token |
Sources: Supabase docs, API keys; Supabase docs, Row Level Security
Secret keys (service_role in older projects) are for trusted servers only. Supabase's instruction is to never put one in a browser, a shipped application or source control, and to rotate a leaked key as soon as you fix the cause of the leak. If a secret key has ever appeared in your front-end code or a public repository, treat it as compromised.
What should a Supabase and Lovable security checklist cover?
Twelve checks, in priority order: database access first, then keys, roles, storage, server functions and payments, then the supporting settings. The first five deal with broken access control, the risk OWASP ranks first.
| Check | Risk if missed | How to verify |
|---|---|---|
| 1. RLS on every exposed table | The public key reads or writes the table directly | Security Advisor shows no RLS errors; every table has a policy |
| 2. Policies scoped to the user | RLS that allows everything protects nothing | Policies compare rows with the signed-in user's id; tested as two accounts and signed out |
| 3. No secret keys in the front end | A secret key bypasses every policy | Search the built JavaScript and Git history for secret and service_role keys |
| 4. Roles not user-editable | An is_admin flag the user can update is an open door | Roles stored where only the server can change them |
| 5. Private storage buckets | Uploaded documents and photos are public | Private buckets with storage policies; signed URLs for downloads |
| 6. Server functions check the caller | Edge Functions often run with elevated rights | Each function verifies the user's token and validates input |
| 7. Payments confirmed server-side | A browser can claim an order is paid | Webhooks verified by signature; prices set on the server |
| 8. Authentication settings | Default senders and loose redirects invite abuse | Your own SMTP sender, redirects limited to your domains, rate limits reviewed |
| 9. Dependencies | Software supply chain failures are A03 in the OWASP Top 10:2025 | Packages current, unused ones removed, lockfile committed |
| 10. Error handling | Stack traces and raw database errors leak detail | Friendly messages for users; details in logs only |
| 11. Backups | A bad prompt can drop a table | Backups or point-in-time recovery on, and one restore tested |
| 12. AI features | Prompt injection is LLM01 in the OWASP Top 10 for LLM applications | AI features cannot reach data or actions the user could not |
Checks 1 to 5 are database and storage settings you can see in the Supabase dashboard. Checks 6 and 7 mean reading server code. If several fail at once, it is often quicker to fix the vibe-coded app as a whole than to patch it one prompt at a time, because the next prompt can quietly undo the last fix.
How do you test Row Level Security properly?
By trying to break it with real accounts: two ordinary users and a signed-out visitor, each attempting to read, change and delete data that is not theirs. Policies that look right in the dashboard can still leak through a join, a view or a function.
- Create test accounts A and B, and add data as each.
- As A, try to read, update and delete B's rows with the publishable key.
- Repeat while signed out, using only the publishable key.
- Try to change your own role or permission fields.
- Try to open B's stored files by guessing or reusing a URL.
- Record every table and bucket tested, and re-run after each change.
For apps with sensitive data, automate these tests on every change. The UK's National Cyber Security Centre made a related point in its March 2026 blog Vibe check: AI may replace SaaS (but not for a while): the rule that all AI-written code must be reviewed by a human is already "creaking at the seams" for organisations that build quickly.
Do Lovable's security scans make an app secure?
They help, and you should run them, but they are not a sign-off. Lovable's security documentation says the tools "help identify common security issues, but they cannot guarantee complete security".
Lovable's Quick scan runs from the publish dialog and covers a database review, a dependency audit and an MCP server check. The Deep scan adds access control, unauthenticated endpoints, injection, leaked secrets, payments, authentication and exposed personal data, but it runs on demand, not automatically as you work. Supabase's Security Advisor adds database checks, including missing RLS.
| Area | Lovable Quick scan | Lovable Deep scan | Supabase Advisor |
|---|---|---|---|
| Database and RLS review | Yes | Yes | Yes |
| Dependency audit | Yes | Yes | Not listed |
| Access control | Not listed | Yes | Partial, RLS and views |
| Leaked secrets | Not listed | Yes | Not listed |
| Payments and billing | Not listed | Yes | Not listed |
| Runs on every publish | Yes | No, on demand | Not listed |
Sources: Lovable docs, Security; Supabase docs, Database advisors, checked November 2026
Scanners are good at known patterns: a missing policy, an exposed key, an outdated package. They are weak at business logic, such as whether a discount code can be applied twice. That needs a person who understands both the code and the business.
What does UK GDPR expect from a vibe-coded app?
The same as from any other system that holds personal data: "appropriate technical and organisational measures" under Article 32, tested regularly, and a report to the ICO within 72 hours when a breach is notifiable. UK GDPR does not care how the code was written.
The ICO's guide to data security expects a process for regularly testing, assessing and evaluating the effectiveness of those measures. For a small app that means, at a minimum, controlling who can reach each record, keeping keys secret, encrypting data in transit, and testing those controls rather than assuming them.
If something does go wrong, the clock is short. The ICO's personal data breach guide says you must report a notifiable breach "without undue delay, but not later than 72 hours after becoming aware of it", and tell affected people directly when the risk to them is high. Failing to notify can bring a fine of up to £8.7 million or 2 per cent of global turnover. Knowing which tables hold personal data makes that call possible in time.
Base: 2,180 business interviews, August to December 2024
| Business size | Share |
|---|---|
| All businesses | |
| Micro businesses | |
| Small businesses | |
| Medium businesses | |
| Large businesses |
The same Department for Science, Innovation and Technology survey found phishing was the most common type of attack, experienced by 85% of businesses that had a breach or attack. It also shows how thin preparation is: only 29% of businesses had carried out a cyber security risk assessment, and 23% had a formal incident response plan.
Does Cyber Essentials cover a vibe-coded app?
Partly. Cyber Essentials covers the accounts, devices and settings you run the business with, but none of its five technical controls is a review of your app's code or database policies. The NCSC describes it as "the minimum standard of cyber security recommended by the Government for organisations of all sizes".
The five controls are firewalls, secure configuration, security update management, user access control and malware protection. Several map neatly onto a vibe-coded app: user access control covers who holds admin rights in Supabase, Lovable and GitHub, and security update management covers your dependencies. The ICO's security guidance also points organisations to the Cyber Essentials requirements as a baseline. Few small firms have it yet.
- 3% of UK businesses hold Cyber Essentials, rising to 21% of larger businesses
- 40% of UK businesses use two-factor authentication
- 92% less likely to make an insurance claim, for organisations with Cyber Essentials
- 39,790 Cyber Essentials certifications awarded in the NCSC's 2025 review year
Sources: DSIT, Cyber security breaches survey 2025; NCSC, Annual Review 2025
The insurance figure comes from the insurer bundled with certification, so read it as a signal rather than a controlled study. Turning on two-factor authentication for every Supabase, Lovable, GitHub and domain account closes one of the easiest routes into an app.
When do you need a professional security review?
Before launch, if the app stores personal data beyond names and emails, takes payments, serves children, handles health or financial information, or is about to face investor or enterprise due diligence.
Be clear about scope. A code and configuration review checks the database policies, keys, functions, authentication and dependencies described above. A formal penetration test by an accredited tester is a different, broader exercise, often required by larger customers or insurers. Many small apps need the first now and the second later.
Health data raises the stakes most, which is why dental and healthcare practices building patient-facing tools should treat review as part of launch, not an extra. Circlemount is based in Telford, Shropshire, and the work is done on your code and Supabase project, so it suits founders close by in Telford and Wolverhampton as much as those in Leeds or Bristol.
Our vibe-coded app security audit works through this checklist with you, and the wider vibe-coded app services cover what comes after. If you are still deciding how the app should be built and hosted, read what vibe coding is and where it breaks and our guide to taking a Lovable app to production.
Frequently asked questions
Is it safe to expose the Supabase anon or publishable key?
Yes, as long as Row Level Security is enabled and correctly written on every exposed table. Supabase designed the publishable key to be public, because the database policies decide what it can reach. Without those policies the same key can read or change data directly, so the key is only as safe as your RLS.
Does Lovable's security scan make my app secure?
No single scan can. Lovable runs a Quick scan when you publish and offers a Deep scan on demand, and its documentation says the tools cannot guarantee complete security. Scans catch known patterns such as missing policies or exposed keys. Business logic, roles and payment flows still need a human review.
What is Row Level Security in Supabase?
Row Level Security is a Postgres feature that Supabase uses to control which rows each user can read or change. You write policies, for example allowing a user to see only rows with their own user id. Supabase says to enable it on every table in an exposed schema, then test it with real accounts.
How can I tell if my Supabase tables are exposed?
Open the Security Advisor in the Supabase dashboard and fix anything marked as an error, especially public tables with RLS disabled. Then test properly: sign in as two different users and try to read each other's data, and try again while signed out using only the publishable key from your front end.
Is a security audit the same as a penetration test?
Not usually. A code and configuration audit reviews your database policies, keys, server functions, authentication and dependencies. A penetration test is a broader, attack-led exercise by an accredited tester, often required by enterprise customers or insurers. Many small apps benefit from an audit before launch and a penetration test later.
Does Cyber Essentials certify that my app is secure?
No. Cyber Essentials is the UK government-backed baseline built on five controls: firewalls, secure configuration, security update management, user access control and malware protection. It covers how you run your business systems, not your app's database policies or code, so a vibe-coded app still needs its own security review.
What should I do if my vibe-coded app has leaked data?
Close the gap first, for example by enabling RLS or rotating an exposed key. Then work out what data was reachable and for how long. If the breach is likely to put people at risk, UK GDPR requires you to report it to the ICO within 72 hours of becoming aware.
Sources
Checked on 16 November 2026. Product features and figures change quickly, so check the current source before you rely on a detail.
- Veracode, 2025 GenAI Code Security Report (press release, July 2025)
- Matt Palmer, Statement on CVE-2025-48757 (May 2025)
- Supabase documentation: Row Level Security
- Supabase documentation: API keys
- Supabase documentation: Database advisors
- Lovable documentation: Security
- DSIT, Cyber security breaches survey 2025
- NCSC, Annual Review 2025: Empowering organisations
- ICO: A guide to data security (UK GDPR Article 32)
- ICO: Personal data breaches, a guide
Want a second pair of eyes on your app?
Our vibe-coded app security audit reviews your Supabase policies, keys, server functions, authentication and payment flows, and tells you plainly what to fix first. If you would rather talk it through, Join the Circle for a free business analysis and proposal.





