@MoneyWithRoland One gap in that stack shows up at checkout: Lovable or Bolt will often mark an order paid on the success page redirect, and anyone can open that URL. Set paid only in the webhook, after checking its signature. Same rule for Stripe, Lemon Squeezy or Paddle.
@leventslw What does the agent do when a new table throws permission denied? On Supabase's Oct 30 locked-down defaults, new tables have no anon or authenticated grants, and agents tend to add the grant before RLS exists. Safer order: enable RLS, write policies, then grant.
@matthewfowles With health data there's often a second leak after the tables get RLS: a Storage bucket the agent set to public so previews would load. Every uploaded file then sits at a URL anyone can open. Do you check buckets in those reviews, or just the database?
@eugenesergio Fair point: no network calls means nothing to leak, and that's the best fix. Honest answer: I don't have a clean rate for IPAs. Most of what we scan is web builds, where a service_role key in the client bundle turns up more often than it should.
@dreamsvinesh And prompt forty-one is where it goes wrong: the agent marks the order paid on the success page redirect. Anyone can open that URL. Only flip paid inside the webhook, after checking the signature against the raw request body. Did yours verify it, or just parse the JSON?
@lanze_codes Worth checking after any AI auth change: Postgres views run as the owner by default and skip RLS unless created with security_invoker = true. Has a quiet change like that bitten you?
@harden_369741 Secret checks help, but they miss the quiet ones: RLS with using (true), and a service_role key that somehow landed client-side. Before you share that live link, open the app logged out and try a select. What did Cursor's checks flag on your first run?
@arrowdotai Exactly. Speed without ownership is how silent DB issues sneak in. Before more users: every table needs RLS tied to auth.uid(), and no service_role key sitting in the client bundle.
@VamsiBuilds Handy for agents. Watch the install path: if the Runway (or any media) key lands in NEXT_PUBLIC_ / VITE_, it ships in the JS every visitor downloads. Keep API keys server-side only. Are you calling Runway from a server route or the client?
@thaw_tran True both ways. One bug AI still ships a lot: RLS enabled with using (true). Dashboard looks locked; any anon key reads every row. Quick check: open the app logged out and try a select. Are you seeing that more than missing policies?
@Magnosud@vercel Vercel catches a lot, but agents still love NEXT_PUBLIC_ / VITE_ on a secret. That ships the key in the JS bundle — and a service_role there skips RLS entirely. Do you grep the built bundle before deploy?
@huzaifi__ Agree. The sneaky version: RLS shows enabled but the policy is using (true). Dashboard looks locked; table is open. Quick check: open logged out and try a select. Views need security_invoker = true on Postgres 15+ too.
@MichaelABarroso Solid guide. One trap after RLS is "on": a policy of using (true) still lets anyone with the publishable key read every row. Tie it to auth.uid() = user_id. For the shared dog park table, how are you scoping who can read other pups?
@justin_butlion Good luck. One gotcha before first real charge: only mark a plan paid from a verified Stripe webhook (raw body + signature). Never from the success page — anyone can open that URL. Are you on Checkout or Payment Element?
@theta_ai_takes Owning it starts with knowing what got exposed. Quick check: search the built JS for a service_role key. If the AI put it in a NEXT_PUBLIC_ or VITE_ variable, every visitor has a key that skips RLS. Do you review env vars before deploy?
@Stringcoding Agreed, and the anon key isn't a secret either, it ships to every browser. One easy miss even with policies on: views run as their owner by default, so they can skip RLS. On Postgres 15+, create them with security_invoker = true.
@RoenBlackwood One hole that shows up a lot in those demos: the paid plan unlocks when the success page loads, not when Stripe's signed webhook confirms payment. Anyone can open that URL. Which gap do you see people miss most?
@dileep31 Fair point. The gap in DIY builds is usually small stuff, like a public Storage bucket: it serves any file to anyone who has the URL. A private bucket plus short-lived signed URLs closes most of it.
@adeiji1 Nice that it all goes through the app's own API. One thing to watch with billing tools: plan upgrades should only stick when Stripe's signed webhook confirms payment, not when a tool call or success page says done.