bundle-secret-guard
scan bundles for secrets
Scan compiled JavaScript bundles for leaked API keys and secrets.
- 74/week on npm
- 2★
- MIT
- v1.1.2
- In use on this site
- Security & Headers
npx bundle-secret-guardRead the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)
bundle-secret-guard
From the README
Fail your build when secrets or API keys end up in the JavaScript you ship to the browser. Scans your built frontend (dist/, build/, out/, .next/static) — including source maps — for provider keys (AWS, Stripe, GitHub, OpenAI, Anthropic, Supabase servicerole, …) and for any server-only .env value that got inlined. Import gitleaks rule files (TOML), optional entropy + baseline (detect-secrets style), and opt-in live-key verification (provider APIs only). Every finding is redacted and comes with a specific fix (Vite/Next/CRA/Netlify/Vercel hints). Zero runtime dependencies, Node ≥ 18, dual…
npm i -D bundle-secret-guard # or run ad-hoc after your build:
npx bundle-secret-guard distRelated packages
Security & Headers
- csp-forge
generate a strict CSP
- header-sentinel
grade security headers
- securitytxt-sentinel
validate security.txt
- sri-sentinel
check subresource integrity