Potential cross-tenant access through SECURITY DEFINER function
public.get_invoice(uuid)
public.get_invoice(uuid) runs with the privileges of its owner, is executable by authenticated, and reads public.invoices without an ownership constraint in the evaluated path.