Finding out your app is leaking data is frightening, and the instinct is to start prompting fixes at random. Resist it. The order matters: contain the leak, keep the evidence, work out what was exposed, then decide who has to be told. Under UK GDPR, the clock for a report to the Information Commissioner's Office (ICO) starts when you become aware of the breach, not when you finish investigating it.
This is a UK playbook for founders whose app was built with Lovable, Bolt, Base44, Replit, Cursor, Claude Code or Codex, usually on top of Supabase. It is practical guidance, not legal advice: if the breach is serious, involves sensitive data or you are unsure, speak to a data protection solicitor as well. Afterwards, our vibe-coded app security checklist covers prevention.
- Contain first: turn on Row Level Security, make storage buckets private, rotate every exposed secret key and cut off sessions you do not trust.
- Export logs before they expire: Supabase keeps API and database logs for 1 day on the Free plan and 7 days on Pro.
- Report to the ICO within 72 hours of becoming aware if the breach is likely to put people at risk. You can send the details in phases.
- Tell affected people directly and without undue delay when the risk to them is high.
- Record every personal data breach, including the ones you decide not to report, and why.
- Fix the root cause in code before you reopen, or the next prompt may quietly undo the fix.
What should you do in the first hour if your vibe-coded app is hacked?
Contain the damage and keep the evidence. Close whatever is open, rotate any key that could have leaked, cut off access you do not trust and export your logs before anything changes or expires.
- First hour, contain: close open tables and buckets, rotate exposed keys, revoke suspect sessions, export logs.
- First day, scope: work out what data was reachable, whose it was, since when, and whether anyone took it.
- By hour 72, decide: apply the ICO's risk test, report if needed and plan what to tell users.
- After that, fix and harden: remove the root cause, re-test, reopen and record what happened.
In practice, the first hour looks like this:
- Write down the time. The ICO's 72 hours run from becoming aware, and you will need a timeline.
- Close open tables. Enabling Row Level Security (RLS) on a Supabase table blocks all access through the publishable key until you add policies, according to Supabase's Row Level Security guide. Some screens will break. That is the right trade.
- Make storage buckets private. Supabase's storage buckets guide says anyone with a file's URL can download it from a public bucket.
- Rotate exposed secrets. Supabase secret or service_role keys, Stripe keys, AI and email provider keys, webhook secrets. Supabase's guide to rotating a leaked key says to fix the cause first, but to retire a key at once if someone is actively using it.
- Cut off access. Reset admin passwords, turn on two-factor authentication everywhere, and sign out accounts you do not trust. Supabase's sessions guide notes that access tokens stay usable until they expire unless your code checks the session still exists.
- Go into maintenance if you cannot close it fast. An afternoon offline costs less than another day of leaking.
- Preserve evidence. Export logs, screenshot settings before changing them, keep any researcher's or attacker's messages, and do not delete tables or rewrite Git history yet.
| Plan | Retention |
|---|---|
| Free | |
| Pro | |
| Team | |
| Enterprise |
Source: Supabase docs, Logging, checked November 2026
Supabase's Download logs option exports up to 1,000 rows at a time as CSV or JSON, with filters applied, so run several filtered exports covering the API gateway, Auth and Storage.
How do you find out what data was exposed, and for how long?
Answer four questions: what data was reachable, whose data it was, since when, and whether anyone actually took it. Logs, Git history and third-party dashboards answer most of them.
| Question | Where to look | Why it matters |
|---|---|---|
| What data was reachable? | Table and bucket list, RLS status, Supabase Security Advisor | Shows which columns of personal data were exposed |
| Whose data, and how much? | Row counts in the affected tables | The ICO report asks for approximate numbers of people and records |
| Since when? | Git history, migrations, deploy log, builder chat history | Sets the exposure window |
| Was it accessed? | Supabase API gateway, Auth and Storage logs | Bulk reads or unknown IP addresses change the risk |
| Which keys leaked? | GitHub secret scanning alerts, built JavaScript, public repositories | Tells you what else to rotate and check |
| Was money touched? | Stripe request logs, payouts and disputes | Decides whether your payment provider and bank need a call |
For leaked keys, start with GitHub. Its secret scanning runs automatically and free on public repositories, checks the whole Git history. GitHub's advice is to rotate the credential immediately; scrubbing history is slow and often unnecessary once the key is dead.
For payments, Stripe's guide to managing secret keys says to rotate an exposed key immediately, even if you are not sure anyone saw it, and to audit request logs for misuse. Stripe may deactivate a key it finds exposed, which is sometimes how founders first learn of a leak.
Check the platform too. In its April 2026 incident post, Lovable said a regression exposed the chat history and source code of public projects from 3 February to 20 April 2026; private projects were not affected. If you pasted a secret into a public project's chat, treat it as exposed. Our round-up of vibe coding security incidents covers others.
- 5,600+ publicly available vibe-coded apps scanned, around 4,000 of them built with Lovable
- 2,000+ vulnerabilities found
- 400+ exposed secrets, including Supabase service role keys in front-end code
- 175 instances of exposed personal data, including medical records, IBANs, phone numbers and emails
Source: Escape, How we discovered vulnerabilities in apps built with vibe coding, October 2025
Do you have to report a data breach to the ICO?
Only if it is likely to result in a risk to people's rights and freedoms. If it is, you must report it without undue delay and, where feasible, within 72 hours of becoming aware of it. If a risk is unlikely, you do not have to report, but you should record the breach and your reasoning.
To be plain: this is guidance, not legal advice. The ICO's personal data breach guide and its self-assessment tool are the authority.
A breach is wider than hacking: a table anyone could read or one user's records shown to another can count. The ICO's examples help calibrate: theft of a customer database that could be used for identity fraud would likely need reporting; the loss of a staff telephone list would likely not.
The report itself must include:
- the nature of the breach, including where possible the categories and approximate number of people and records concerned;
- the name and contact details of your data protection officer or another contact point;
- the likely consequences of the breach;
- the measures taken or proposed to deal with it and reduce its effects.
You will rarely have all of that within 72 hours. UK GDPR lets you report in phases without undue further delay; explain what is missing and when it will follow.
To report, use the online form on the ICO's personal data breach page, which also links a self-assessment tool. The form takes about 30 minutes and cannot be saved part-way. Its helpline is 0303 123 1113.
- 72 hours from becoming aware of a notifiable breach to the latest report time, where feasible
- 30 minutes is the ICO's estimate for completing its online breach form
- £8.7 million or 2% of global turnover is the maximum fine the ICO cites for failing to notify a breach
- £17.5 million or 4% of worldwide turnover is the higher maximum under UK GDPR
Sources: ICO, Personal data breaches: a guide; ICO, Report a personal data breach; ICO, The maximum amount of a fine
The duty to assess, decide and record applies however small the business.
When do you have to tell your users about a data breach?
When the breach is likely to result in a high risk to their rights and freedoms. Then you must tell them directly and without undue delay, in plain language, so they can protect themselves.
Health, financial and ID data, or data about children, push a breach towards high risk. Names and emails alone may not, though they can fuel phishing.
Guidance only. Apply the ICO's risk tests to your own facts.
| Scenario | Report to the ICO? | Tell affected people? | Record it? |
|---|---|---|---|
| Customer table readable by anyone, logs show bulk downloads | Yes, a risk is likely | Partial: yes if the data could enable fraud or harm | Yes |
| Health, financial or ID data exposed | Yes | Yes, high risk is likely | Yes |
| Accounts taken over or admin panel accessed | Yes, if personal data was reached | Yes, affected users need to act | Yes |
| Secret key exposed, logs show no access to personal data | Partial: assess the risk and document the decision | No, unless the risk is high | Yes |
| Data deleted by a bad deploy, restored quickly from backup | Partial: report only if a risk is likely | No, if no high risk remains | Yes |
| Internal staff list shown to the wrong colleague | No, a risk is unlikely | No | Yes |
When you do write to users, be honest and specific. Say what happened, which data was involved, what you have done, what they should do now and who to contact. Do not call it a sophisticated attack if it was an unlocked table.
Who else should you tell after a breach?
Depending on what happened: the police's Report Fraud service, your payment provider and bank, your insurer, the platform you built on, and any business customers whose data you hold on their behalf.
- Report Fraud. From 4 December 2025, City of London Police's Report Fraud service replaced Action Fraud as the national platform for reporting cyber crime and fraud, at reportfraud.police.uk or 0300 123 2040. Which? reports that it covers England, Wales and Northern Ireland, and the NCSC's small business response guide also lists Police Scotland's 101 line.
- The NCSC. GOV.UK's Where to report a cyber incident tool signposts the right body. It notes that what you give it is not shared with the ICO, so a personal data breach still needs its own report.
- Your payment provider and bank. If keys, payouts or money were touched.
- Your insurer. Read your policy's notification terms and tell the insurer early. In the government's latest survey, 51% of insured businesses informed their insurer after a breach.
- Your platform. Lovable or Supabase support, especially if a platform bug is involved.
- Your business customers. If you process data for other organisations, the ICO's guide says a processor must tell the controller without undue delay once aware.
Base: the 204 business respondents that reported their most disruptive breach or attack outside the organisation, excluding reports only to their IT provider
| Reported to | Share |
|---|---|
| Bank, building society or card company | |
| Internet or network service provider | |
| Other government agency | |
| Action Fraud | |
| Suppliers or business partners | |
| Police | |
| Information Commissioner's Office |
The low ICO figure does not make reporting optional: 88% of businesses with a breach or attack had experienced phishing, which often involves no personal data loss. A leaked customer table is different.
How do you fix the root cause and reopen safely?
Find the specific change that opened the gap, fix it in code rather than only in the dashboard, test it as two different users and while signed out, then reopen. Asking the AI to "fix security" is not enough, because the next prompt can undo it.
Replace emergency deny-all RLS with policies scoped to each user, move every secret key to the server, and check one backup restore works. Then have someone who did not write the fix try to break it. If the problems are structural, our guide to deciding whether to fix or rebuild a vibe-coded app helps, as does what it costs to fix a vibe-coded app.
- 43% of UK businesses identified a cyber breach or attack in the last 12 months
- 25% have a formal incident response plan, falling to 21% of micro businesses
- 47% have some form of cyber insurance, but only 10% hold a specific cyber policy
- 62% kept an internal record after their most disruptive breach or attack
Source: DSIT, Cyber security breaches survey 2025/2026, fieldwork August to December 2025, 2,112 business respondents
Finish with a written record: timeline, what was exposed, your reporting decision and why, and what you changed. Then turn it into a one-page incident plan: who decides, where the logs are and how to rotate each key. Three in four businesses have no formal plan.
When should you call in a developer after a breach?
When you cannot find the root cause within a day, when secret keys sat in front-end code, or when payments or sensitive data are involved.
Our emergency fix service for vibe-coded apps covers containment and the root-cause fix, and our vibe-coded app security audit checks the rest of the app before you reopen or relaunch. We build with the same tools: The Study Room's Portal, Dentorb and ORBQ were built with AI-assisted development using Antigravity, Claude Code, Codex and Lovable. The initial app assessment is free, project work starts from £1,000 + VAT, and ongoing support plans start from £125 a month + VAT. Staying on Lovable? Read taking a Lovable app to production.
Frequently asked questions
My Supabase anon key is visible in the browser. Have I been hacked?
Not necessarily. The anon or publishable key is designed to be public, and Row Level Security decides what it can reach. The real questions are whether every exposed table has RLS with sensible policies, and whether a secret or service_role key ever appeared in your front end or a public repository. If it did, rotate it now.
How long do I have to report a data breach to the ICO?
Without undue delay and, where feasible, within 72 hours of becoming aware of a breach that is likely to put people at risk. If you report later, you must give reasons for the delay. You can report in phases, sending the basic facts first and the remaining details as soon as you have them.
Do I need to report a breach if nobody actually downloaded the data?
Possibly not. If your logs show the data was exposed but never accessed, the risk to people may be unlikely, and then a report is not required. Record the breach, the evidence and your reasoning. If your logs have expired and you cannot show it was not accessed, assess the risk as if it was.
Should I take my vibe-coded app offline after a data breach?
Only if you cannot close the gap quickly. Turning on Row Level Security, making storage buckets private and rotating keys usually stops a leak without a full shutdown. If the hole is unclear or still being exploited, a maintenance page for a few hours is cheaper than a leak that keeps running.
Can I just ask the AI coding tool to fix the security hole?
You can use it to help, but do not rely on it alone. AI tools fix the symptom you describe and can undo the fix in a later prompt. Find the root cause yourself, fix it in code, then test it as two different users and while signed out before you reopen the app.
Where do I report a cyber attack on my business in the UK?
In England, Wales and Northern Ireland, report cyber crime to Report Fraud, which replaced Action Fraud, at reportfraud.police.uk or 0300 123 2040. In Scotland, call Police Scotland on 101. If personal data is involved, report it to the ICO separately, because the NCSC's reporting tool does not share what you tell it with the ICO.
Sources
Checked on 20 November 2026. Product features and figures change quickly, so check the current source before you rely on a detail.
- ICO: Personal data breaches, a guide
- ICO: Report a personal data breach
- ICO: The maximum amount of a fine under UK GDPR and DPA 2018
- DSIT, Cyber security breaches survey 2025/2026
- Escape, How we discovered vulnerabilities in apps built with vibe coding (October 2025)
- Supabase documentation: Logging
- Supabase documentation: Rotate a leaked or compromised API key
- Stripe documentation: Best practices for managing secret API keys
- GitHub Docs: About secret scanning
- GOV.UK: Report Fraud, a new service from City of London Police
Dealing with a breach right now?
If your app is leaking data today, our vibe-coded app fix service can help you contain it and fix the root cause. Once it is closed, a vibe-coded app security audit checks the rest of the app before you reopen. To talk it through, Join the Circle for a free assessment.





