Skip to content

Exposed keys check

Runs in every scan · 6 checks

Check your website's JavaScript for exposed API keysand keep your accounts in your hands.

Find secret keys left in code every visitor downloads, and see which visible keys are perfectly normal.

  • $8 for 1 check, $18 for 5, $59 for 20 (+ applicable tax)
  • No subscription

What we check

What we look at.Each with evidence and a fix.

Part of every Quick Scan, alongside the other checks.

  • Secret keys in public scripts

    Payment, cloud, email, code-hosting and chat keys.

  • Private keys and admin tokens

    Signing keys and tokens that carry admin rights.

  • Keys meant to be public

    Publishable and browser keys shown as normal, with a tip on restrictions.

  • Key-shaped comments

    Values that look like keys inside HTML comments.

  • Internal details

    Internal network addresses and technical error pages on your homepage.

  • API addresses

    A note when your pages reference many API addresses.

Why it matters

Small settings.A big difference for your visitors.

  • Accounts stay yours

    Catch a leaked key before anyone uses it.

  • No surprise bills

    Cloud and email keys can't be spent by others.

  • Calm about the normal ones

    Public-by-design keys are labelled as such.

What a finding looks like

Plain English.With the evidence behind it.

Open the full sample report

K1 · exposed-keys

Move an email-sending key out of your public JavaScript

High Likely Hours

What it means
A value shaped like an email service API key is written into a script every visitor downloads. Moving it to your server and issuing a new key keeps your email account in your hands.
Evidence
/assets/app.js
SG.••••••••••••.••••7Qx  (shown shortened)
Fix
Revoke the key in the provider's dashboard, issue a new one, and call the provider from your server so the key never reaches the browser.

How to fix it

A few clear steps.In the order to take them.

Your report has the exact fix for your site, ready to forward to whoever looks after it.

  1. Revoke the exposed key in the provider's dashboard and issue a new one.

  2. Call the provider from your server or a serverless function, so the key never reaches the browser.

  3. Restrict keys that are meant to be public to your own domain, and check their access rules.

  4. Add a secret scanner to your build so a key can't slip into a bundle again.

Keep the key on the server
// server-side only, never in the browser bundle
const key = process.env.EMAIL_API_KEY;

Questions

Exposed keys questions.

Something else? support@scandefend.com

Is it a problem if my Stripe publishable key is visible?

No. Publishable keys, Firebase web configuration and Supabase anon keys are made to be shipped to browsers. The report shows them as normal and suggests checking their restrictions and access rules in each provider's dashboard.

I've found a secret key in my JavaScript. What now?

Revoke it and issue a new one first, then move the code that uses it to your server. Removing it from the script alone isn't enough, because copies may already exist.

Do you use or store the keys you find?

Never. We don't try a key, and the full value isn't stored: the report shows a shortened form so you can recognise it.

Which scripts do you read?

The scripts your homepage loads, including ones from your own build and from other sites. Code that only loads after sign-in sits outside a Quick Scan.

See what your website shows.Know what to fix first.

See pricing