Security for Non-Coders Who Vibe-Code Apps (UK)

The four things that get people hurt in an AI-built app, plus the UK GDPR duties that start on launch day: ICO breach reports, erasure deadlines and PECR consent.

By · · 12 min read

Illustration for Security for Non-Coders Who Vibe-Code Apps (UK)

United Kingdom edition. Written for the UK: the same four technical risks, with the ICO as regulator, the 72-hour personal data breach report, the one-month erasure deadline, and PECR consent for anything stored on a visitor's device. US edition

If you built an app by describing it to Lovable, Bolt, v0, Replit or Cursor, you do not need a security course. You need to understand four specific things, because almost everything that goes wrong with apps built this way is one of them.

In the UK there is a second reason to care. If your app holds anything about an identifiable person, you are a controller under the UK GDPR and the Data Protection Act 2018. There is no small-business exemption, and the duties start the day you launch rather than when you reach some size. Three of the four risks below are the route by which small apps end up making a report to the Information Commissioner's Office.

The Launch Readiness Checklist showing the "Who can read the data" section, with critical items for row-level security, per-operation policies and testing with a second account
The Launch Readiness Checklist showing the "Who can read the data" section, with critical items for row-level security, per-operation policies and testing with a second account

The Launch Readiness Checklist (UK) turns this into something you can tick through.

One: who can read your tables

Your app holds data in tables, one row per thing. Because apps built this way talk to the database straight from the visitor's browser, the only thing stopping one person reading everybody else's rows is a database feature called row-level security.

Think of it as a doorman per table. With it on, each request must answer "which rows may this person see?" before anything comes back. With it off, the request gets the table.

Two details catch almost everyone. Switching the doorman on and giving them instructions are separate steps, so you can write careful rules and leave the feature disabled, in which case the rules are ignored. And rules are written per action: reading, creating, changing and deleting are four permissions, and the usual pattern is one rule for reading because reading is what gets tested.

The five-minute test that finds real problems: make a second account, put a record in each, then try to read and edit the first account's data as the second. While you are the only user, every row belongs to you and a leak cannot show itself.

In UK terms, getting this wrong is the classic route to a personal data breach: unauthorised access to personal data. The ICO's own enforcement history is full of access-control failures rather than exotic attacks.

Two: who can open your files

Uploaded files do not live in your tables. They live in storage containers, usually called buckets, and buckets have completely separate permissions. A locked-down table can hold a link to a file anyone on the internet can open, because table rules do not reach into storage.

Four things to get right.

Decide whether each bucket should be public. Profile photos are often fine. Anything a person uploaded about themselves, a passport scan, a sick note, a signed contract, is not. Test it directly: copy an uploaded file's address, open a private window, paste it in. If it loads, that bucket is public.

A long random filename is not a permission. Addresses escape through browser history, shared links and chat previews. Treat an unguessable name as convenience, never protection.

Write rules for uploading, not only reading. An open upload rule lets a stranger put files into storage you pay to hold and serve. Scope each person to their own folder so one account cannot overwrite another's files.

Limit file types and sizes at the bucket. The accept attribute on your form is a hint a browser may ignore. Without a limit at the storage layer, someone can store a web page that then loads from your own address.

Serve private files through links that expire. A signed link is a key written into a web address; once it is in an email it works until it expires. Minutes, not months.

This is worth particular care in the UK because a publicly readable bucket holding documents about people is both a breach and, unlike a database leak, something a search engine may index and cache.

Three: where your keys went

Everything your page downloads can be read by anyone who visits it. Any key sitting in the part of the app that runs in the browser is public, whatever the file is called.

Some keys are designed for that. A Supabase anon key or a Stripe publishable key belongs in the browser, and their power is limited by the settings in the first two sections, which is exactly why those matter. Keys that can spend money, send email as you or read every record belong on a server, stored as a secret.

If a secret key has ever been in browser code, deleting it does not fix it. It remains in your project history and in copies people already loaded. Rotate it at the provider so the old value stops working.

Four: who can get in

Two gaps survive even when sign-in works. Email confirmation: without it, anyone can create an account claiming someone else's address. And the difference between hidden and protected: hiding an admin button changes what is drawn on screen, not what the database permits. If the table rules do not restrict the action to admins, the hidden button is decoration.

What UK law adds

Four duties worth knowing before launch, because each depends on something in the checklist.

Report a breach within 72 hours. A personal data breach likely to risk people's rights must reach the ICO within 72 hours of you becoming aware, and high-risk breaches must be told to the people affected without undue delay. The dependency is error reporting and logging: without them you will not know a breach happened, and the clock runs from awareness.

Answer an erasure request within one month. Extendable by two months for complex cases if you say so within the first month. The hard part is rarely the deadline; it is knowing every table and bucket holding that person's data, which is why mapping personal data before launch is on the list.

Get consent under PECR for non-essential storage. Anything stored on or read from a visitor's device that is not strictly necessary for the service they asked for needs consent first, and analytics is not strictly necessary. Several analytics tools avoid device storage entirely, which is the simplest way to avoid a banner.

Pay the data protection fee. Most organisations processing personal data must pay the ICO's annual fee unless exempt. It is a fee, not an approval, and the ICO publishes a self-assessment to check whether you owe it.

What to do this week

  1. Confirm row-level security is on for every table of personal data, with rules for all four actions.
  2. Make a second account and try to reach the first one's data.
  3. Test an uploaded file's address in a private window; fix bucket rules, upload limits and link expiry.
  4. Move secret keys to a server function and rotate anything that was ever in the browser.
  5. Add error reporting, because the 72-hour clock starts when you become aware.
  6. Write down where personal data lives, so an erasure request is a procedure rather than an improvisation.

None of this requires writing code, and an AI builder will do most of it once you know what to ask for. The one caution: do not ask the same tool whether its own fix worked. Check with the second account yourself.

Frequently asked questions

Does UK GDPR apply to a small side project?

Yes, if it processes personal data about identifiable people. There is no small-business exemption and no user-count threshold. What is proportionate differs with your size and risk, but the core duties, security, transparency and honouring people's rights, apply from the first user.

How long do I have to report a breach to the ICO?

Seventy-two hours from becoming aware of it, where the breach is likely to risk people's rights and freedoms. High-risk breaches must also be reported to the affected individuals without undue delay. Because the clock starts at awareness, error logging is what makes the deadline achievable.

Is a publicly readable storage bucket a reportable breach?

It can be. If files containing personal data were accessible to people with no right to see them, that is unauthorised access, and you must assess the risk to the individuals. Search engines may also have cached the files, which affects both the risk and what you tell people.

Do I need a cookie banner for analytics in the UK?

If your analytics stores or reads anything on the visitor's device, PECR requires consent first, because analytics is not strictly necessary for the service. Choosing a tool that avoids device storage is usually simpler than running a consent banner on a small site.

Do I have to register with the ICO before launching?

Most organisations that process personal data must pay the annual data protection fee, with tiers based on size and turnover and some exemptions. It is an administrative fee rather than an approval, so it does not certify anything about your app's security.

Sources and further reading

Browse all tools