Access control
API route reads or changes data without checking who is callingaccess.route-handler-no-auth
This endpoint touches your database but no authentication check is visible in it, in a wrapper, or in a middleware that covers its path. Anyone who finds the URL — it is in your frontend bundle — can call it directly, without logging in, and read or change other users' data.
- In force Rule access.route-handler-no-auth
- 3 clauses
At a glance
| Severity | high |
|---|---|
| Certainty | Needs review — a heuristic; confirm before changing code |
| Looks at | your source code |
| When it runs | Runs on every scan |
How to fix it
Check the session at the top of the handler (or in a middleware that covers this path) and return 401 when there is none. Then scope every query to the signed-in user.
Check your own app
Run npx scanlyfix scan 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 access.route-handler-no-auth -- <why>.
Your code stays
on your machine
Only findings are uploaded, and only to your own dashboard.
ScanlyFix
Security, privacy pages, SEO and AI visibility checked in one scan, with fixes your AI editor can apply.
Home