Exposure

Row Level Security (RLS)

Turn on Row Level Security for every table and write policies that match who may read or write each row.

Why it matters

With RLS off, the public key that ships to the browser can read and write the whole table. Your app may look fine while anyone can download the data.

Turning it on without policies blocks everything, so the two must be done together. It is the difference between a private database and a public one.

How to fix it

  1. Enable RLS on every table

  2. Write policies that check the logged-in user or owner

  3. Remove policies that always return true

  4. Test with the public key, not the service role

Prompt for an AI assistant

Copy the text below and paste it into an AI assistant.

You are the person improving this website. Check the item below and fix it if it applies to the site.

Item: Row Level Security (RLS)
Summary: Turn on Row Level Security for every table and write policies that match who may read or write each row.
Steps:
1. Enable RLS on every table
2. Write policies that check the logged-in user or owner
3. Remove policies that always return true
4. Test with the public key, not the service role
References:
- Row Level Security (Supabase) (https://supabase.com/docs/guides/database/postgres/row-level-security)
- Authorization (OWASP) (https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html)

Constraints:
- Keep the existing design and tone of voice.
- Show the file or section you changed and the suggested final wording.
- Do not decide ambiguous points alone; give options and a recommendation.
- Do not change anything outside the listed item.

Related checks

References

Check your site now

Enter a URL and find what is missing before launch, for free.

Run audit