On this page
- How do I view a sensitive environment variable on Vercel?
- Can a sensitive variable be used in Development?
- Why can't I mark an integration's variable as sensitive?
- Store each Vercel variable as the right type
- Secret or Config, and what reaches the browser
- Related guides
- Official docs behind this checklist
- FAQ for builders before launch
Vercel question
What are sensitive environment variables on Vercel?
A sensitive environment variable on Vercel is one whose value nobody can read back after it is saved: Vercel now calls this type Secret, next to Config for values that stay readable, and treats existing Sensitive variables as Secrets. The type does not keep the value out of the browser: a NEXT_PUBLIC_ or VITE_ variable is copied into the JavaScript bundle whatever its type.
npx -y viberaven@1.8.0 checkIn a Vercel + Supabase app it reports a Supabase service role or secret key under NEXT_PUBLIC_ or VITE_ as service_role_key_in_client_env; it is advice, not a gate, and a repository check, not a live database test. It cannot read the Secret type or other secrets, so for those run git grep -nE "(NEXT_PUBLIC|VITE)_[A-Z0-9_]*(SECRET|PRIVATE|TOKEN)".
Or ask your coding agent to "run npx -y viberaven@1.8.0 check and fix what it reports".
Use this from your agent
- Claude Code: 7 read-only tools; public repos only.
claude mcp add --transport http viberaven https://viberaven.dev/mcp - Codex: same server, from the Codex CLI.
codex mcp add viberaven --url https://viberaven.dev/mcp - In your repo: writes Vercel + Supabase check rules for your agent (what it writes).
npx -y viberaven init
Paste this to your agent
Run `npx -y viberaven@1.8.0 check` in this Vercel + Supabase repo and review exposed-secret findings. Keep secrets out of NEXT_PUBLIC_ and VITE_ variables even when marked Secret in Vercel. Check the client bundle without printing values; report checks you could not run.Open your app's repo in your coding agent, then paste this request.

Not sure which Supabase key is the secret one? Compare the publishable, secret, anon and service role keys.
How do I view a sensitive environment variable on Vercel?
You cannot, from the dashboard or the CLI. vercel env pull keeps the value already in your local file for a Secret, or writes a placeholder for you to replace. If nobody has the value, set a new one and rotate it at the provider.
Can a sensitive variable be used in Development?
Yes, now. Vercel says Secrets are allowed in Development, which reverses the earlier rule that limited Sensitive variables to Production and Preview.
Why can't I mark an integration's variable as sensitive?
Vercel does not let you change a variable an integration created to Secret from the list. Disconnect the resource from all its projects, rotate its secrets, reconnect it with Development deselected and Sensitive turned on, then redeploy. The Supabase integration is one example: Which env vars does the Supabase Vercel integration add?.
Store each Vercel variable as the right type
- 1For each variable, ask whether the value could sit on a public page. If it could, it may be Config with a public prefix. If not, it is a Secret with no prefix.
- 2Add secrets as Secret:
Terminal vercel env add STRIPE_SECRET_KEY production --sensitive - 3Rename any secret that has a NEXT_PUBLIC_ or VITE_ prefix, read it only in server code, and rotate it at the provider, because builds made with the prefix already shipped it.
- 4If you are a team owner and want production secrets kept apart, turn on Require Separate Values under Separate Production Secret Values in the team's Security settings.
- 5Redeploy after any change. A new value reaches new deployments only.
Secret or Config, and what reaches the browser
Two separate settings decide what happens to a value. The type decides who can read it back in Vercel. The name decides whether your build copies it into the browser.
Secret vs Config
Build logs redact a Secret value that is 32 characters or longer. To rotate a Secret, enter a new value. A saved Secret cannot become Config in place: delete it and create a Config variable.
| Question | Config | Secret |
|---|---|---|
| Readable after saving? | Yes, by members with access | No, it is write-only |
| What Vercel suggests it for | Non-sensitive configuration, such as values with a public prefix | Passwords, API keys and tokens |
| Vercel CLI default | Names with a public framework prefix | Production and Preview |
| Copied into the browser under NEXT_PUBLIC_ or VITE_? | Yes | Yes |
What a local next build put in the browser files
The prefix alone put the value in the chunk. On Vercel the result is the same whatever type the variable has.
| Variable | Found in a .next/static browser file? |
|---|---|
| NEXT_PUBLIC_PAYMENTS_KEY | Yes, as a plain string in a chunk |
| PAYMENTS_SECRET (no prefix) | No |
Related guides
Official docs behind this checklist
Browse all launch guides · Read resources · How to make and check your next change
FAQ for builders before launch
What happened to the Enforce Sensitive Environment Variables policy?
Vercel deprecated it. Separate Production Secret Values replaces it: when on, every Secret needs a different value in Production than in the other environments.
Does the Secret type encrypt the value at build time?
The build still receives the plain value, which is how your code reads it. The type controls who can read it back after saving.