Buyer Guides · 7 MIN

The security holes in AI-built apps, and how to check your own

Apps built fast with Lovable, Bolt, Cursor or Claude on Supabase often share the same open doors. Here is what they look like and a 30-minute check you can run yourself.

By NactorePublished 20 Nov 2026All articles

Apps built fast with AI tools like Lovable, Bolt, Cursor and Claude usually fail security in the same few places: server functions that never check who is calling, database functions that skip the access rules, rules that allow too much, public file storage, exposed secrets, and shared links that show more than intended. You can find most of these in about 30 minutes by logging in as different users and trying to read data you should not see.

Key takeaways
  • Most AI-built apps on Supabase talk to the database straight from the browser, so the database's own rules are the real security layer.
  • Access rules can exist and still be wrong. A rule that lets any logged-in user read every row protects nothing.
  • Reading the rules is not enough. Log in as a stranger and as a normal user, and try to read and change what you should not.
  • Supabase's built-in security advisor is a free first pass. It flagged a critical issue on our own production database.
  • Nactore is a technology and growth company that builds, ships, ranks and grows products, and we check AI-built apps before strangers find the holes.

Why do AI-built apps share the same holes?

AI-built apps share the same security holes because AI tools are tuned to make features work on screen, not to decide who should see what. Access control is a business decision about your users. The AI cannot know it unless you spell it out, so it often picks whatever makes the demo work.

Most of these apps run on Supabase, a Postgres database with a ready-made API in front of it. Your app's browser code talks to that API directly, and anyone with your app open can talk to it with the same public key. What stops them is RLS (row level security), the rule inside the database that decides which rows a logged-in user can read or change. Supabase's row level security guide says RLS should be on for every table in an exposed schema.

The six holes we look for first

1. Server functions that never check who is calling

Edge functions and API routes are small pieces of server code that send email, take payments or call an AI model. The hole appears when a function trusts whatever the browser sends. If it takes a user_id from the request without checking the caller's login, anyone can call it with someone else's ID.

2. Database functions and views that skip the rules

A view is a saved query that looks like a table. A SECURITY DEFINER function is a database function that runs with its creator's rights, usually an admin's, instead of the caller's. Both can read past RLS. The table rules look perfect, and data still leaks through a side door.

3. Rules that exist but allow too much

The dashboard shows RLS as on, so this one hides well. The problem is what the policy (one rule on a table) says. "Authenticated users can read everything" means anyone who signs up with a throwaway email can read every customer's records.

4. Public storage buckets

A storage bucket is a folder for uploads like invoices, ID photos or contracts. If it is public, anyone with the file link can open it, no login needed.

5. Secrets in plain tables or in the frontend

Secrets are passwords for other services: payment, email and AI model keys. Supabase's API key guide explains that the publishable key is meant for the browser, while the secret key bypasses RLS and must stay on the server. Third-party tokens stored in an ordinary table the browser can read are just as exposed.

Apps often send links to people without accounts, like an order page for a supplier. The link should show that one order. Often the page loads far more and only hides it on screen, so the full data still reaches anyone who looks.

Do not just read the rules, try to break them

Reading policies tells you what someone meant. Logging in tells you what actually happens. Test as three people:

  • A stranger. Logged out, using only the public key your app ships with.
  • A normal user. A fresh account with no special role.
  • A second normal user. So you can check whether user A can see or change user B's data.

Try to read data that is not theirs, then try to change it. A user who can edit their own plan or role column has just given themselves your paid tier or admin access.

If you have not tried to read someone else's data, you do not know whether you can.

A 30-minute self-check

  1. Run the security advisor. In the Supabase dashboard, open the advisors and read every security warning, starting with anything critical.
  2. List your tables. Confirm RLS is on for each and write one sentence on who should read it.
  3. Read every policy as a sentence. If one allows all authenticated users, ask whether a stranger with a new account should see that table.
  4. Check storage. Note which buckets are public. Documents and IDs should not be.
  5. Search the frontend for secrets. Open your live site, open developer tools, and search the loaded code for secret, sk_, service_role and api_key.
  6. Run the stranger test. Logged out, request a sensitive table with the public key. Anything private that comes back is a hole.
  7. Run the two-user test. As user A, open a link or ID that belongs to user B and see what loads.
  8. Open a shared link in a private window and check what the page received, not just what it shows.
Pro tip

Keep the two test accounts permanently and rerun steps 6 and 7 every time the AI tool changes your database. A rule that was right last month can be overwritten by one prompt.

Risks, tests and fixes at a glance

RiskWhat it looks likeHow to testFix
Unchecked server functionTakes a user ID from the requestCall it with another user's IDRead the caller from their login token
Functions or views skipping rulesData leaks though table rules look rightQuery each one as a normal userRun them with the caller's rights, or add checks inside
Rules that allow too much"Authenticated can read all"Sign up fresh, read another user's rowsMatch the row's owner to the signed-in user
Public storageFiles open with no loginOpen a file link in a private windowMake the bucket private, use short-lived signed links
Exposed secretsKeys in browser code or a readable tableSearch the code, query the table as a userMove keys to server settings, replace any that leaked
Over-sharing linksSupplier link loads more than one recordInspect what the page receivedReturn only the fields that link needs

What we found on our own database

We run this check on ourselves. Supabase's security advisor flagged a CRITICAL issue on Nactore's own production database, and we fixed it on the database side, where the rule lives, rather than patching around it in the app. That is why we tell every founder to start with the advisor and then go further by hand.

Frequently asked questions

Is Supabase insecure?

No. Supabase gives you row level security and a security advisor to lock data down. The holes come from how a specific app sets those up, so each app needs its own check.

My app has RLS turned on. Am I safe?

Not necessarily. RLS being on only means rules exist. They can still let any logged-in user read everything, and some functions and views can skip them. Testing as real users is how you find out.

Do I need to rebuild my app to fix these?

Usually not. Most fixes are changes to database rules, moving secrets to the server and adding a login check to server functions.

Get a clear list of what is open

Your app already has real users, so the question is what they, or a stranger, can reach today. Nactore runs a fixed-scope security check for apps built with AI tools. You get a plain-English list of what is open, how serious each item is, and the exact fix. After that, we can build, ship, rank and grow the product with you as one partner, measured on your growth.

Write to hello@nactore.com and tell us what your app is built on.

Want to apply this to your business?

Book a free 30-minute call. We will tell you what we would do first.