Code
Query reads a whole table with no limitcode.unbounded-query
This query has no filter and no limit, so it returns every row. It works with demo data, then gets slower and more expensive with every user, and an endpoint that returns it hands out the whole table.
- In force Rule code.unbounded-query
- 3 clauses
At a glance
| Severity | medium |
|---|---|
| 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
Paginate: `prisma.post.findMany({ take: 20, skip: page * 20, orderBy: { createdAt: "desc" } })`, `.range(0, 19)` in Supabase, `.limit(20)` in Mongoose/Drizzle, and filter to what the caller is allowed to see.
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 code.unbounded-query -- <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