Skip to content

Access control

Auth token kept in localStorageruntime.token-in-local-storage

A token-named key is stored in localStorage, readable by any script on the page (Supabase and Firebase SDK defaults are not reported).

  • In force Rule runtime.token-in-local-storage
  • 3 clauses

At a glance

runtime.token-in-local-storage
Severitylow
CertaintyNeeds review — a heuristic; confirm before changing code
Looks atyour running app, in a real browser
When it runsRuns with --runtime, against your app on localhost

How to fix it

Prefer an HttpOnly session cookie; keep bearer tokens in memory.

Check your own app

Run npx scanlyfix scan --runtime in your project. Every finding gets an id; after fixing, npx scanlyfix verify <id> proves it is gone.

If it is a false positive in your project, silence that one line with // scanlyfix-ignore-next-line runtime.token-in-local-storage -- <why>.

All rules

Your code stays
on your machine

Only findings are uploaded, and only to your own dashboard.