89% of AI-built apps ship with exposed databases. Most developers don't find out their tenants are reading each other's data until they get the breach email.
Lovable creates your tables. Lovable connects your auth. Lovable doesn't turn on Row Level Security — and when you're multi-tenant, RLS alone isn't even enough.
-- Lovable's output. No RLS. No tenant isolation. CREATE TABLE public.projects ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, user_id UUID REFERENCES auth.users(id), name TEXT NOT NULL, data JSONB ); -- That's it. Any authenticated user can: -- SELECT * FROM projects; ← all tenants' data -- DELETE FROM projects; ← everyone's records -- And if service_role is in client code: const supabase = createClient(url, process.env.NEXT_PUBLIC_SERVICE_ROLE_KEY ) // ← bypasses ALL security
-- Multi-tenant isolation, done properly CREATE TABLE public.projects ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, tenant_id UUID NOT NULL REFERENCES tenants(id), user_id UUID REFERENCES auth.users(id), name TEXT NOT NULL, data JSONB ); ALTER TABLE projects ENABLE ROW LEVEL SECURITY; CREATE POLICY "tenant_isolation" ON projects FOR ALL TO authenticated USING ( tenant_id = (auth.jwt() ->> 'tenant_id')::uuid AND user_id = auth.uid() );
VITE_ and NEXT_PUBLIC_ prefixes —
bundled into browser JS, readable by anyone.
service_role access to Supabase
bypass RLS entirely through prompt injection — a malicious string in your
database content can instruct the AI to exfiltrate data or drop tables.
If you've connected Cursor or Claude to your Supabase MCP with service_role, every table in your database is one prompt away from exposure.
Most developers think enabling RLS means their app is secure. It doesn't validate
that your tenant boundaries are actually enforced. A policy that says
auth.uid() = user_id
gives users access to their own rows — but still lets Tenant A read Tenant B's data
if they share the same user across tenants.
Describe your app and what you've built. I'll personally review your setup and tell you exactly what's broken and what it takes to fix it. Human review, not an automated report.
Free audit · No commitment · Response within 24h