Guides

Security checklist for AI-built apps

The short answer: Check three things first: that each user can only see their own data, that no key or password sits in your code, and that you review what Claude runs. Then ask Claude to check the rest, and get an expert for sign-in, payments and personal data.

Key points

  • Test first that each user can only see their own data: make two accounts and try to reach one from the other.
  • Secrets never go in the code or in Git. A secret that was ever saved to Git counts as leaked: replace it.
  • You're responsible for reviewing the code and commands Claude Code proposes before you approve them.
  • An AI check is a good start and not a replacement: get an expert for payments, sign-in and personal data.
On this page
  1. Is an app built with AI secure?
  2. What are the most common risks?
  3. Can users see each other’s data?
  4. Where do my secrets live?
  5. Do I review what Claude runs on my computer?
  6. Is sign-in done properly?
  7. Are my packages safe?
  8. What happens when something goes wrong?
  9. What about data I collect?
  10. What do I ask Claude to do?
  11. When do I need an expert?
  12. The checklist

Is an app built with AI secure?

Not automatically, and not automatically insecure either. Security depends on what you checked. AI writes code quickly, and it can also quickly build something that works well for you and badly for an attacker. You don’t need to be a security expert to cover the most common problems. You need a checklist and the habit of asking for proof.

This guide has no scanner to sell. It lists the risks in plain words, what each one looks like, and what to ask Claude to check.

What are the most common risks?

The OWASP Top 10 is a widely used list of the most critical web application security risks. Its 2025 edition starts with (OWASP):

  1. Broken Access Control
  2. Security Misconfiguration
  3. Software Supply Chain Failures
  4. Cryptographic Failures
  5. Injection
  6. Insecure Design
  7. Authentication Failures
  8. Software or Data Integrity Failures
  9. Security Logging and Alerting Failures
  10. Mishandling of Exceptional Conditions

You don’t need to memorize it. The checks below cover the ones that bite small apps first.

Can users see each other’s data?

This is access control, the first item on the list, and the one to test first.

What it looks like: you sign in as Anna and see Anna’s notes. Someone changes a number in the address, or asks the server directly, and sees Ben’s notes as well.

Anna

Anna's notes

Ben asks for Anna's notesThe app must refuse, by click and by pasted address

Ben

Ben's notes

The two-account test: signed in as one person, ask for the other’s data. The app must refuse.

What to do:

  • Make two accounts. Create something in the first. Sign in as the second and try to reach it, by clicking and by pasting the address.
  • Ask Claude: “List every place where the app reads or changes user data, and show me how each one checks that the user is allowed to.”
  • If you use Supabase, turn on Row Level Security. Its docs say to enable RLS on every table in an exposed schema, and that a table without it is readable and writable by any role with a grant on it. With RLS on and no policies, nothing is reachable through the API with a publishable key until you create policies (Supabase docs).

Where do my secrets live?

A secret is anything that gives access: a password, an API key, a token. They must never be typed into the code, and never saved into Git.

  • Put secrets in a settings file or a secrets manager that Git ignores.
  • Ask Claude: “Search this project and its Git history for keys, passwords and tokens.”
  • Know which keys are meant to be public and which are not. The Supabase docs say a secret key is for administrative tasks that bypass RLS, and should never be used in the browser or exposed to customers.

Watch out

If a secret was ever saved to Git, treat it as leaked. Replace it with a new one; deleting it from the file is not enough.

Do I review what Claude runs on my computer?

Yes. Claude Code can run commands, and this is a place where you can get hurt. The security page says you’re responsible for reviewing proposed code and commands for safety before approval (Claude Code docs: security).

Know your permission mode. In Manual mode, Claude Code starts with read-only permissions and asks before editing files or running commands. Auto mode uses a separate classifier model to review actions instead of you, and the docs warn that it reduces prompts but does not guarantee safety (permission modes). Pick the mode that fits how much you can judge.

Other points from the security page:

  • Commands that fetch from the web, such as curl, are not auto-approved by default.
  • Avoid piping untrusted content directly to Claude. Text from a web page or a stranger’s file can contain instructions meant to steer it. This is called prompt injection.
  • Be careful with MCP servers, the add-ons that connect Claude to outside tools. The docs encourage servers you wrote or from providers you trust, and say Anthropic does not security-audit them.
  • The docs say no system is completely immune to attack.

Is sign-in done properly?

Sign-in is where a small mistake becomes a big one. Authentication Failures is on the OWASP list for a reason.

  • Use a sign-in service or a well-known library. Do not let Claude invent its own password handling.
  • Check that pages meant for signed-in users really refuse everyone else, including when someone types the address directly.
  • Check what happens after sign-out and after a password reset.
  • Ask Claude: “Show me every page and every server function that requires sign-in, and how each one enforces it.”

Watch out

If your app has sign-in, payments or personal data, have an expert look at it before real users arrive.

Are my packages safe?

Software Supply Chain Failures is on the 2025 list. Your app is built on top of other people’s packages. Each one is a piece of code you did not write.

  • Ask Claude why each package is needed, and remove the ones that aren’t.
  • Prefer well-known packages with active maintenance.
  • Keep them updated, and ask Claude to check for known problems. The security page’s related resources point to a /security-review command that runs an on-demand security pass over the changes on your current branch.

What happens when something goes wrong?

Mishandling of Exceptional Conditions and Security Logging and Alerting Failures are both on the list.

  • Error messages shown to users should be plain and tell nothing about your system. A message that shows file paths or database names helps attackers.
  • Keep a record of important events, like sign-ins and failed attempts, so you can see what happened. Never put passwords, tokens or personal data in logs.
  • Know how you will find out when something breaks.

What about data I collect?

Collect only what you need. Every field you store is a liability. For each piece of personal data, answer: why do I have it, who can see it, how long do I keep it, and how can the person ask for it to be deleted? Depending on where your users live, laws such as the GDPR set rules here, so ask a professional if you are not sure.

What do I ask Claude to do?

Paste this into a session, and ask it to show proof for each point:

Ask Claude

Review this project for security problems. Check: who can read or change each user’s data; any secrets in the code or Git history; how sign-in is enforced on every page and server function; which packages we depend on and which are unused; what the error messages reveal; what we log. Give me a list ordered by how bad each problem is, with the file and line, and fix nothing until I say so.

Then read the list. Ask about anything you don’t understand. Fix the worst first, and ask for a test that would have caught it.

A second look helps: ask a fresh session, or a reviewer who has not seen your conversation, to repeat the check.

When do I need an expert?

When the app:

  • takes payments,
  • has sign-in or accounts,
  • holds personal data,
  • is used by a client’s customers, or
  • would hurt people if it failed.

An AI check is a good start and not a replacement. An expert reads the code with a different mind, tries to attack it and tells you what you did not think to ask.

The checklist

  • Two accounts tested: neither can reach the other’s data.
  • Row Level Security on for every exposed table, if you use Supabase.
  • No secrets in the code or in Git history; leaked ones replaced.
  • Secret keys never in the browser.
  • Sign-in enforced on every protected page and server function.
  • Packages you don’t need removed; the rest kept updated.
  • Error messages plain; logs free of passwords, tokens and personal data.
  • Only the personal data you need, and a way to delete it.
  • You know your Claude Code permission mode, and you read what it asks to run.
  • An expert has looked at anything involving money, sign-in or personal data.