Skip to content

Database policy that lets everyone in

Partialhigh severity · reads .sqlBeta

`using (true)` or `with check (true)` turns row level security on but lets every request through, so the table is as open as having no security at all. Marked Partial: public read access can be intended. When Lintsure finds this, it marks it as Partial: it may be fine, depending on context only you can confirm.

What it looks like

A line Lintsure flags in its own test app:

// supabase/migrations/001_profiles.sql
create policy "anyone" on public.notes for all using (true);

How to fix it

Limit the policy to the right people, for example `using (auth.uid() = user_id)`. Keep `using (true)` only for data that is meant to be public, such as published posts.

Through a coding agent, Lintsure suggests the change and waits. Nothing is edited until you approve it.

Controls it relates to

  • GDPRArt. 32Security of processing
  • OWASP Top 10A01:2025Broken Access Control
  • Cyber Resilience ActAnnex I Part I (2)(d)Protection from unauthorised access
  • CWE Top 25CWE-284Improper Access Control
  • API1:2023Broken Object Level Authorization

What the framework asks

GDPR Art. 32: Security of processing

Protect personal data with security that fits the risk: encryption, access control, testing and the ability to recover.

Evidence a reviewer may ask for: Security measures and when they were last tested.

OWASP Top 10 A01:2025: Broken Access Control

People must only reach the data and actions meant for them. This covers file paths, redirects, requests your server makes on a user's behalf (SSRF), forged requests from other sites, and permissions kept where users can change them.

Evidence a reviewer may ask for: A list of roles and what each may do, and tests showing one user can't read or change another user's data.

Cyber Resilience Act Annex I Part I (2)(d): Protection from unauthorised access

Logins, tokens and permissions that keep people out of what isn't theirs: no built-in passwords, verified tokens that expire, and access rules on data.

Evidence a reviewer may ask for: How users sign in, how roles are checked, and tests between two accounts.

CWE Top 25 CWE-862, CWE-863, CWE-284, CWE-639: Missing or broken authorization

Every action and record is checked against what the user may do.

Evidence a reviewer may ask for: Access tests between two accounts.

API1:2023: Broken Object Level Authorization

Every request for a record by id must check that this caller may see that record. A valid sign-in is not enough.

Evidence a reviewer may ask for: Tests that sign in as one user and ask for another user's records.

Summaries are our own reading of the public texts, not the official wording.

Read more: Supabase row level security: check your tables aren't open

Check your code for this

Runs on your machine. Your code is never uploaded.

npx lintsure scan

Quickstart · Use it in Claude Code or Cursor

This rule is in Beta: its mapping to framework controls is our own reading of the public texts, not independently reviewed. Lintsure is a readiness tool, not an audit or legal advice. A finding, or the lack of one, doesn't make you compliant. Disclaimer

We improve these rules all the time. If you see a false alarm, a missed problem or anything that could work better, tell us in a review and we will use it to improve your experience.

Related rules

Did this rule flag something that's fine, or miss a real problem? Tell us on GitHub. Every report becomes a test case, so the same mistake can't come back.