More screenshots
Works with the AI Agents you already use
Launch Guard: Is Your AI-Built App Safe to Ship?
Pre-launch security check for AI-built apps: finds leaked API keys, open Supabase and Firebase data, fake-able Stripe webhooks and AI endpoints that run up your bill, then fixes them with you.
$5
Launch Guard: Is Your AI-Built App Safe to Ship?
Example session with this skill installed
I built this app with AI tools and I'm planning to launch it next week. Can you check whether it's safe to launch? I'm not a security expert, so please explain anything important in plain English.
- Read your context and instructions
- Compiled the launch guard
- Generated the app files
Launch check: InvoiceFlow
2026-11-03 · Next.js 14.1.0 (App Router), Prisma + PostgreSQL on AWS RDS, NextAuth (Google and email/password), Stripe, Anthropic, Resend, PostHog · 35 files checked · Launch Guard v1.0
Verdict: BLOCK (launch score 5/100)
If you launched today, a stranger could sign up as an administrator and download every user's details. They could also fake a Stripe "payment succeeded" message to mark any invoice paid or get Pro for free, or pay 50 cents on a $5,000 invoice and have it show as Paid. Bots could run up your Anthropic bill through the AI drafting feature, which works without a login. Start with items 1–3: each is a small code change, and together they take a couple of hours.
Fix before launch
1. Anyone can make themselves an admin when they sign up · CRITICAL
Where: app/api/register/route.ts:32 (...body), which unlocks app/api/admin/users/route.ts:6
What's wrong: The sign-up route copies everything the browser sends into the new account. That includes role and plan, which only you should control. Your sign-up form sends only name, email and password, but anyone can send their own request with extra fields. The automated scanners missed this; I found it by reading the code.
What could happen: A stranger can create an account with "role": "ADMIN" and "plan": "PRO" in a single request. They can then open /api/admin/users and download every user's name, email, business name, plan and Stripe IDs. They also get Pro without paying.
How to fix: Accept only the fields you expect, and never copy the whole request into the database call:
import { z } from 'zod'
const parsed = z.object({
name: z.string().max(100).optional(),
email: z.string().email(),
password: z.string().min(8).max(200),
}).safeParse(body)
if (!parsed.success) {
return NextResponse.json({ error: 'Please check your details' }, { status: 400 })
}
const { name, email, password } = parsed.data
// ...keep the duplicate-email check and bcrypt.hash(password, 12)...
const user = await prisma.user.create({
data: { name, email: email.toLowerCase().trim(), password: hashedPassword },
})
Then replace the login-signing secret (item 8), so any admin logins created this way stop working. Also run the admin check under "Check in your dashboards".
2. Anyone can fake a "payment succeeded" message from Stripe · CRITICAL
Where: app/api/webhooks/stripe/route.ts:10 (event = JSON.parse(body))
What's wrong: A webhook is the address Stripe calls to tell your app that a payment went through. Yours believes any message sent to it and never checks Stripe's signature. STRIPE_WEBHOOK_SECRET is set in .env.local, but no code uses it.
What could happen: Anyone who finds the address can send fake messages. One could mark any invoice as paid; a client who owes money could do this to their own invoice. Others could upgrade the sender's own account to Pro for free, or switch someone else's Pro plan back to Free. The subscription ID needed for that leaks through item 6.
How to fix: Verify the signature on the raw body before trusting anything:
import { stripe } from '@/lib/stripe'
let event: Stripe.Event
try {
event = stripe.webhooks.constructEvent(
body,
req.headers.get('stripe-signature')!,
process.env.STRIPE_WEBHOOK_SECRET!
)
} catch {
return NextResponse.json({ error: 'Invalid signature' }, { status: 400 })
}
Then make three smaller changes
- Skip any
event.idyou have already handled, because Stripe retries deliveries. - Mark an invoice paid only when
session.payment_status === 'paid'andsession.amount_totalequals the invoice total. - Handle
charge.refunded, so refunded invoices don't stay "Paid".
3. Whoever pays an invoice can choose the price · CRITICAL
Where: app/api/checkout/route.ts:39 (unit_amount: amount). The browser sends the amount from components/PayInvoiceButton.tsx:31.
What's wrong: The pay button tells the server how much to charge, and the server passes that number straight to Stripe. It only checks that the invoice exists and isn't paid yet. The currency, product name and email also come from the browser.
What could happen: A client can change one number in their browser and pay $0.50 on a $5,000 invoice. Stripe reports a successful payment and your app marks the whole invoice as Paid. The freelancer may never notice.
How to fix: Have the browser send only invoiceId. On the server, load the invoice with its client and build the charge from it:
- Charge
invoice.totalininvoice.currency. - Name the charge
Invoice ${invoice.number}. - Use
invoice.client.emailas the email.
Ignore any amount, currency, description or customerEmail in the request.
4. The AI drafting feature works for anyone on the internet · HIGH
Where: app/api/ai/draft/route.ts:28 (no login check), app/api/ai/draft/route.ts:37-38 (claude-opus-5-5, max_tokens: 8000)
What's wrong: This route calls Anthropic with your API key for anyone who sends it a request. It has three gaps:
- It doesn't check for a login. Your middleware doesn't cover
/api/ai. - It has no rate limit (a cap on how many requests one person can make).
- It doesn't limit how long the input can be.
What could happen: Bots that scan new sites for AI endpoints can call it in a loop and use your account as free AI. Each call can use one of Anthropic's most expensive models with up to 8,000 tokens of output. One script could run up a large bill within hours, and abuse can get your Anthropic account suspended.
How to fix: - At the top of the handler, call
const session = await getServerSession(authOptions)and return 401 if there's no user. - Add a per-user rate limit, for example @upstash/ratelimit with 20 drafts an hour.
- Reject prompts longer than about 2,000 characters.
- Lower
max_tokensto about 1,000 (a draft invoice is short), and consider a smaller, cheaper model. - Set a monthly spend limit in the Anthropic Console.
5. Invoice notes can run code in other people's browsers · HIGH
Where: app/invoice/[id]/page.tsx:124 (dangerouslySetInnerHTML={{ __html: invoice.notes }}). The notes are saved exactly as typed at app/api/invoices/route.ts:109.
What's wrong: The notes on an invoice go into the public invoice page as raw HTML. Anything a user types there becomes part of your page, including a hidden script. This is called cross-site scripting.
What could happen: Anyone with a free account can put a script in an invoice's notes. They can then use your app's own "Send" button to email the link to anyone, including you. When someone opens the link, the script runs on your site. It can show a fake payment or login form on your real domain. If the viewer is logged in to InvoiceFlow, it can also read and change their invoices.
How to fix: Clean the HTML before showing it. Install isomorphic-dompurify, then:
import DOMPurify from 'isomorphic-dompurify'
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(invoice.notes, {
ALLOWED_TAGS: ['p', 'br', 'strong', 'em', 'ul', 'ol', 'li'],
ALLOWED_ATTR: [],
}),
}}
The AI writes notes as HTML on purpose, so cleaning is better than removing HTML altogether. Security headers (under "Fix soon") add a second layer.
6. Invoice pages leak the freelancer's password hash and Stripe IDs · HIGH
Where: app/invoice/[id]/page.tsx:21-24 (include: { client: true, user: true }) and app/invoice/[id]/page.tsx:131 (<PayInvoiceButton invoice={invoice} />)
What's wrong: The page loads the freelancer's entire account record and hands it to the Pay button, which runs in the visitor's browser. Next.js copies everything passed to a browser component into the page. That includes:
- the password hash (the scrambled form of the password)
- the Stripe customer and subscription IDs
- the role and plan
The automated scanners missed this; I found it by reading the code.
What could happen: Anyone who opens an invoice link can view the page source and copy the freelancer's password hash. That means every client, and anyone they forward the link to. Weak passwords can be cracked offline. Someone who cracks one could log in as the freelancer and see all of that freelancer's clients and invoices.
How to fix: Pass the button only what it needs, for example <PayInvoiceButton invoiceId={invoice.id} total={invoice.total} currency={invoice.currency} />. This also fits the fix for item 3. Load the freelancer with user: { select: { name: true, businessName: true, email: true } }.
7. Any logged-in user can delete anyone's invoice · HIGH
Where: app/actions/invoices.ts:78 (prisma.invoice.delete({ where: { id: invoiceId } }))
What's wrong: The delete action is a server action: a function that runs on your server when a button is pressed, and that anyone can also call directly. It checks that someone is logged in, but not that the invoice is theirs. "Send" and "Mark paid" in the same file do check this. The scanner rated this medium because it wasn't sure. Reading the code confirms it, so I've rated it high.
What could happen: Invoice ids are in every payment link your app emails out. A client who received one could create a free account and delete the invoice they owe. It would then disappear from the freelancer's dashboard.
How to fix: await prisma.invoice.deleteMany({ where: { id: invoiceId, userId: session.user.id } }).
8. Your database password and login-signing key are typed into the code · HIGH
Where: lib/db.ts:9 (postgresql://invoiceflow_admin:****@invoiceflow-db.…rds.amazonaws.com…), lib/auth.ts:26 (secret: 'LN…A=', 44 characters)
What's wrong: Both are your real values; they match .env.local. They sit in files that are saved and shared along with the rest of your code. The second one is NextAuth's secret, the key that proves a login is genuine. Because it's typed into the code, setting a new NEXTAUTH_SECRET on your host would not replace it.
What could happen: Your code could be seen through a GitHub repository, a collaborator, or an AI tool you paste it into. Anyone who sees it could connect to your production database as invoiceflow_admin, if the database accepts connections from the internet. They could also create a valid login for any user, including an admin, without a password.
How to fix:
- Delete the
?? 'postgresql://…'fallback inlib/db.ts. - Delete the
secret:line inlib/auth.ts. NextAuth readsNEXTAUTH_SECRETfrom the environment on its own. - Change the database password (AWS RDS → your database → Modify → new master password).
- Generate a new signing secret with
openssl rand -hex 32. - Store both new values only in your host's environment variables. Everyone is signed out once, which is expected.
The scanner rated the database password critical. I've rated it high because this file only runs on your server and this folder isn't in git yet. If this code has ever been in a public repository, treat it as critical and change the password immediately.
9. Your live Stripe key and six other secrets aren't protected from git · HIGH
Where: .gitignore:29 (ignores only .env) and .env.local:11 (STRIPE_SECRET_KEY=sk_live_…). The same file also holds STRIPE_WEBHOOK_SECRET, ANTHROPIC_API_KEY, RESEND_API_KEY, GOOGLE_CLIENT_SECRET, NEXTAUTH_SECRET and DATABASE_URL.
What's wrong: .gitignore is the list of files git leaves out when you save and upload your code. Yours skips .env but not .env.local. The next git add ., or an AI builder syncing to GitHub, would upload all of these keys.
What could happen: Anyone who can see the repository would get these keys:
- your live Stripe key (refunds, payouts, customer data, new charges)
- your Anthropic key (AI usage on your bill)
- your Resend key (email sent as you)
- the database and login keys from item 8
How to fix: Add two lines to.gitignore:.env*and!.env.example. This folder isn't a git repository, so nothing has been committed from here. If the project also lives on GitHub or in an AI builder, rungit log --all --oneline -- .env.localthere. If anything prints, replace every key in the file: - Stripe: Developers → API keys → Roll key
- Anthropic: console.anthropic.com → API keys
- Resend: API Keys
10. Your version of Next.js has a known flaw that opens the admin list · HIGH
Where: package.json:19 ("next": "14.1.0"), middleware.ts:9, app/api/admin/users/route.ts:6
What's wrong: Next.js is the framework your app is built on. Version 14.1.0 has two published flaws that matter here:
- CVE-2025-29927 lets anyone skip
middleware.tsby adding one header to a request. Middleware is the file that checks logins before a request reaches your pages. Your admin route has no login check of its own, so it relies entirely on middleware. - CVE-2024-34351 is a server-action flaw. It can let attackers make a self-hosted server send requests on their behalf.
What could happen: If you host the app yourself, anyone could download your full user list without logging in. Youroutput: 'standalone'setting is typical for self-hosting. Vercel and Netlify block the middleware flaw at the platform level.
How to fix: Upgrade Next.js andeslint-config-nextto at least 14.2.25 (the latest release is better), then rebuild and test. Also check the role inside the admin route itself:
const session = await getServerSession(authOptions)
if (session?.user?.role !== 'ADMIN') {
return NextResponse.json({ error: 'Forbidden' }, { status: 403 })
}
11. No privacy policy or terms of service · HIGH
Where: the whole app (no /privacy or /terms pages, and no links to them)
What's wrong: InvoiceFlow creates accounts, takes card payments, and stores your users' clients' names, emails and addresses. It also sends data to Stripe, Anthropic, Resend and PostHog. Yet it publishes neither page.
What could happen: Apps that collect personal data are generally required to publish a privacy policy (GDPR in Europe, CCPA in California). Stripe asks for terms, a refund policy and contact details on your site before it pays you out. PostHog analytics may also need a cookie banner for visitors in the EU and UK.
How to fix:
- Add
/privacyand/termspages. Termly or iubenda are fine to start. - Name the services above in the privacy policy as companies that handle your users' data.
- Link both pages in the footer and next to the sign-up button, and show a contact email.
This is a checklist, not legal advice.
Fix soon (medium)
- Anyone with a free account can send unlimited emails from your address ·
app/actions/invoices.ts:12: "Send" and "Resend" have no limit. The sender and client names also go into the email's HTML exactly as typed. Spammers could useinvoices@invoiceflow.appfor phishing and get your Resend account or domain blocked.
Fix: cap sends per user per day (for example 20), make sure names are inserted as plain text rather than HTML, and require a verified email before an account can send.
No email check at sign-up and no limit on login attempts · app/api/register/route.ts:5, lib/auth.ts:45: bots can create unlimited accounts and guess passwords freely. Google sign-in also joins any existing account with the same email (lib/auth.ts:77). Someone could register a person's email first and keep access after that person signs in with Google.
Fix: rate-limit login and sign-up, confirm email addresses before an account can send invoices, and link a Google login only to an account whose email has been confirmed.
No security headers · next.config.js: other sites can show your dashboard inside a hidden frame to trick clicks (clickjacking). There's also no Content-Security-Policy to limit injected scripts like the one in item 5.
Fix: add async headers() to next.config.js with X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin and a Content-Security-Policy. Start the Content-Security-Policy in report-only mode.
Payment and email links fall back to localhost · app/api/checkout/route.ts:26, app/actions/invoices.ts:27, app/actions/billing.ts:36: if NEXT_PUBLIC_APP_URL isn't set on your host, emailed invoice links and Stripe's return pages point to http://localhost:3000 and break for everyone.
Fix: set it on your host, and stop the app at startup if it's missing.
Template title and description · app/layout.tsx:9: browser tabs and Google results show "Create Next App".
Fix: set a real title and a one-sentence description.
Build errors are switched off · next.config.js:5: TypeScript and lint errors are ignored, so real bugs can ship silently.
Fix: remove ignoreBuildErrors and ignoreDuringBuilds, run npm run build, and fix what it reports.
Polish (low)
No error monitoring: add Sentry (npx @sentry/wizard@latest -i nextjs) so you hear about crashes before users email you.
- No "page not found" page: add
app/not-found.tsxwith a link home. - No friendly error page: add
app/error.tsxandapp/global-error.tsxso a crash doesn't show a blank screen. - No "forgot password" option: people who sign up with email and password have no way back in if they forget it.
No robots.txt or sitemap: add app/robots.ts and app/sitemap.ts, and keep /dashboard, /api and /invoice out of search engines.
- No link previews: add an Open Graph title, description and image so shared links don't show up as bare URLs.
Check in your dashboards
- [ ]
Stripe → Developers → Webhooks: the live endpoint points to https://<your domain>/api/webhooks/stripe. Its signing secret should be the STRIPE_WEBHOOK_SECRET set on your host. Live and test mode have different secrets.
- [ ]
Stripe, how freelancers get paid: every invoice payment goes into your own Stripe balance, not the freelancer's. The code doesn't use Stripe Connect, Stripe's system for paying other businesses. Confirm with Stripe that this is allowed for your business, and decide how freelancers receive their money. This is a business and legal question, not a code bug.
- Anthropic Console → Settings → Limits: set a monthly spend limit.
- [ ]
AWS RDS → invoiceflow-db → Connectivity & security: "Publicly accessible" should be
No, or the security group should allow only your app's server. Confirm that automated backups are on.
- Your database, after fixing item 1: this query should list only accounts you set up yourself:
SELECT email, role, plan FROM "User" WHERE role = 'ADMIN' OR (plan = 'PRO' AND "stripeSubscriptionId" IS NULL); - [ ]
Resend → Domains: invoiceflow.app is verified with SPF and DKIM records (and DMARC), or invoice emails will land in spam.
- Google Cloud Console → APIs & Services → Credentials → your OAuth client: the authorized redirect URIs list only
https://<your domain>/api/auth/callback/google, plus localhost for development. - Your host's environment variables: all of these are set for production:
DATABASE_URLand the newNEXTAUTH_SECRETNEXTAUTH_URLandNEXT_PUBLIC_APP_URL, bothhttps://<your domain>(not localhost)- the live Stripe keys and
STRIPE_PRO_PRICE_ID ANTHROPIC_API_KEYandRESEND_API_KEYGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET
Checked and fine
- The Stripe publishable key (
pk_live_…) and PostHog key (phc_…) are meant to be public, and they're correctly inNEXT_PUBLIC_variables. - No secret reaches the browser.
lib/db.ts,lib/auth.tsandlib/stripe.tsare only imported by server code, and there are no built files in the folder. .env.examplecontains only placeholders.- The Pro upgrade (
app/actions/billing.ts) requires a login and uses the price set on your server. The?upgraded=1and?paid=1return links only show a message; they don't unlock anything. GETandPOST /api/invoicescheck the login and only touch the caller's own invoices. They also validate the input and work out totals on the server.- "Send" and "Mark paid" check that the invoice belongs to the caller. The dashboard checks the login itself instead of relying only on middleware.
- The Free plan's 3-invoice limit is enforced on the server. It holds once items 1 and 2 are fixed.
- Passwords are stored with bcrypt.
- Invoice pages are public to anyone with the link, by design. The ids are long and hard to guess.
- Cancelled subscriptions are moved back to Free, once item 2 is fixed.
- All database queries go through Prisma, with no SQL built from text. No CORS settings let other websites use your API.
- The landing page makes no claims (testimonials, logos, user counts) that need to be real.
- There are no Supabase or Firebase rules to check. Access control lives in your server code, which this check reviewed.
Not covered by this check
Dependency advisories: npm audit wasn't run, because there's no lockfile and installing packages was out of scope. Only the known Next.js flaws above were checked. Run npm audit --omit=dev after upgrading.
Git history: this folder isn't a git repository, so I couldn't see whether .env.local or the keys in items 8 and 9 were ever committed or pushed somewhere else.
- Live settings in Stripe, AWS, Anthropic, Resend, Google and your host. See the dashboard checklist.
Running the app: the app wasn't run; everything here comes from reading the code. Load testing, a professional penetration test and legal review are also not included.
Next step
Reply "fix the critical issues" (or name any item) and I'll fix them one at a time, asking before each change, then re-run the checks.
PayInvoiceButton.tsx
ZIP · project files
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Is your AI-built app safe to launch?
Apps built with Lovable, Bolt, v0, Replit, Cursor or Claude Code work, but they ship with predictable holes:
- keys in browser code
- databases anyone can read
- payment webhooks that believe whoever calls them
- AI endpoints that bots drain overnight
These holes hide in config files, database migrations, env files and dashboard settings, not in a single function.
Launch Guard checks all of those places, the same way every time. It proves every finding in your code and gives you a plain-English verdict: SHIP, FIX FIRST or BLOCK, with a launch score and a fix plan.
What it checks
- Leaked secrets. 20+ key formats in your code; secrets behind
VITE_/NEXT_PUBLIC_variables;.envfiles git would upload; keys inside your built website; hardcoded database passwords and login secrets. - Database access.
- Supabase tables without Row Level Security
- policies open to everyone or to "any logged-in user"
- users who can give themselves Pro, credits or admin
- open storage buckets and upload policies, and views that bypass security
- Firebase rules left in test mode
- Server endpoints.
- every API route, server action and edge function, listed with its login status
- Stripe webhooks that don't check signatures, and checkout prices set by the browser
- AI endpoints anyone can call
- admin routes without a login, and missing ownership checks
- SQL and HTML injection, and risky CORS settings
- Launch basics.
- template titles and leftover Lovable or v0 branding
- missing privacy and terms pages
localhostURLs, hidden build errors, broken mobile layout- 404 and error pages, security headers, monitoring
- known critical Next.js flaws
What you get
- A verdict and a launch score, with fixes ordered from most to least dangerous, each with its file and line.
- What could happen, in plain words: whose data, whose money, how fast.
- A dashboard checklist for what code can't show, including the exact SQL to paste into Supabase and the settings to confirm in Firebase, Stripe and your AI provider.
- A "checked and fine" list, so you can see what was reviewed and why it's OK.
- Guided fixes. Say "fix the critical issues" and your agent fixes them one at a time, asking before each change, then re-runs the checks and shows the new score.
No false alarms about keys that are meant to be public
The Supabase anon key, the Firebase web config and Stripe publishable keys belong in browser code. Launch Guard knows this, and it checks every scanner finding in the code before reporting it.
How it was tested
- Separate agents built three realistic test apps (Next.js + Prisma + Stripe, Vite + Firebase + Express, and a well-built Next.js + Supabase control app) and planted 25 problems in them.
- The result: Launch Guard found all 25, with no false alarms across 36 decoys.
- Compared with the same AI model without it: the plain review found 23 of 25. It missed a broken mobile layout and a missing 404 page, and wrote its report in a different format each time.
Safe by design
- Nothing to install. Four read-only scanners, each a single file with no dependencies.
- Read-only, inside your project folder. The scanners read only files there. They make no network requests and start no other programs, and secrets are always printed masked.
- No silent changes. Fixes happen only with your approval. Nothing is ever run against your production database, and git history is never rewritten without asking.
Works with
- Frameworks: Next.js (App and Pages Router), Vite/React, SvelteKit, Nuxt, Astro, Express and Flask.
- Services: Supabase, Firebase, Prisma, NextAuth, Clerk, Stripe, Lemon Squeezy, OpenAI, Anthropic and Gemini.
Just want to check for leaked keys? Start with the free Launch Guard Lite.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
- It reviews the code and config in your project. Settings that live only in your Supabase, Firebase, Stripe or hosting dashboards come as a checklist for you to confirm.
- The scanners use patterns and can miss unusual code. The agent verifies findings and reviews key areas by hand, but this is not a substitute for a professional penetration test.
- Checking dependencies for known vulnerabilities (
npm audit) needs network access and a lockfile. - It works best on JavaScript and TypeScript stacks. Python (Flask, FastAPI) gets the secrets, injection and endpoint checks, with fewer framework-specific ones.
- The legal-page checks are a checklist, not legal advice.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Software
Node.js 18+@sentry/wizard
- Optional
Git
Nothing to install: four single-file Node.js scanners with no dependencies. They read only your project folder and make no network requests.
Permissions
File Scopes
Read files: the scanners and your agent read your project to audit it. Run local scripts: four Node.js scanners. They are read-only, start no other programs and make no network requests. Write files: only when you approve a fix, or when you ask your agent to save the report as LAUNCH-CHECK.md. No network access is needed.