What is wrong
The RLS policy uses USING (true). Any logged-in user can list every other user's private notes.
Impact: Private notes of all customers exposed — a reportable data breach.
Evidence (fixture)
supabase/migrations/0003_notes.sql:18–22 · commit a3f9c21
CREATE POLICY "read" ON notes FOR SELECT USING (true); -- fixture
Expected
Users only read rows where user_id = auth.uid().Observed
Policy allows all rows.Recommended fix
Scope the policy to auth.uid().
Repair prompt for your AI builder
Replace the SELECT policy on notes in 0003_notes.sql with USING (auth.uid() = user_id) and add matching INSERT/UPDATE/DELETE policies.
Paste it into Lovable, Claude Code, Cursor or Codex.