What the checker answers
Can a visitor retrieve a map linked from deployed JavaScript?
Source maps reconnect minified JavaScript to its original source. They are valuable for debugging, but a publicly reachable production map can reveal source structure, readable names, routes, comments, and sometimes server-adjacent file paths. Public maps are not automatically a vulnerability; they should be an intentional deployment decision.
SiteGuardrail reviews public first-party scripts, follows an observable map reference within the allowed origin, and confirms that the response looks like a map before reporting it. The evidence identifies the affected public URL without reproducing source contents.
Result states
Interpret the result without overclaiming.
A linked map returned publicly and matched the expected map shape.
No matching public map was found in the scripts that completed.
Some scripts, pages, redirects, or responses could not be inspected.
Fix by build system
Keep debugging visibility without publishing source unintentionally.
Next.js
Next.js disables browser production source maps by default. Confirm that productionBrowserSourceMaps has not been enabled unless public maps are deliberate. If error monitoring needs maps, upload them privately during the build and remove them from the public artefact afterwards.
// next.config.ts
const nextConfig = {
productionBrowserSourceMaps: false,
}
export default nextConfigVite
Vite's production build.sourcemap default is false. Remember that the hidden option suppresses the bundle comment but still creates a map file, so it is not a confidentiality control if the file remains publicly deployed.
// vite.config.ts
export default defineConfig({
build: { sourcemap: false },
})Response plan
If the map was not meant to be public
- Remove the map and its public reference from the production artefact.
- Purge the deployment/CDN cache and confirm the old URL no longer returns it.
- Review whether the map contained sensitive paths, comments, routes, or embedded source content.
- Rotate any genuine secret discovered in source; deleting the map alone is not enough.
- Run the focused check again after deployment.
Limitations
A clean result is narrower than “no source maps exist.”
The passive scan does not brute-force filenames, cross authentication boundaries, inspect private error-monitoring uploads, or guarantee that an unlinked map cannot be guessed. Coverage can also be limited by robots, rate limits, script loading, response size, or runtime rendering.