Security guides for vibe coders

Plain-English, step-by-step guides to the most common security mistakes in AI-built apps. Each one has a copy-paste prompt for your AI tool.

Supabase roles: don't trust user_metadata, use app_metadata (or a roles table)

Any signed-in user can edit their own user_metadata, so a role stored there lets them make themselves admin. Find user_metadata role checks and policies, move roles to app_metadata or a user_roles table, and test it.

Supabase views bypass RLS: fix them with security_invoker

A view in your public schema runs as its owner by default, so it can return every row your RLS hides. Find unsafe views, set security_invoker = true, lock down materialized views and auth.users views, and test with the anon key.

Supabase Storage: public buckets vs signed URLs (keep user uploads private)

A public bucket serves every file to anyone with the URL, no RLS check. Move user uploads to a private bucket, scope storage.objects policies to the owner's folder, use short-lived signed URLs, and test logged out.

Supabase RLS filters rows, not columns: stop leaking emails and private fields

A Supabase RLS policy picks rows, not columns. If profiles is public, so are the emails in it. Move private fields to an owner-only table or lock columns with grants, keep is_admin and credits server-written, and test logged out.

Supabase "permission denied for table" (42501) after Oct 30: the safe fix

New Supabase tables now need explicit GRANTs. Grant only what each role needs, keep RLS on, test while logged out, and never bulk GRANT ALL or disable RLS.

Leaked an API key? How to find, rotate and verify it

Worried after the Railway breach or the LiteLLM 1.107.0 malware? Find exposed keys (including in Git history), rotate them provider by provider, and confirm the old key is dead.

Is my Supabase app safe? How to check Row Level Security

Learn how to check whether Row Level Security (RLS) is on for every Supabase table, why the anon key makes it critical, and how to fix it with one AI prompt.

How to hide API keys in Lovable, Bolt and Cursor apps

API keys in frontend code are visible to anyone. Here is how to find exposed keys in AI-built apps and move them to a server function, step by step.

How to check your Firebase security rules before launch

Open Firestore, Realtime Database or Storage rules let anyone read or wipe your data. Learn how to spot test-mode rules and lock them down step by step.

NEXT_PUBLIC_ and VITE_ variables: why your secret keys are public

Environment variables starting with NEXT_PUBLIC_, VITE_, REACT_APP_ or EXPO_PUBLIC_ are bundled into browser code. Learn how to check yours and fix leaked secrets.

Vibe-coded app security checklist: 12 checks before you launch

A plain-English security checklist for apps built with Lovable, Bolt, Cursor, Replit or Claude: keys, database rules, logins, packages and more.

Check your repo in about a minute

Paste a public GitHub repo into KeySnare for a free grade and your top 3 issues, each with a copy-paste AI fix prompt.

Run a free scan →