API Key Leak Checker
Find secret keys your website sends to every visitor: AI, payment and database keys in its JavaScript, readable source maps, and a downloadable .env file.
- Public data only
- Results in seconds
- No sign-up
- Free
Results for https://github.com/
Scanned the page and 40 scripts (15.1 MB).
Secret keys
-
OK:No secret keys found in the code this site serves
We looked for 36 kinds of secret, from AI and payment keys to database passwords and private keys.
.env and .git files
-
OK:No .env or .git files are served
We tried /.env, /.env.local, /.env.production and /.git/config.
Source maps
-
Warning:Your original source code is public (8 maps)
Source maps turn minified bundles back into your original files, comments and all. That makes it far easier to find API routes, admin checks and anything sensitive left in the code. Stop publishing them, or upload them privately to your error tracker.
- /assets/landing-pages-6eccf70a4f450eb3-e3c3da8db475e1dc.js.map · 596 of your files, with full source
packages/brand-webgl/assets/images/fallbacks/brandedDivider|lazy|/^//.*/-.*/-.*/.webp$/|referencedExports:%20default|groupOptions:%20%7B%7D|namespace%20object|importPhase:%20evaluation|layer:%20app, packages/brand-core/utils/animation.ts, packages/brand-core/utils/platform.ts, packages/consent-banner/consent-language/Canada.tsx, packages/consent-banner/consent-language/China.tsx, packages/consent-banner/consent-language/Default.tsx, …
- /assets/core-5c867a2e8343b2a4-21bb542fef81a4a2.js.map · 282 of your files, with full source
app/assets/modules/element-registry.ts, app/assets/modules/github/behaviors/autosearch-form.ts, app/assets/modules/github/behaviors/hovercards.ts, app/assets/modules/github/behaviors/quote-selection.ts, app/assets/modules/github/alive/idle-state.ts, app/assets/modules/github/behaviors/hooks.ts, …
- /assets/react-core-fdd4d0f430dac315-1e43ec5d766d3f45.js.map · 124 of your files, with full source
packages/react-core/ActivityBoundary.tsx, packages/react-core/BaseProviders.tsx, packages/react-core/SSRErrorToast.tsx, packages/react-core/CommonElements.tsx, packages/react-core/ErrorBoundary.tsx, packages/react-core/ErrorPage.tsx, …
- /assets/app-runtime-ca25080bcf36dff9-835aa2f89ba91ec1.js.map · 46 of your files, with full source
packages/analytics-provider/AnalyticsProvider.tsx, packages/analytics-provider/context.ts, packages/api-insights-tracing/index.ts, packages/failbot/failbot-error.ts, packages/failbot/failbot.ts, packages/error-serialization/error-serialization.ts, …
- /assets/high-contrast-cookie-74ae35aa09cc7c63-7410daba4955d01e.js.map · 4 of your files, with full source
packages/client-env/client-env.ts, packages/cookies/cookies.ts, packages/high-contrast-cookie/blocking-entry.ts, packages/high-contrast-cookie/high-contrast-cookie.ts
- /assets/marketing-essentials-aa6b6fbf18fed9b0-1a1be917b3171db9.js.map · 4 of your files, with full source
app/assets/modules/marketing-essentials.ts, app/assets/modules/marketing/analytics-events.ts, app/assets/modules/marketing/header.ts, app/assets/modules/marketing/link-query-param-overrider.ts
- /assets/global-banner-disable-8ef2bcb2f4e43eea-489936cc5b333041.js.map · 1 of your files, with full source
packages/global-banner-disable/global-banner-disable.js
- /assets/wp-runtime-e2d817e54353bda7-2badfe903a4762f3.js.map · 1 of your files, with full source
x_chunk_load_retry
Advertisement
Why keys end up in the browser
Front-end frameworks copy some environment variables into the JavaScript they build, so the code can read them. Anything copied there is downloaded by every visitor. Each framework marks those variables with a prefix:
- Next.js:
NEXT_PUBLIC_… - Vite (React, Vue, Svelte, Lovable, Bolt):
VITE_… - Create React App:
REACT_APP_… - Expo:
EXPO_PUBLIC_… - SvelteKit:
$env/static/publicandPUBLIC_…(private ones come from$env/static/private, which can’t be imported in browser code) - Nuxt:
runtimeConfig.public
If a secret key has one of these prefixes, it’s public. AI coding tools often add the prefix to make an error go away, which is how many of these leaks start.
The fix: call the API from your server
- Revoke the leaked key at the provider and create a new one.
- Store the new key without the public prefix (
OPENAI_API_KEY, notVITE_OPENAI_API_KEY), so it only exists on the server. - Add a small server route that makes the call: a Next.js route handler, a
SvelteKit
+server.ts, a Supabase Edge Function, a Cloudflare Worker or a Vercel or Netlify function. The browser calls your route; your route calls the provider with the key. - Protect that route: require a signed-in user, and rate-limit it, or it becomes a free proxy to your key.
Keys that are meant to be public
Stripe publishable keys, Supabase anon and publishable keys, Firebase config and Mapbox public tokens are built for the browser. They’re safe only when the backend enforces who can do what:
- Supabase: turn on row level security for every table and write policies
that check
auth.uid(). Without RLS, the anon key can read and change every row. - Firebase: write Firestore, Realtime Database and Storage rules that check
request.auth, and turn on App Check. - Google API keys: restrict each key to your website and to the APIs it needs in the Google Cloud console.
Turning off public source maps
- Vite:
build.sourcemapis off by default; if you need maps for error tracking, use'hidden'and upload them to Sentry instead of deploying them. - Next.js: leave
productionBrowserSourceMapsoff (the default). - webpack: use
devtool: 'hidden-source-map'and don’t deploy the.mapfiles.
Blocking .env and .git on the server
Deploy only your build output folder, never the project root. As a backstop, refuse dotfiles at the web server. In nginx:
location ~ /\.(?!well-known) { deny all; } In Apache, RedirectMatch 404 /\.(?!well-known). If .git was ever public,
treat every secret in the repository’s history as leaked.
Frequently asked questions
What does the API key leak checker look at?
The same files a visitor’s browser downloads: the page’s HTML and inline scripts, every JavaScript bundle the site serves itself and the chunks those load, and any source maps. It looks for secret keys from AI providers (OpenAI, Anthropic, Groq, OpenRouter and others), Stripe, Supabase, AWS, GitHub, Slack, SendGrid and more, plus database URLs with passwords and private keys. It also checks whether /.env or /.git/config can be downloaded.
Is a key in my JavaScript really a problem? It’s minified.
Yes. Minifying doesn’t hide strings: a key in your bundle is readable by anyone who opens the browser’s developer tools, and bots scan popular hosting platforms for them all the time. Leaked AI and payment keys are usually abused within hours.
Which keys are fine to have in the browser?
Keys made to be public: Stripe publishable keys (pk_live_), Supabase anon or publishable keys, Firebase config, Mapbox public tokens (pk.), and Google Maps or Firebase API keys restricted to your domain. They’re listed as “public by design”. They’re only safe when the backend enforces access: row level security in Supabase, security rules in Firebase.
Do you store or use the keys you find?
No. The full value never leaves our server’s memory during the check: the report shows only the first few characters and the length. We never call an API with a key we find, never read data from a database, and keep no record of the result.
Can I check a site I don’t own?
The check only downloads public files a browser would, so yes, and it can help you warn a site owner. Keys are masked, so the report doesn’t hand anyone a working secret. If you find a leak on someone else’s site, tell them privately.
Does “no leaks found” mean my app is secure?
It means none of the secrets we know how to recognise are in the code your site serves today. We can’t see code behind a login, pages we didn’t load, or keys in a format we don’t know. And a public key with weak database rules is still a hole: check your Supabase row level security or Firebase rules too.
I found a leaked key. What do I do first?
Revoke or roll it at the provider straight away; removing it from your code isn’t enough, because it’s already been downloaded and may be cached or archived. Then check the provider’s usage or logs for activity you don’t recognise, and move the call behind your own server so the new key never reaches the browser.
Did this tool do what you needed?
Related tools
All toolsMCP Server Security Checker
Scan a remote MCP server for hidden instructions in its tools, risky tools and weak sign-in before your AI agent connects.
Passkey Readiness Checker
Check passkey-endpoints, WebAuthn related origins and the Apple and Android app files, with fixes.
WHOIS Domain Lookup
Who registered a domain, when, and when it expires: check a suspicious sender or your own renewal.