# Preflight > A free, MIT-licensed security guideline that an AI coding agent runs on the user's own project. The agent maps the project, builds a short threat model, asks permission once, runs the checks that apply, fixes what the user approves with small changes, adds a regression test for every critical and high fix, replays the attack against the app running locally to prove the fix, and hands over an exact list of manual steps. Scope: the user's own code, config and infrastructure only. Defensive and legal only. Attack replay happens only against the user's app on localhost. Checks on a deployed URL are passive, need the owner's consent, and are capped at 30 ordinary requests. No exploitation, fuzzing, brute force or load testing of anything live. Secret values are never printed or moved. ## Start here - [agent.md](https://zirkomirko.com/tools/preflight/agent.md): the protocol and hard rules. Read this first and follow it in order. - [checks.json](https://zirkomirko.com/tools/preflight/checks.json): index of 39 modules (392 checks) with triggers, so you fetch only what applies. - [prove.md](https://zirkomirko.com/tools/preflight/prove.md): how to turn a finding into a test that attempts the attack, and how to replay it locally. ## Who gets in - [Access control: the route x role x ownership matrix](https://zirkomirko.com/tools/preflight/checks/access.md): A table of every door into your server: who may use it, whose data it opens, and where the lock is. - [Accounts: passwords, reset, magic links, verification, MFA](https://zirkomirko.com/tools/preflight/checks/auth.md): Every way into an account, and what happens when someone guesses a million times. - [Sessions, cookies, JWTs and CSRF](https://zirkomirko.com/tools/preflight/checks/sessions.md): Whether the pass your app hands a logged-in browser can be forged, stolen or used forever. - [OAuth, OIDC and social login](https://zirkomirko.com/tools/preflight/checks/oauth.md): Sign in with Google or GitHub: redirect addresses, account linking and where users land afterwards. - [Hosted auth: Clerk, Auth0, Supabase Auth, Auth.js, Firebase Auth](https://zirkomirko.com/tools/preflight/checks/auth-providers.md): The settings and server calls that are still yours when a service runs your login. ## What attackers send - [Injection: SQL, NoSQL, command, path, template, deserialization, XXE, prototype pollution, ReDoS](https://zirkomirko.com/tools/preflight/checks/injection.md): Typed text that gets treated as a database command, a program to run or a file to open. - [Server-side requests and cloud metadata (SSRF)](https://zirkomirko.com/tools/preflight/checks/ssrf.md): Making your server fetch an internal address and hand over what it finds, including cloud keys. - [In the browser: stored and DOM XSS, open redirects, framing, postMessage](https://zirkomirko.com/tools/preflight/checks/browser.md): Someone else's script running on your pages as your users. - [API surface: validation, CORS, GraphQL, errors, inbound webhooks](https://zirkomirko.com/tools/preflight/checks/api.md): What your server accepts, what it gives away in errors, and which websites may use it. ## Money and abuse - [Payments, webhooks and entitlements (Stripe, Lemon Squeezy, Paddle)](https://zirkomirko.com/tools/preflight/checks/payments.md): Getting the paid plan for free, changing the price, or sending a fake or repeated payment message. - [Business logic, races and double spend](https://zirkomirko.com/tools/preflight/checks/logic.md): Negative amounts, coupons used twice, and two clicks at the same moment. - [Abuse and cost: rate limits, bots, SMS and email pumping, denial of wallet](https://zirkomirko.com/tools/preflight/checks/abuse.md): Scripts that make you pay: endless AI calls, thousands of text messages, fake sign-ups. ## Data and secrets - [Secrets and env files](https://zirkomirko.com/tools/preflight/checks/secrets.md): Keys and passwords saved in code, git history, build files or the part of the app visitors download. - [What ships to the browser: keys, source maps, verbose errors](https://zirkomirko.com/tools/preflight/checks/client.md): Everything a visitor can read by opening your page's code. - [Database: exposure, privileges, ORM pitfalls, backups](https://zirkomirko.com/tools/preflight/checks/database.md): Whether the database is reachable from outside, how much power the app has in it, and whether you can restore it. - [Uploads and file processing](https://zirkomirko.com/tools/preflight/checks/uploads.md): Who can upload what, where it lands, who can open it, and booby-trapped files. - [Personal data: inventory, retention, logging, GDPR/CCPA, PCI scope](https://zirkomirko.com/tools/preflight/checks/privacy.md): What you keep about people, where it flows, how long it stays, and what your logs give away. ## Platform playbooks - [Next.js](https://zirkomirko.com/tools/preflight/checks/nextjs.md): Server actions anyone can call, middleware that misses routes, and data that leaks into the page. - [Supabase](https://zirkomirko.com/tools/preflight/checks/supabase.md): The rules on each table that keep people out of each other's data, read one by one. - [Firebase](https://zirkomirko.com/tools/preflight/checks/firebase.md): The rules file that decides what each visitor may read and write. - [Express, Fastify, NestJS, Hono](https://zirkomirko.com/tools/preflight/checks/node.md): Locks that have to be added on purpose, and that must run before the code they protect. - [Django, FastAPI, Flask](https://zirkomirko.com/tools/preflight/checks/python.md): The framework's production switches, and whether every endpoint asks who is calling. - [Rails and Laravel](https://zirkomirko.com/tools/preflight/checks/rails-laravel.md): Skipped filters, editable fields that should not be, and queries written by hand. - [Hosting: Vercel, Netlify, Cloudflare, VPS. Headers, exposed files, the live look](https://zirkomirko.com/tools/preflight/checks/hosting.md): Secure connection, browser safety headers, private files handed out by accident, and your host's own safety settings. ## Infrastructure and pipeline - [Cloud and infra: IAM, buckets, Docker, IaC, open databases, backups](https://zirkomirko.com/tools/preflight/checks/cloud.md): What the machine's keys can do, open buckets and databases, and whether you could rebuild from a backup. - [Dependencies and supply chain](https://zirkomirko.com/tools/preflight/checks/dependencies.md): Known holes in the packages you use, look-alike packages, and code that runs just by being installed. - [GitHub and CI](https://zirkomirko.com/tools/preflight/checks/ci.md): Keys held by build and deploy robots, strangers' pull requests, and who can push to the live branch. - [Domain and email: SPF, DKIM, DMARC, takeover, CAA, HSTS preload, cookie scope](https://zirkomirko.com/tools/preflight/checks/domain.md): Email that pretends to be you, forgotten subdomains a stranger can claim, and cookies shared too widely. ## AI features and agents - [LLM features: prompt injection, output handling, leakage, cost](https://zirkomirko.com/tools/preflight/checks/ai.md): Your AI key at someone else's service, text that tricks the model, and one customer's data in another's answer. - [Agents, tools and MCP](https://zirkomirko.com/tools/preflight/checks/agents.md): What each tool the model holds can touch, and which actions need a human to say yes. ## Other surfaces - [Mobile apps](https://zirkomirko.com/tools/preflight/checks/mobile.md): Keys inside the app file, links that log people in, and servers that take the app's word. - [Electron and Tauri](https://zirkomirko.com/tools/preflight/checks/desktop.md): A web page with the keys to the whole computer. - [Browser extensions](https://zirkomirko.com/tools/preflight/checks/extension.md): How much power the extension asks for, and whether web pages can give it orders. - [Wallets and on-chain actions](https://zirkomirko.com/tools/preflight/checks/web3.md): Where keys live, what people are asked to sign, and whether a payment really happened on-chain. - [WebSockets, cron jobs and queues](https://zirkomirko.com/tools/preflight/checks/realtime.md): Live connections, timers and background workers: the doors no page links to. ## Operate and prove - [Logging, alerting and the incident runbook](https://zirkomirko.com/tools/preflight/checks/ops.md): Noticing quickly when something is wrong, and knowing which buttons to press in the first hour. - [Secret rotation steps per provider](https://zirkomirko.com/tools/preflight/checks/rotation.md): Exact steps to replace a leaked key at Stripe, Supabase, OpenAI, Anthropic, AWS, GitHub and others. - [Go beyond the list](https://zirkomirko.com/tools/preflight/checks/beyond.md): How this particular app works, step by step, to find what a checklist would not know to ask. - [Pre-deploy gate](https://zirkomirko.com/tools/preflight/checks/predeploy.md): A final yes-or-no list, plus a SECURITY.md and a script that blocks a risky deploy. ## Templates - [SECURITY.md](https://zirkomirko.com/tools/preflight/templates/SECURITY.md): posture file the agent leaves in the project. - [INCIDENT.md](https://zirkomirko.com/tools/preflight/templates/INCIDENT.md): one-page incident runbook. - [preflight-gate.mjs](https://zirkomirko.com/tools/preflight/.txt): pre-deploy gate script. ## Proof - [test-results.md](https://zirkomirko.com/tools/preflight/test-results.md): how the guideline scored on a test app with planted problems. - [example-report.md](https://zirkomirko.com/tools/preflight/example-report.md): the report from that run. ## Human page - [Preflight](https://zirkomirko.com/tools/preflight/)