{"slug": "how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no", "title": "How to check any website for exposed API keys in its JavaScript (5 minutes, no tools)", "summary": "A developer published a five-minute, no-tools method for checking whether a website's JavaScript bundles expose API keys, walking through browser DevTools to search for OpenAI, Stripe, Supabase and AWS credential prefixes and to decode JWT role claims. The guide also covers probing for exposed .env and .git/HEAD files and public source maps, and notes that removing a key from a site does not undo prior exposure. ProofForge offers free read-only checkers that automate the steps for sites you own.", "body_md": "You can check what a website hands to every visitor in a few minutes. No account and no special tools. This is the same look a stranger gets, so it only makes sense on sites you own or have permission to test.\n\nOpen the site, press F12, go to the **Network** tab, reload, and filter by **JS**. Click the largest `.js` files (names like `index-abc123.js` or `main.js`).\n\nUse the search box in the Sources tab (Ctrl+Shift+F) or paste the file into an editor. Look for these prefixes:\n\n| Pattern | What it is | In the browser? | \n|---|---|---|\n| `sk-` or`sk-proj-` | OpenAI secret key | Never | \n| `sk_live_` | Stripe secret key | Never | \n| `pk_live_` | Stripe publishable key | Fine | \n| `eyJ...` with`\"role\":\"service_role\"` | Supabase service role JWT | Never | \n| `eyJ...` with`\"role\":\"anon\"` | Supabase anon key | Fine if access rules are on | \n| `AKIA` | AWS access key ID | Never | \n\nA JWT is three base64 parts separated by dots. Paste the middle part into a base64 decoder, or use a local decoder, and read the `role` claim. Do not paste a real secret into a website you do not trust.\n\nRequest `/.env` and `/.git/HEAD` on the site. A real file shows contents. A normal HTML page means the host is returning its fallback, which is not a leak. Also check whether the bundle ends with a `//# sourceMappingURL=` line and whether that `.map` file loads. A public source map shows your original source code.\n\nRemoving it from the site does not undo exposure. Anything that was served can have been copied.\n\nProofForge has free read-only checkers that do these steps for a site you own: [https://proofforge.live/tools/exposed-api-key-checker](https://proofforge.live/tools/exposed-api-key-checker) and [https://proofforge.live/tools/env-file-checker](https://proofforge.live/tools/env-file-checker) . Key prefix reference and the fix for each: [https://proofforge.live/leaked-keys](https://proofforge.live/leaked-keys)\n\nA clean result is evidence, not a guarantee. It does not see server code or logged-in behavior.", "url": "https://wpnews.pro/news/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no", "canonical_source": "https://dev.to/proofforge_live/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no-tools-5ehn", "published_at": "2026-11-27 22:37:04+00:00", "updated_at": "2026-11-27 22:44:16.343376+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["ProofForge", "OpenAI", "Stripe", "Supabase", "AWS"], "also_reported_by": [], "takeaway": "Searching a site's largest JS bundles for prefixes like sk-, sk_live_, AKIA and service_role JWTs, then requesting /.env and /.git/HEAD and checking for sourceMappingURL, surfaces exposed secrets in minutes without tools.", "recommendation": {"advice": "Scan your own site's JS bundles for sk-, sk_live_, AKIA and service_role JWT prefixes, and confirm /.env, /.git/HEAD and .map files return no real contents.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no", "markdown": "https://wpnews.pro/news/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no.md", "text": "https://wpnews.pro/news/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no.txt", "jsonld": "https://wpnews.pro/news/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no.jsonld"}}