Rogue Startups

RS357: I Got Hacked

Mar 11, 2026
Brandon Hancock, an experienced software engineer and AI-focused developer, performs a live audit of a fast-built AI SaaS. He uncovers exposed Supabase keys, row-level security gaps, and architecture mistakes. Short fixes and practices like moving clients to the backend, using server actions, managing migrations, and codifying AI task templates are discussed.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Never Ship Frontend Supabase Keys

  • Avoid exposing Supabase client keys in frontend code to prevent attackers from creating users or reading unprotected tables.
  • Brandon grabbed Craig's public Supabase key via exposed client and read data from tables that lacked row-level security, demonstrating the risk.
ADVICE

Enable Row Level Security On All Tables

  • Implement strict row-level security on every table so a leaked anonymous key can't read or modify others' data.
  • Brandon found most tables had RLS but two (leads and another) did not, which allowed him to read user data.
ADVICE

Keep Private Database Logic On The Server

  • Move private Supabase operations to backend/server-side code and keep only public data logic in the client.
  • Brandon's one-file fix was deleting the client-side Supabase usage and routing actions through server endpoints to hide keys.
Get the Snipd Podcast app to discover more snips from this episode
Get the app