Skip to content

Access control

Session cookie readable by JavaScriptruntime.session-cookie-flags

A session cookie is set without HttpOnly (or with SameSite=None but no Secure), so one XSS bug becomes account takeover.

  • In force Rule runtime.session-cookie-flags
  • 3 clauses

At a glance

runtime.session-cookie-flags
Severitymedium
CertaintyObserved — the code as written is the problem
Looks atyour running app, in a real browser
When it runsRuns with --runtime, against your app on localhost

How to fix it

Set session cookies HttpOnly, Secure and SameSite=Lax from the server.

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.session-cookie-flags -- <why>.

All rules

Your code stays
on your machine

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