Skip to content

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

code.unbounded-query
Severitymedium
CertaintyNeeds review — a heuristic; confirm before changing code
Looks atyour source code
When it runsRuns 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>.

All rules

Your code stays
on your machine

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