Web application security audit for AI-built apps

A web application security audit is a review of how your app is built, to find the ways someone could read data they should not, spend your money or take over accounts, ranked by risk and then fixed. I’m Mo Tawfik Khalifa, chief product officer and forward deployed engineer at Instruxi. I review and harden apps built with AI, the way I check my own builds before launch, then fix what I find and check it again.
AI writes code that works and rarely checks who else can use it. In July 2025, Veracode tested more than 100 AI models on 80 coding tasks, and when a task could be written safely or unsafely, the models chose the unsafe way 45% of the time (Veracode, 30 July 2025). In a 2025 scan of 1,645 apps from one AI app builder’s public showcase, 170 had database tables anyone could read or write, because Row Level Security was missing or wrong (Matt Palmer’s statement; the builder disputes the CVE).
Worried someone else can see your users’ data?
These are the worries founders with AI-built apps write down, in their own words, and what I do about each one.
“Auth flows leaked data because RLS was never set up”A founder after real users arrived, r/vibecoding
Data rules are the first thing I check, on every table. I sign out, or sign in as a second test user, and ask the database for someone else’s rows. If they come back, it goes to the top of the list.
“how do you know? it’s a private project.”A builder told his table was readable by anyone, r/vibecoding
A private repository does not make a private app. The public database key ships inside the app, so anyone can open the browser’s developer tools and use it. This is the test, with two made-up users: Sarah is user A, Tom is user B.
Can Tom read Sarah’s order?Two people signed in to the same shop app, in two browsers. Tom uses only the public key that ships in the app.
SSigned in as Sarah (user A)
My orders
TSigned in as Tom (user B)
My orders
[
{ "id": 1043, "name": "Tom Reid", "address": "9 Mill Lane, Bristol" },
{ "id": 1042, "name": "Sarah Hughes", "address": "14 Elm Road, London" }
]Leak. Tom just read Sarah’s name and home address. Anyone with the public key can do the same, without signing in.orders table: Row Level Security off, no policy
“I found myself getting paranoid every time I hit deploy on a new project.”A solo developer before launch, r/Supabase
Every finding is retested the same way it was found, and marked closed or open in writing. You also get the short list of checks to run before each release, so the next deploy does not reopen the hole.
380,000 publicly accessible assets built with Lovable, Base44, Replit and Netlify, about 5,000 of them holding sensitive company data.RedAccess, a security vendor, as reported by Axios, May 2026
I check for the same thing in your app, and I have published the Supabase settings that leak data, with the fix for each.
What you get
- A price fixed in writing after the first call, before work starts.
- Findings ranked by risk, fixed by me or handed to your team as a plan, then retested in writing.
- The person you talk to is the person who checks your app.
What is a web application security audit?
It is a structured review of a web app’s code, configuration and data rules against a known standard, by someone with access to all three. You get a list of findings ranked by risk, and a way to close each one. For an AI-built app it looks hardest at the places a demo never tests: who else can read the data, where the keys ended up, and what the AI agents are allowed to do.
I work from two free references published by OWASP, a vendor-neutral non-profit:
- OWASP Top 10:2025, the ten risk categories that cause most web app breaches. Broken access control is number one, software supply chain failures number three, and security logging and alerting failures number nine.
- OWASP ASVS, the Application Security Verification Standard. Version 5.0.0 (released May 2025) sets out testable requirements in 17 chapters and three levels. ASVS describes Level 2 as the level “most applications should be striving to achieve.”
Every finding I write up maps to an ASVS chapter, so your team, a future tester or an enterprise customer’s security questionnaire can follow it.
What gets checked?
Eight areas, in the order the risk usually sits in an app built with Lovable, Bolt, Replit, v0, Cursor, Claude Code, Codex or Gemini CLI on top of Supabase, Firebase, Vercel and Stripe:
- Data rules and RLS. Row Level Security on every table, no
using (true)on private data, views that respect it, roles read from data users cannot edit. Checked by signing out and calling the API with only the public key. The SQL is in my Supabase security checklist. - Exposed keys. Secret keys in the browser bundle, the git history or a public repo. Anything found gets rotated first, then cleaned up.
- Sign-in and sessions. Where the staff or admin check runs, password reset, one-time codes, email confirmation and session expiry.
- Storage buckets. Private by default, a folder per user, a policy per folder, file types checked on the server.
- Webhooks and payments. The signature checked on the raw body, each event handled once, and orders marked paid by the webhook, never by the thank-you page.
- Rate limits. Login, sign-up, reset, anything that sends email or texts or calls a paid AI API, plus spend caps in each provider.
- AI agent and MCP permissions. What each agent and MCP server can reach, scoped tokens, pinned versions, and a person approving deletes, sends and payments. That includes the coding agent that built the app, which has a shell and your keys. See my MCP security checklist and how to stop an agent deleting your database.
- Logging. Sign-ins, failed sign-ins, permission errors and admin actions recorded, no passwords or tokens in the logs, and an alert when errors spike.
Dependencies, error messages, CORS and backups come along too. The full list is my vibe coding security checklist, 13 checks a founder can run alone.
Answer eight questions about your app on the sheet below and the register ranks what an audit would look at first. With the defaults, an AI-built app that talks to Supabase from the browser, with staff roles and payments, the data rules and the keys come first.
Scope your audit on one sheet.Tick one box for each question. The register ranks what I would look at first, and why.
Security review
Scoping sheet and findings register
- Ref.
- SR-0418
- Status
- Before first call
- Basis
- OWASP ASVS 5.0
- Page
- 1 of 1
02Findings register, ranked
Look at first: Data rules and RLS, Exposed keys and Webhooks and payments.2 answers were Not sure. Each one counts as yes until it is checked.
- 01Data rules and RLSSign out and call every table with the public key. RLS on, no using (true), views set to security_invoker, roles read from app_metadata.ASVS V8 Authorization · OWASP A01:2025High5 × 5 = 25
- 02Exposed keysSearch the built JavaScript and the git history for secret keys. Rotate anything found before cleaning up.ASVS V13.3 Secret managementHigh5 × 5 = 25
- 03Webhooks and paymentsSignature checked on the raw body, each event handled once, orders marked paid by the webhook and never by the thank-you page.ASVS V2.3 Business logic securityHigh4 × 5 = 20
- 04AI agent and MCP permissionsWhat each agent and MCP server can reach. Read-only first, scoped tokens, pinned versions, a person approving deletes, sends and payments.OWASP Top 10 for Agentic ApplicationsHigh4 × 5 = 20
- 05Sign-in and sessionsWhere the staff or admin check runs: on the server, from data users cannot edit. Password reset, one-time codes, session expiry.ASVS V6 Authentication, V7 Sessions · OWASP A07:2025High5 × 4 = 20
- 06Rate limitsLimits on login, sign-up, reset and codes, and on anything that sends email or texts or calls a paid AI API. Spend caps in each provider.ASVS V2.4 Anti-automationHigh4 × 4 = 16
- 07LoggingLog sign-ins, failed sign-ins, permission errors and admin actions, with no passwords or tokens, and an alert when errors spike.ASVS V16 Logging · OWASP A09:2025Medium4 × 3 = 12
- 08Storage bucketsNo uploads today: confirm no bucket is public and nothing else writes files.ASVS V5 File handlingLow1 × 4 = 4
A starting order, not a quote and not a test result. We set the real scope on a first call.
What do you receive?
- Findings ranked by risk. Each one says where it is, how I confirmed it, what it would let someone do, its likelihood and impact, and the ASVS requirement it maps to. Plain English first, the technical detail under it.
- Fixes applied, or a fix plan. I can fix in your repository with a test for each finding, or hand your team the plan in order of risk, with the code or SQL for each step.
- A retest. Every finding checked again the same way it was found, and marked closed or still open, in writing.
You also get a short note on keeping it closed: the checks to run before each release, automatic dependency updates, and limits on the coding agent so the next prompt does not reopen the hole.
Do you need a penetration test or a security audit first?
They answer different questions, and most teams with an AI-built app need the audit first.
- Security audit. A review from the inside, with access to the code, the configuration and the database rules, against a standard, then fixed and retested. Best before launch, after a fast AI build, and before you pay for a pentest.
- Penetration test. An authorised attack on the running app by a tester working like an outsider, within agreed rules, who reports what they got through. ASVS notes that traditional penetration testing reports issues “by exception,” listing only failures. Best before a big launch, for an enterprise customer’s security review, and for compliance.
- Code review. Reading changes for bugs and quality, usually pull request by pull request. Security is one part of it, and it rarely covers the database rules or the hosting settings.
To be plain about what I do: this is a security review and fix of the build, covering the code, the data rules, the keys, sign-in, payments and AI agent permissions. It is not a certified penetration test, and I am not a certified penetration tester.
If you need a formal penetration test or a compliance attestation, hire an accredited firm. Common marks are company accreditation from CREST (members are listed on its marketplace), hands-on tester certifications such as OffSec’s OSCP, and in the UK, the NCSC’s CHECK scheme for public sector and critical national infrastructure systems. Check any claim on the accrediting body’s own register. OWASP itself “does not certify any vendors, verifiers, or software,” so an “ASVS certified” badge is a vendor’s claim (ASVS 5.0, assessment and certification).
The order that saves money: fix the build first, then commission the pentest, so the tester spends their days on the hard problems and not on an open table.
How long does a security audit take?
- Access and scope. Read-only access to the repository, the hosting and the database project, and a list of the flows that matter.
- First pass on the high-risk areas, in the order the register above gives.
- Findings written up and ranked, and talked through with you.
- Fixes, by me or by your team.
- Retest, then the note on keeping it closed.
The self-check in my vibe coding security checklist takes an afternoon for a small app. A full review with fixes and a retest takes longer, and the number of user roles, payment paths and AI agents sets how much. I give you a date after the first call.
What have I published on app security?
Most of my work at Instruxi is under NDA, so I can’t name the clients, and their findings stay private too: I never discuss one client’s vulnerabilities with anyone else. What I can show is the method, published in full.
13 checks a founder can run in an afternoon: secrets, auth and RLS, input, rate limits, dependencies, keys, uploads, backups and the agent. The list I run before anything goes live.
Checklist · SupabaseThe Supabase settings that leak data, and the fix for each12 fixes with SQL you can paste. I have moved apps onto Supabase and fixed database security on live ones, and the same settings come up every time.
Checklist · AI agentsMCP security checklist12 checks before you connect an AI agent to your tools, ranked by risk: tool poisoning, token passthrough, over-broad scopes and unpinned servers.
Guardrails · Coding agentsHow to stop an AI coding agent deleting your databaseDeny rules, a read-only database user, backups you have restored, and a guard that asks a person first.
Migration · Data rulesMoving from Firebase to SupabaseAuth, data, storage and cutover, with Row Level Security switched on before anyone can reach the API.
Production · AI-built appsWhere vibe-coded apps break in productionSign-in, data rules, secrets, payments and scale: the parts a demo never touches, and the order I fix them.
I also lead product for GVNR at Instruxi, a free and source-available guard that decides allow, deny or ask a person before an AI agent acts, and keeps a hash-chained record of every decision. It works with Claude Code, Cursor, Codex, Gemini CLI and any MCP client. And I built Laqtaa alone with AI: about 100 guests used it on the day and nothing broke.
If the review shows the app needs rebuilding rather than patching, that is MVP development. If the bigger question is where AI belongs in your business, see AI consultant who ships.
How much does a web application security audit cost?
Security reviews and penetration tests are priced by the day or as a fixed scope. The size of the app, the number of user roles, the payment paths and whether fixes are included set the price.
- Cyphere, a UK security testing firm, puts web application penetration tests in the UK in 2026 at £2,500 for limited-scope assessments, rising past £50,000 for enterprise platforms (Cyphere’s 2026 cost guide).
- UK contract ads for penetration testers in the six months to 17 October 2026 had a median day rate of £675, up 22.73% on a year before, from 40 ads (IT Jobs Watch).
- In the US, employed information security analysts had a median pay of $129,180 a year in May 2025 (US Bureau of Labor Statistics). That is salary, not what a firm bills you.
I price each review after a first call, from the size of the app and whether I fix or hand over a plan.
Questions people ask
What is a web application security audit?
A review of how a web app is built, from the inside, against a known standard such as the OWASP Top 10 and OWASP ASVS. It finds the ways someone could read data they should not, spend your money or take over accounts, ranks each finding by risk, and ends with fixes and a retest.
Is a security audit the same as a penetration test?
No. An audit reviews the code, configuration and data rules with full access, and fixes what it finds. A penetration test is an authorised attack on the running app by an accredited tester, who reports what they got through. Many teams need both, the audit first.
How much does a web application security audit cost?
A UK security testing firm’s 2026 guide puts web application penetration tests in the UK at £2,500 for limited scope, rising past £50,000 for enterprise platforms. UK contract ads for penetration testers had a median day rate of £675 in the six months to 17 October 2026, per IT Jobs Watch. That is market data, not my rate. I price each review after a first call.
How long does a security audit take?
The self-check in my vibe coding security checklist takes an afternoon for a small app. A full review with fixes and a retest takes longer, and the number of user roles, payment paths and AI agents sets how much. I give you a date after the first call.
Do you fix what you find?
Yes, if you want me to. I fix in your repository with a test for each finding, or hand your team a fix plan in order of risk. Either way, every finding is retested the same way it was found.
Can you audit a Supabase or Firebase app?
Yes. I have moved apps onto Supabase and fixed database security on live ones. Row Level Security, policies, views, storage and keys are the first things I check, and I have published the checklist with the SQL.
Can I ask the AI to check its own code?
Yes, as a first pass. Then check the results the way an attacker would: sign out and call your API, search the built JavaScript for keys, upload a file you should not be allowed to. The model that wrote the hole is not the best judge of whether it is closed.
- 30-minute call. Your app, your users, what worries you.
- A written plan in 48 hours. What to check first, how long it takes, the risks.
- Start, or not. Use the plan with your team or with me. I reply to every email within one working day.
If you need an app checked and fixed before launch, write to m@tawfik.tv with what it does and what it is built on.