Vercel Environment Variable Scoping
Purpose
Prevent sensitive secrets from leaking into Vercel Preview deployments. Preview deploys are accessible to anyone with the URL and run untrusted PR code.
Action Required
In the Vercel project settings for atrium-verify, scope every sensitive environment variable to Production only. Preview deploys should see dummy placeholder values (or no value at all).
Variables to scope to Production only
DEPLOYER_PRIVATE_KEYCHAOS_PRIVATE_KEYKEEPER_PRIVATE_KEYATRIUM_INTERNAL_KEYSUMSUB_WEBHOOK_SECRETATRIUM_SESSION_SECRETUPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKENDISCORD_OPS_WEBHOOKSteps
- Go to Vercel Dashboard → atrium-verify → Settings → Environment Variables
- For each variable listed above:
- Click the variable row
- Under "Environments", uncheck Preview and Development
- Keep only Production checked
- Save
- For Preview deployments that need a value to avoid crashes, add a separate
entry scoped to Preview with a dummy value: `` ATRIUM_SESSION_SECRET=preview-dummy-not-real-32chars!! UPSTASH_REDIS_REST_URL=https://placeholder.upstash.io UPSTASH_REDIS_REST_TOKEN=preview-dummy ``
Verification
After scoping, trigger a Preview deploy from a PR branch and confirm:
- The app boots without crashing (dummy values don't cause unhandled errors)
- Auth routes return 503 or graceful errors (not real sessions)
- Chaos routes return 503 (no CHAOS_PRIVATE_KEY)
- Rate limiting falls back to in-memory (no Upstash connection)
References
- Phase 3 security hardening spec
apps/verify/src/lib/rate-limit.ts, graceful fallback when Upstash unavailableapps/verify/src/lib/auth-session.ts, requires ATRIUM_SESSION_SECRET