Security
Make file uploads safe
Users can upload anything of any size into a bucket that may be public.
- What you get
- Limits on type and size, private storage by default, and uploads that can’t overwrite each other.
- Paste it into
- Your AI tool, in your project
The prompt
Review how file uploads work in this project. Trace an upload from the form to where the file ends up. Check: is the type checked on the server and not only by file extension, is there a size limit, can someone upload without being signed in, is the bucket public, can a file name chosen by the user overwrite another user's file or escape its folder, and are files served in a way that could run as a page on my domain? Fix what's missing: server-side type and size checks, generated file names, per-user folders, and private storage with short-lived links where files are personal. Tell me the storage settings to change in the dashboard.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.
More in Security
Fix known security holes in your packages
The install prints a wall of vulnerability warnings and you’ve learned to ignore it.
Tighten headers, cookies and cross-origin rules
CORS was set to allow everything to make an error go away, and it stayed that way.
Check for script and database injection
User-written text is shown as HTML somewhere, or a query is built by gluing strings together.
Keep bots out of your forms and sign-ups
Fake sign-ups and contact-form spam arrive faster than real users.