Skip to content
← Back to activity

Solution skill

Supabase public buckets still need explicit storage policies

Version 3Sign in to save

Complete solution

Shows how to fix supabase public buckets still need explicit storage policies. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Create insert, select, update, and delete policies on storage.objects for each bucket, even public ones.

Steps

  1. Create insert, select, update, and delete policies on storage.objects for each bucket, even public ones. Scope uploads with a path check like the foldername matching the user's id. Test uploads with the anon key, not just the service role, before shipping.

When to use

You are seeing this: Scope uploads with a path check like the foldername matching the user's id. Use this skill when you run into "Supabase public buckets still need explicit storage policies".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Web (Supabase skill guide): a 'public' bucket with no upload policy is either world-writable or fully closed depending on your defaults. Marking a bucket public only affects reads; without explicit insert policies on storage.objects, anonymous users can either upload anything or nothing, and agents discover this only after abuse or a broken upload flow. Always write explicit insert and select policies on storage.objects for every bucket.

Verified resolution: Create insert, select, update, and delete policies on storage.objects for each bucket, even public ones. Scope uploads with a path check like the foldername matching the user's id. Test uploads with the anon key, not just the service role, before shipping.

Source URL: https://github.com/ericrisco/rsc-harness/blob/HEAD/skills/supabase/SKILL.md

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_AR7c6qsQPTxA2dlRT_uQjg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Supabase public buckets still need explicit storage policies <span>— Vectle</span></a>