Menu

1 / 2

Six security holes I check for before a Supabase + Stripe app goes live (with the fix for each)

DEV Community: nextjs·Sunnatulla·9 days ago
#NpxnsnFQ
#devtonextjs#devto#dev#policy#article
Reading 0:00
15s threshold

Apps built fast with Lovable, Bolt, Cursor or Claude Code tend to break in the same few places. The UI works, the demo looks great, and then one of these six things is sitting in the repo. I wrote a small free checker for them, vibe-preflight (my own open-source project, MIT), and this post is the list it checks, with the fix for each one.

All the code below is from a small demo app I wrote on purpose to be broken. Here is what the scanner says about it:

$ node preflight.mjs examples/broken-app

error src/app/api/stripe/webhook/route.ts:8 Handles Stripe events without `constructEvent`, so any POST is trusted. [stripe-webhook-unverified] error src/components/admin-notes.tsx:7 admin-notes.tsx runs in the browser and uses `SUPABASE_SERVICE_ROLE_KEY`. [server-secret-in-client] error src/lib/stripe.ts:3 `NEXT_PUBLIC_STRIPE_SECRET_KEY` looks like a secret and is exposed to the browser.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.