See what you get
DEMO · synthetic evidence
High
Staff can read any employee's expense by changing its ID
Another employee’s expense data is exposed.
See the instruction for your AI
In Supabase, update the SELECT policy on public.expenses so Staff can only read rows where owner_id = auth.uid(), and Managers can read rows where team_id matches their team via a security-definer has_role check. Do not change other tables.
Synthetic example. In a real report the instruction leaves out secrets, and a correction counts only after an authorized retest.
Retest outcome: Fixed
See example report