Exposure

Write policies for inserts and updates

Check that inserts and updates verify the owner or the logged-in user, not just that a user is signed in.

Why it matters

A policy that only checks 'is logged in' lets any user write rows that belong to someone else.

Most data leaks through a missing check on write, not read. Naming the owner in the policy closes it.

How to fix it

  1. List every insert and update policy

  2. Check that the row's owner matches the logged-in user

  3. Do not allow clients to set the owner column freely

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: Write policies for inserts and updates
Summary: Check that inserts and updates verify the owner or the logged-in user, not just that a user is signed in.
Steps:
1. List every insert and update policy
2. Check that the row's owner matches the logged-in user
3. Do not allow clients to set the owner column freely
References:
- Row Level Security (Supabase) (https://supabase.com/docs/guides/database/postgres/row-level-security)

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