My source maps are public. Does it matter?

A public .js.map file lets anyone download your original source, comments and all. It's not a key leak, but it makes every other mistake easier to find.

How to fix it

  1. Vite: set build: { sourcemap: false } in vite.config, so the maps are never built. Use 'hidden' instead only if your error tracker needs the maps. It drops the comment that points to them but still builds the files, so you must also do step 3.
  2. Next.js: leave productionBrowserSourceMaps unset or false in next.config.
  3. If you use Sentry or another error tracker, upload the maps to it during the build and delete the .map files from the deployed output. This is required if you chose 'hidden', because anyone can guess a .map address.
  4. Redeploy, then scan again. The scan only finds maps that a script points to, so it can't see hidden ones. If you used 'hidden', also open https://<your-site>/assets/<chunk>.js.map for one of your script files and check that it returns 404.

Common questions

Do source maps slow my site?

No. Browsers only fetch them when dev tools are open. The cost is exposure, not speed.

Is 'hidden' safe?

Only partly. It drops the comment that points to your maps, but the .map files are still built and anyone who guesses their address can download them. Delete them from the deployed output and check that one returns 404, because the scan can't see hidden maps.

Why does the grade drop to C?

Public source is a real exposure, so it caps the grade at C until it's fixed.

Fixed it? Scan again to confirm.

Scan your app for leaks