Checks · DB-003

DB-003 · Policy allows anyone to write

P0 Critical

Why it matters

A policy that uses true for anonymous or signed-in writes lets anyone change the table.

How we detect it

SQL policies and, when connected, database policy reads are checked for USING (true) on writes.

How we fix it

Replace the policy with one that checks auth.uid() against an owner column.

Can it be fixed automatically? Yes, with a template change

Related checks

  • SEC-001 · Secret committed in repo (current tree)
  • SEC-002 · Secret in git history
  • SEC-003 · Service-role or secret key in client bundle
  • SEC-004 · Public env prefix on a secret
DB-003 · Policy allows anyone to write — Rivyva