A storage bucket is a container for files in a cloud storage service. In a Supabase app it is where uploads end up: profile pictures, documents, invoices, photos of a damaged parcel. Each bucket has a name, and the files in it are reached by an address that includes that name.
Public and private
A Supabase bucket is either public or private. In a public bucket, anyone who has the address of a file can download it, without signing in. In a private bucket, a file can only be fetched by someone the access rules allow, or through a link with a time limit. The details are in the Supabase guide to storage buckets.
A public bucket is right for files that are meant to be seen, such as product images on a shop. It is wrong for anything a customer uploaded about themselves.
Listing is the bigger risk
A public bucket is not open in the way that word suggests. To download a file you need its address, and file names are often long and random. What turns a bucket into a real leak is the ability to list it: to ask "which files are in here?" and get the names back.
Listing is controlled by Row Level Security policies on Supabase's own table of stored objects, not by the public or private setting. A policy that lets the anon role read that table for a bucket lets anyone list every file in it, and then download each one if the bucket is also public. AI app builders tend to write such a policy when the app needs to show a gallery or a list of uploads, because it makes the screen work.
What to check
- Which buckets the app uses, and whether each one should be public. The bucket names are in the app's JavaScript, where it uploads files.
- Whether a bucket's files can be listed without signing in. If the list comes back, so does every name in it.
- Whether a signed-in user can list or fetch another user's files. That is the two-user test, applied to storage.
Uploaded files are easy to forget in a security review, because they are not in the database tables people look at first. They often hold the most personal data in the whole app.