Buying an app built with AI? Check the code before you pay

Published 2026-11-16 by Nordik. Written with AI from the sources listed at the end.

The short version

The risk
An app can look finished and still let any visitor read its users' data. After the sale, that problem and its cleanup are yours.
Does it affect you?
Yes, if you are buying or taking over a web app that an AI tool wrote, especially one with real users, payments or stored personal data.
What to do
Ask the seller for read access to the code before you pay, check data rules, keys and packages, and make fixing the serious problems part of the deal.

Rather not read it all? Copy this for your AI tool. Paste it into the tool you build with. It asks the tool to check your app for the problems in this guide and explain what it finds in plain words. Nothing is changed.

See the prompt
Review this app's code as if I were about to buy it, and do not change anything. Tell me who can read or change each kind of stored data, whether any secret key reaches code that visitors download, which outside packages are old or unmaintained, and anything that would be costly to fix. Rank what you find, most serious first, with the file for each and a plain-words explanation.
Jump to a part (8)
  1. Ask for the code first
  2. Who can read the data
  3. Where the keys live
  4. What the app runs on
  5. Signs worth a closer look
  6. The day you take over
  7. What to ask the seller for
  8. A seller can make this easy

Small apps change hands every day, and more and more of them were written mostly by an AI tool. That is not a problem in itself. The problem is that an app can look finished, have paying users and still hand its data to anyone who knows where to look.

Once you buy it, those problems are yours: the cleanup, the angry users and any notice you owe them. This guide is what to check before you pay, in plain words.

Ask for the code first

You cannot judge an app's security from its pages alone. Before you agree a price, ask the seller for read access to the code, or a copy of it. A repository (the folder that holds the app's code and its history) or a zip file is enough.

A seller who will not share the code before the sale is telling you something. Some sellers share it only once there is a signed letter of intent or a confidentiality agreement, which is fair.

Who can read the data

This is the most common serious problem in apps built with AI tools. For an app on Supabase, a service that keeps an app's data in a database, check:

  • Row Level Security (the database's own rules about who may read or change each record) is on for every table that holds private data.
  • Each rule really limits who gets in, and is not simply "anyone may read".
  • Pages and endpoints that return data check who is asking. An endpoint is an address in the app that programs call to get or change data.

OWASP, a nonprofit that lists common security problems, puts broken access control first in its 2025 Top 10. In a small app, it usually looks like one of the three points above.

Where the keys live

A key is a long password the app uses to prove who it is to another service, such as Supabase or Stripe. Some keys are made to be public. Secret keys are not, and a secret key in code that visitors download lets anyone act as the app on that service.

  • A Supabase secret key (the newer form of service_role) must never sit in browser code.
  • A Stripe secret key (sk_) must stay on the server.
  • In Next.js, any setting whose name starts with NEXT_PUBLIC_ ends up in browser code.

If a secret key ever reached browser code, ask the seller to replace it before the handover, and replace it again yourself after.

What the app runs on

Apps install packages: code other people wrote. Ask for the list with versions, and look for packages that are years out of date or no longer maintained. Old packages are where publicly known weaknesses live.

Signs worth a closer look

You can spot some warning signs in an hour, even without reading much code:

  • The app has no sign-in at all, yet it shows or stores personal data.
  • Settings files named .env sit inside the repository. A .env file is where an app keeps its keys, and it should never be shared with the code.
  • The code has many unused files, or several copies of the same feature, which often happens when an AI tool rewrote parts many times.
  • Nobody can tell you which accounts the app uses, such as hosting, database, payments and email.

None of these is a reason to walk away on its own. Each is a reason to look closer before you agree a price.

The day you take over

Security work does not end at the sale. On the day the app becomes yours:

  • Move every outside account (hosting, database, payments, email, domain) into your own name, and remove the seller's access.
  • Replace every secret key, even ones that never leaked, because the seller has seen them.
  • Turn on two-step sign-in for every account that offers it.
  • Write down what you changed and when, so you can trace a problem later.

What to ask the seller for

  • Read access to the code before you agree a price.
  • A list of every outside service the app uses, and confirmation that every key will be replaced at handover.
  • A note of any security incident, leak or complaint so far.
  • Fixes for the serious problems before the sale closes, or a lower price to cover them.

A seller can make this easy

If you are selling, an outside review of your code before you list answers a buyer's first question before they ask it. A Nordik audit comes with a mark that has its own page on getnordik.com, and a security answers sheet you can hand a buyer: what was reviewed, and against which published standard.

Buying instead? Nordik reads the code you were given and tells you in plain words how serious each problem is, with a fix for each. It is an AI-performed audit, not a penetration test, and the code is read, never run. See a sample report.

Sources

Each source below was accessed on the date shown. Documentation changes over time, so check the source for the current wording.

  • Supabase documentation, Row Level Security, accessed 2026-11-29
  • Supabase documentation, API keys, accessed 2026-11-29
  • Next.js documentation, Environment variables, accessed 2026-11-16
  • Stripe documentation, API keys, accessed 2026-11-16
  • OWASP Top 10:2025, A01 Broken Access Control, accessed 2026-11-30

See what your live app shows strangers

Paste the link to your app: in under a minute the free scan shows what your live app hands to any visitor, and where to look first. No sign-up, and it never signs in or changes anything.

Run a free scan

Want the code itself read? Order the $49 audit or see a sample report. Your card is held and charged only when your report is delivered. It is not a pentest: the audit is done by AI, and a second AI checks each serious finding.