Skip to content

Supabase's October 30 change: new public tables need a grant for Data API access. What to doSupabase's October 30 change is live: new public tables need a grant for Data API access. What broke and how to fix it

25 tools · 142 fixes · 43 issue guides · Sources: Supabase, GitHub, Vercel, postgresql.org + 56

Printable

Pre-launch security checklist

A single pass over the issues that most often ship in an AI-built app, before you send the URL to anyone else.

Print this page and tick the boxes, or paste the prompt at the bottom into the coding agent that built the app. Each line links to a longer guide. Educational guidance, not a security audit. Do the checks on a project you own.

Work top to bottom. If a line does not apply because you do not use that service, write "n/a" next to it and move on. Do not tick a line you did not check.

Server secrets belong in the host's environment. A variable whose name starts with NEXT_PUBLIC_ or VITE_ is copied into the browser bundle. The checks for that boundary are in How to deploy your vibe-coded app securely.

Data access

Secrets

  • The production JavaScript bundle does not contain a Supabase secret key, a Stripe secret key, or a model API key.

    Secret keys shipped in the frontend

  • Server secrets are not in a NEXT_PUBLIC_ or VITE_ variable. Preview deploys do not use production credentials, and internal services do not have a public URL they do not need.

    How to deploy your vibe-coded app securely

  • Git history does not contain a real .env or a private key. Anything that did has been rotated.

    Keys committed to GitHub

  • Requests for /.env and any debug route do not return configuration or secrets.

    Exposed .env files and debug endpoints

  • In Vercel's Environment Variables list, every private credential, such as a secret API key, access token, or database password, is labeled Secret, not Config. A publishable key shipped to the browser on purpose can stay Config. A private credential that was ever stored as Config or non-sensitive has been rotated.

    Which Vercel env vars should be Secret? How to check yours

  • If the app runs on Railway, every credential that was in a Railway variable has been rotated at the provider that issued it, not only changed in Railway, and the old key is revoked.

    Railway breach: rotate secrets

Money and abuse

Injection and the browser

  • User input is not concatenated into SQL or into a Supabase .or() filter string.

    SQL injection

  • User and model text is rendered as text, or sanitized with a maintained allowlist. No homemade HTML filter.

    Cross-site scripting (XSS)

  • Tools the model can call check the session on the server. The model does not decide who the user is.

    Prompt injection in LLM features

  • Uploads have a server-side size and type limit, a generated filename, and are not served as HTML or SVG from your origin.

    Unsafe file uploads

  • Cookie-authenticated APIs do not reflect arbitrary Origin headers. There is an allowlist, or no CORS middleware at all.

    CORS wide open

  • Responses send nosniff, a referrer policy, and frame protection. HSTS is only set if the site is HTTPS-only.

    Missing security headers

Accounts and launch

Give the whole list to your agent

You are doing a pre-launch security pass on this repository. Do not add features. Do not claim the app is secure. Work through the list below and change code only where you can see the problem. If you are unsure, write a question instead of weakening a control.

Check and fix what you can:
1. Supabase: enable RLS on public tables and replace policies of using (true). Do not use the secret key in client code or NEXT_PUBLIC_ variables.
2. Firebase: remove allow read, write if true. Scope rules to request.auth.uid and the owner field.
3. Storage: private buckets, owner-only prefixes, no user HTML or SVG served from this origin.
4. Every Route Handler and Server Action that reads or writes data must load the session inside the function and scope queries to that user. A middleware or proxy matcher that skips /api is not that check. Ignore userId, role, price, and plan from the client.
5. Stripe webhooks must verify the signature on the raw body. Prices must come from server-side price ids. Only the verified webhook grants a plan.
6. Model routes must keep the provider key on the server, require a user, and enforce a small per-user daily cap. Tell me to set a spend limit in the provider dashboard.
7. Add server-side rate limits on login, password reset, and paid routes.
8. Parameterize SQL. Render user and model text as text. Allowlist CORS origins. Add nosniff, referrer policy, and frame-ancestors none.
9. Password reset must not set a password from an email alone.
10. Do not print secrets. Tell me which keys I must rotate if they were committed or shipped to the browser.
11. Do not store session tokens, JWTs, or refresh tokens in localStorage or sessionStorage. An HttpOnly cookie is a server-only session. On a Supabase Next.js app, @supabase/ssr cookies are readable by script because the browser needs the refresh token. Use that helper instead of a storage key you invented, and do not describe it as HttpOnly. Call getUser() when a revoked session must be rejected.

End with a checklist of what you changed, what you could not verify from the repo, and what I should click-test.