DaemonCoreDBX home
Acme ProductionPRODUCTION
Run Scan
Findings
Medium

public.v_customer_billing bypasses policies on public.invoices, public.customers

Affected:
public.v_customer_billing
Category:
Views
Confidence:
high
First detected:
2026-08-12 11:04Z
Last verified:
2026-08-16 09:41Z

Summary

The view reads RLS-protected relations with owner rights, so callers see rows their own policies would exclude.

Why this matters

Views are commonly treated as read-only conveniences, but a non-invoker view is an unmonitored bypass of the table's tenant boundary.

Evidence

View
public.v_customer_billing
security_invoker
false
Reads
public.invoices, public.customers
Granted to
authenticated

Facts above were derived by the scanner from database metadata. No model output is involved in the verdict.

Technical details

reloptions does not contain security_invoker=true while the referenced relation has relrowsecurity = true.

recommended remediation

Unlock the full security analysis

Buy full analysis

Enable invoker rights so the caller's policies apply.

Current

CREATE VIEW public.v_customer_billing AS
  SELECT ... FROM public.invoices;

Proposed

ALTER VIEW public.v_customer_billing SET (security_invoker = true);

Expected security effect

  • Caller policies applied to view reads
  • Tenant boundary preserved

Compatibility risk

low

Callers previously seeing all rows will now see only their own. Dashboards aggregating across tenants need a privileged path.

DBX never applies SQL to your database.