Skip to content
SlashClone
Made by@shipcheck

Env secrets check

@shipcheck/env-secrets-check

Check your repo for leaked secrets before you push or launch: .env files git tracks or will pick up, .env files hiding in git history, server keys behind NEXT_PUBLIC_ or VITE_ prefixes that ship to the browser, provider key shapes (Stripe, AWS, GitHub, OpenAI, Anthropic, Supabase service_role), and passwords hardcoded in code. Reports names and redacted hints, never the values.

SkillDevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1# Env and secrets check
  2. 2
  3. 3Finds secrets that are about to leak, or already have, before you push or launch. Then it helps you fix the files and gives you a checklist for rotating any key that was exposed.
  4. 4
  5. 5**For:** anyone shipping an app built with Next.js, Vite, Expo, or similar, especially if a coding agent wrote the env setup for you.
  6. 6
  7. 7## Example
  8. 8
  9. 9Input: a project with a `.env.local` that is not in `.gitignore`, `NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY` in it, and a password typed straight into `lib/config.ts`.
  10. 11Output (`out/secrets-report.md`):
  11. 13```markdown
  12. 14High: 2 | Medium: 3 | Low: 1
  13. 16## High
  14. 17- .env.local (env-file-not-ignored): This env file is not in .gitignore,
  15. 18 so the next `git add .` commits it.
  16. 19- .env.local:2 (public-env-secret): NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY is
  17. 20 bundled into the browser. Anyone can read it in the page source.
  18. 21 - Fix: Rename to SUPABASE_SERVICE_ROLE_KEY, read it only in server code.
  19. 23## Medium
  20. 24- lib/config.ts:2 (hardcoded-secret, let... (12 chars)): adminPassword is
  21. 25 set to a hardcoded value in code.
  22. 26```
  23. 28Values are always redacted. Try it on the bundled demo: `node scripts/secrets-scan.mjs examples/demo-app`.
  24. 30## What it checks
  25. 32- `.env` files tracked by git, not ignored, or found in git history.
  26. 33- Server secrets behind `NEXT_PUBLIC_`, `VITE_`, `EXPO_PUBLIC_`, `REACT_APP_`, `NUXT_PUBLIC_`, `GATSBY_`, `PUBLIC_`.
  27. 34- Stripe, AWS, GitHub, OpenAI, Anthropic, Slack and Google key shapes, private keys, database URLs with passwords, Supabase service_role keys.
  28. 35- Secret-named variables with hardcoded values, and templates (`.env.example`) holding real-looking values.
  29. 37## What it can access
  30. 39- Reads files in your project (skipping `node_modules`, build output, and lockfiles). It reads `.env` files only to check names and whether values are set.
  31. 40- Runs its own script, plus `git ls-files` and `git log` to see what is committed.
  32. 41- Writes reports to `out/`, and edits `.gitignore` only after you say yes.
  33. 42- No network, no env vars.
  34. 44## Setup
  35. 46None. Needs Node 22 or later. Git is optional.