Security check for apps built with AI
Find the holes in your app before a stranger does.
Preflight is a free guide your AI coding agent follows. It hunts for the spots where one mistake could cost you money, customer data or control of your app, fixes them, and proves every fix with a test.
Read https://zirkomirko.com/tools/preflight/agent.md and run a security preflight on this project.
- Free, MIT licence
- No sign-up
- Runs on your own machine
- 39 check modules
Scroll to watch it work
01 How to read the map
This landscape is your app.
Sign-up, payments, uploads, the database, the AI chat: everything you built sits somewhere on this ground.
- Tall peak = big damage. The higher it is, the worse things get if someone abuses that spot. Scored 0 to 10.
- Red = an open hole. Someone could walk in today.
- Green = fixed, with a test that proves it.
02 The survey
First it looks. It changes nothing.
Your agent reads the project and notes what's there: database, logins, payments, hosting, secret keys. Then it tells you in plain English which of its 39 check modules apply to you, and asks permission once.
- Lookread-only
- Askone message
- Checkevery path traced
03 Hole one · payments
Anyone can fake a payment.
Open · 9.1 criticalFixed · test passesUnsigned payment webhook
- The problem
- Stripe tells your app "this person paid" by calling a web address. If the app doesn't check that the call really came from Stripe, anyone can call it and give themselves Pro for free.
- How it's found
- The agent follows the payment code from the web address to the database and looks for the signature check.
- The fix
- Verify Stripe's signature, reject repeats, and only then grant access.
- The proof
- A test sends a forged payment. It works before the fix and gets rejected after.
04 Hole two · customer data
Any user can read everyone's data.
Open · 8.8 criticalFixed · test passesDatabase open to every user
- The problem
- Row security is off on a table, so the public key inside your website can read every user's rows, not only their own.
- How it's found
- The agent lists every table and its rules, then writes down who can read what.
- The fix
- Turn row security on, with rules so each user reaches only their own rows.
- The proof
- A test signs in as user A and asks for user B's data. Before: it gets it. After: nothing. If the proof can't run on your machine, the agent says so instead of pretending.
05 Hole three · control
Anyone can open the admin page.
Open · 7.7 highFixed · attack blockedAdmin route trusts the browser
- The problem
- The admin page trusts a flag sent by the visitor's browser. Anyone can send that flag.
- How it's found
- Every page and API gets a row: who may call it, and where that is enforced. An empty cell is a finding.
- The fix
- Check the role on the server, from the signed-in session, on every admin route.
- The proof
- The agent replays the request as a normal user on your machine. It now gets "forbidden".
06 Your part
A few things only you can do.
Dashboards, billing settings, DNS and secret keys live outside your code. The agent can't click those for you, so it hands you a short checklist in plain words: what to change, where, and why.
- Rotate the Stripe key that sat in git history
- Turn on two-factor login for your hosting account
- Set a spending limit on your AI API key
07 Cleared
Cleared for launch.
What's left is low ground you know about. The agent writes it all down: what was fixed and proven, what's still open and the risk you're carrying, and a gate that re-checks before every deploy.
From one blind test on a practice app with 109 planted problems. Nothing is ironclad. Read the full results.