loadwise 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1121) hide show
  1. package/README.md +378 -369
  2. package/dist/bin/loadwise.js +104 -0
  3. package/dist/lib/accessibility/analyze.js +26 -0
  4. package/dist/lib/accessibility/angular-inline.js +43 -0
  5. package/dist/lib/accessibility/cli.js +11 -0
  6. package/dist/lib/accessibility/frontend-detect.js +99 -0
  7. package/dist/lib/accessibility/jsx-elements.js +196 -0
  8. package/dist/lib/accessibility/markup-files.js +41 -0
  9. package/dist/lib/accessibility/markup.js +34 -0
  10. package/dist/lib/accessibility/rule-ids.js +51 -0
  11. package/dist/lib/accessibility/rules.js +492 -0
  12. package/dist/lib/accessibility/template-attributes.js +148 -0
  13. package/dist/lib/accessibility/template-elements.js +451 -0
  14. package/dist/lib/accessibility/template-file.js +183 -0
  15. package/dist/lib/editor/accessibility-examples.js +112 -0
  16. package/dist/lib/editor/diagnostics.js +365 -0
  17. package/dist/lib/editor/dismissals.js +111 -0
  18. package/dist/lib/editor/language-server.js +437 -0
  19. package/dist/lib/editor/reliability-examples.js +151 -0
  20. package/dist/lib/editor/scan-session.js +334 -0
  21. package/dist/lib/editor/server-commands.js +232 -0
  22. package/dist/lib/editor/workspace-paths.js +22 -0
  23. package/dist/lib/maintainability/analysis/analyze-source.js +92 -0
  24. package/dist/lib/maintainability/analysis/snapshot-context.js +64 -0
  25. package/dist/lib/maintainability/analysis/source-facts.js +39 -0
  26. package/dist/lib/maintainability/analysis/walk.js +17 -0
  27. package/dist/lib/maintainability/architecture/architecture-nest.js +103 -0
  28. package/dist/lib/maintainability/architecture/architecture.js +482 -0
  29. package/dist/lib/maintainability/cli/apply-fix.js +85 -0
  30. package/dist/lib/maintainability/cli/changed-lines.js +135 -0
  31. package/dist/lib/maintainability/cli/changed-output.js +22 -0
  32. package/dist/lib/maintainability/cli/finding-ids.js +39 -0
  33. package/dist/lib/maintainability/cli/fix-cli.js +209 -0
  34. package/dist/lib/maintainability/cli/fix-text.js +11 -0
  35. package/dist/lib/maintainability/cli/git-inventory.js +116 -0
  36. package/dist/lib/maintainability/cli/inputs.js +234 -0
  37. package/dist/lib/maintainability/cli/review-directive.js +91 -0
  38. package/dist/lib/maintainability/cli/site-fix.js +221 -0
  39. package/dist/lib/maintainability/cli.js +411 -0
  40. package/dist/lib/maintainability/entry-points/config-entry-points.js +86 -0
  41. package/dist/lib/maintainability/entry-points/entry-points.js +603 -0
  42. package/dist/lib/maintainability/polyglot.js +174 -0
  43. package/dist/lib/maintainability/project.js +116 -0
  44. package/dist/lib/maintainability/quality/deprecated-apis.js +170 -0
  45. package/dist/lib/maintainability/quality/duplicates.js +326 -0
  46. package/dist/lib/maintainability/quality/functions.js +315 -0
  47. package/dist/lib/maintainability/quality/size-limits.js +95 -0
  48. package/dist/lib/maintainability/quality/stray-console.js +354 -0
  49. package/dist/lib/maintainability/quality/tsconfig-strict.js +74 -0
  50. package/dist/lib/maintainability/quality/type-safety-hygiene.js +562 -0
  51. package/dist/lib/maintainability/rule-ids.js +82 -0
  52. package/dist/lib/maintainability/scan-changed.js +72 -0
  53. package/dist/lib/maintainability/scan-worker.js +38 -0
  54. package/dist/lib/maintainability/scan.js +246 -0
  55. package/dist/lib/maintainability/site-fixes/branches.js +425 -0
  56. package/dist/lib/maintainability/site-fixes/control-flow.js +67 -0
  57. package/dist/lib/maintainability/site-fixes/deprecated-apis.js +230 -0
  58. package/dist/lib/maintainability/site-fixes/duplicate-arrows.js +345 -0
  59. package/dist/lib/maintainability/site-fixes/duplicate-edits.js +393 -0
  60. package/dist/lib/maintainability/site-fixes/duplicate-methods.js +414 -0
  61. package/dist/lib/maintainability/site-fixes/duplicate-module-style.js +90 -0
  62. package/dist/lib/maintainability/site-fixes/duplicates.js +126 -0
  63. package/dist/lib/maintainability/site-fixes/extract-block-measure.js +131 -0
  64. package/dist/lib/maintainability/site-fixes/extract-block.js +38 -0
  65. package/dist/lib/maintainability/site-fixes/parameters.js +460 -0
  66. package/dist/lib/maintainability/site-fixes/stray-console.js +21 -0
  67. package/dist/lib/maintainability/site-fixes/unused-bindings.js +180 -0
  68. package/dist/lib/maintainability/unused/ancestor-aliases.js +35 -0
  69. package/dist/lib/maintainability/unused/module-usage-dynamic.js +175 -0
  70. package/dist/lib/maintainability/unused/module-usage.js +574 -0
  71. package/dist/lib/maintainability/unused/unused-bindings.js +182 -0
  72. package/dist/lib/performance/analysis/call-syntax.js +27 -0
  73. package/dist/lib/performance/analysis/function-kinds.js +9 -0
  74. package/dist/lib/performance/analysis/missing-packages.js +116 -0
  75. package/dist/lib/performance/analysis/package-types.js +57 -0
  76. package/dist/lib/performance/analysis/review-context.js +422 -0
  77. package/dist/lib/performance/analysis/schema-tooling.js +191 -0
  78. package/dist/lib/performance/analysis/scope-evidence.js +137 -0
  79. package/dist/lib/performance/analysis/source-inputs.js +83 -0
  80. package/dist/lib/performance/analysis/source-options.js +103 -0
  81. package/dist/lib/performance/analysis/source-pillars.js +23 -0
  82. package/dist/lib/performance/analysis/source-text.js +59 -0
  83. package/dist/lib/performance/analysis/unscanned-javascript.js +76 -0
  84. package/dist/lib/performance/analyze.js +257 -0
  85. package/dist/lib/performance/async/async-errors.js +190 -0
  86. package/dist/lib/performance/async/await-before-early-exit.js +176 -0
  87. package/dist/lib/performance/async/awaits.js +70 -0
  88. package/dist/lib/performance/async/discarded-error-result.js +46 -0
  89. package/dist/lib/performance/async/floating-promises.js +261 -0
  90. package/dist/lib/performance/async/json-input-origin.js +250 -0
  91. package/dist/lib/performance/async/literal-awaits.js +190 -0
  92. package/dist/lib/performance/async/promise-return-escapes-catch.js +96 -0
  93. package/dist/lib/performance/async/retry-backoff.js +132 -0
  94. package/dist/lib/performance/async/return-in-finally.js +12 -0
  95. package/dist/lib/performance/async/return-newline.js +54 -0
  96. package/dist/lib/performance/async/stream-errors.js +493 -0
  97. package/dist/lib/performance/cli/changed-lines.js +141 -0
  98. package/dist/lib/performance/cli/cli-output.js +176 -0
  99. package/dist/lib/performance/cli/cli-policy.js +110 -0
  100. package/dist/lib/performance/cli/cli-scan.js +444 -0
  101. package/dist/lib/performance/cli/editor-signal.js +57 -0
  102. package/dist/lib/performance/cli/finding-ids.js +102 -0
  103. package/dist/lib/performance/cli/finding-text.js +117 -0
  104. package/dist/lib/performance/cli/fix-cli.js +216 -0
  105. package/dist/lib/performance/cli/scan-outcome.js +29 -0
  106. package/dist/lib/performance/cli/watch.js +99 -0
  107. package/dist/lib/performance/cli.js +101 -0
  108. package/dist/lib/performance/collections/collection-bindings.js +283 -0
  109. package/dist/lib/performance/collections/collection-bounds.js +247 -0
  110. package/dist/lib/performance/collections/collection-copy.js +169 -0
  111. package/dist/lib/performance/collections/collection-lookups.js +432 -0
  112. package/dist/lib/performance/collections/collection-reduce.js +340 -0
  113. package/dist/lib/performance/collections/collections.js +25 -0
  114. package/dist/lib/performance/collections/json-clone.js +92 -0
  115. package/dist/lib/performance/collections/json-parse-context.js +99 -0
  116. package/dist/lib/performance/collections/list-counts.js +321 -0
  117. package/dist/lib/performance/collections/list-overfetch.js +214 -0
  118. package/dist/lib/performance/collections/memory-growth.js +514 -0
  119. package/dist/lib/performance/collections/repeated.js +200 -0
  120. package/dist/lib/performance/collections/sort-extreme.js +142 -0
  121. package/dist/lib/performance/collections/workbook-decodes.js +147 -0
  122. package/dist/lib/performance/contracts/cli.js +231 -0
  123. package/dist/lib/performance/contracts/dto.js +244 -0
  124. package/dist/lib/performance/contracts/openapi.js +363 -0
  125. package/dist/lib/performance/datastores/pg-fragments.js +300 -0
  126. package/dist/lib/performance/datastores/pg-integrity.js +115 -0
  127. package/dist/lib/performance/datastores/pooling.js +193 -0
  128. package/dist/lib/performance/datastores/postgres.js +200 -0
  129. package/dist/lib/performance/datastores/redis-client.js +19 -0
  130. package/dist/lib/performance/datastores/redis-keys.js +78 -0
  131. package/dist/lib/performance/datastores/redis.js +188 -0
  132. package/dist/lib/performance/datastores/session-store.js +86 -0
  133. package/dist/lib/performance/db/cli.js +470 -0
  134. package/dist/lib/performance/db/redact.js +126 -0
  135. package/dist/lib/performance/engine/native-checker.js +319 -0
  136. package/dist/lib/performance/engine/native-runtime.js +25 -0
  137. package/dist/lib/performance/engine/native-syntax.js +136 -0
  138. package/dist/lib/performance/engine/native-workspaces.js +31 -0
  139. package/dist/lib/performance/engine/native.js +382 -0
  140. package/dist/lib/performance/frontend/frontend-dom-perf.js +310 -0
  141. package/dist/lib/performance/frontend/frontend-helpers.js +93 -0
  142. package/dist/lib/performance/frontend/frontend-perf.js +479 -0
  143. package/dist/lib/performance/frontend/frontend-render-perf.js +375 -0
  144. package/dist/lib/performance/index-rules/index-rules-foreign-keys.js +81 -0
  145. package/dist/lib/performance/index-rules/index-rules-order.js +152 -0
  146. package/dist/lib/performance/index-rules/index-rules-pattern.js +137 -0
  147. package/dist/lib/performance/index-rules/index-rules-table.js +286 -0
  148. package/dist/lib/performance/index-rules/index-rules.js +107 -0
  149. package/dist/lib/performance/index-rules/redundant-indexes.js +403 -0
  150. package/dist/lib/performance/migrations/cli.js +204 -0
  151. package/dist/lib/performance/models/index.js +284 -0
  152. package/dist/lib/performance/orm/cartesian-includes.js +364 -0
  153. package/dist/lib/performance/orm/drizzle-write-preflight.js +195 -0
  154. package/dist/lib/performance/orm/drizzle.js +288 -0
  155. package/dist/lib/performance/orm/filter-existence.js +149 -0
  156. package/dist/lib/performance/orm/find-then-create.js +281 -0
  157. package/dist/lib/performance/orm/last-insert-id.js +120 -0
  158. package/dist/lib/performance/orm/mongoose-patterns.js +245 -0
  159. package/dist/lib/performance/orm/offset-pagination.js +166 -0
  160. package/dist/lib/performance/orm/orm-owners.js +145 -0
  161. package/dist/lib/performance/orm/orm-queries.js +496 -0
  162. package/dist/lib/performance/orm/page-counts.js +262 -0
  163. package/dist/lib/performance/orm/prisma-aggregates.js +125 -0
  164. package/dist/lib/performance/orm/prisma-integrity.js +239 -0
  165. package/dist/lib/performance/orm/prisma.js +307 -0
  166. package/dist/lib/performance/orm/typeorm-projection.js +261 -0
  167. package/dist/lib/performance/orm/typeorm-transaction-loops.js +143 -0
  168. package/dist/lib/performance/orm/typeorm-unused-count.js +36 -0
  169. package/dist/lib/performance/orm/typeorm-updates.js +268 -0
  170. package/dist/lib/performance/orm/unbounded-list-queries.js +598 -0
  171. package/dist/lib/performance/polyglot.js +215 -0
  172. package/dist/lib/performance/projects.js +483 -0
  173. package/dist/lib/performance/query-loops/dependent-writes.js +228 -0
  174. package/dist/lib/performance/query-loops/guard-queries.js +356 -0
  175. package/dist/lib/performance/query-loops/notification-loops.js +176 -0
  176. package/dist/lib/performance/query-loops/parallel-reads.js +139 -0
  177. package/dist/lib/performance/query-loops/query-loop-batch.js +188 -0
  178. package/dist/lib/performance/query-loops/query-loop-bounds.js +219 -0
  179. package/dist/lib/performance/query-loops/query-loop-exits.js +180 -0
  180. package/dist/lib/performance/query-loops/query-loop-helpers.js +42 -0
  181. package/dist/lib/performance/query-loops/query-loop-memo.js +81 -0
  182. package/dist/lib/performance/query-loops/query-loop-pagination.js +130 -0
  183. package/dist/lib/performance/query-loops/query-loops.js +29 -0
  184. package/dist/lib/performance/query-loops/query-results.js +179 -0
  185. package/dist/lib/performance/query-loops/queue-loops.js +87 -0
  186. package/dist/lib/performance/query-loops/sequential-loops.js +557 -0
  187. package/dist/lib/performance/query-loops/service-call-resolution.js +54 -0
  188. package/dist/lib/performance/query-loops/service-loop-collections.js +263 -0
  189. package/dist/lib/performance/query-loops/service-loops.js +416 -0
  190. package/dist/lib/performance/query-loops/transaction-io.js +428 -0
  191. package/dist/lib/performance/request/axios-timeout-defaults.js +538 -0
  192. package/dist/lib/performance/request/backend-mastery.js +444 -0
  193. package/dist/lib/performance/request/http-options-writes.js +204 -0
  194. package/dist/lib/performance/request/http-timeouts.js +499 -0
  195. package/dist/lib/performance/request/llm-max-tokens.js +53 -0
  196. package/dist/lib/performance/request/mongoose-lean.js +149 -0
  197. package/dist/lib/performance/request/node-event-listener-leak.js +160 -0
  198. package/dist/lib/performance/request/node-fs-context.js +397 -0
  199. package/dist/lib/performance/request/node-fs.js +452 -0
  200. package/dist/lib/performance/request/password-hashing.js +218 -0
  201. package/dist/lib/performance/request/phase5-ast.js +144 -0
  202. package/dist/lib/performance/request/phase5-rules.js +317 -0
  203. package/dist/lib/performance/request/pure-js-hashing.js +97 -0
  204. package/dist/lib/performance/request/request-handlers.js +429 -0
  205. package/dist/lib/performance/request/request-heavy-work.js +135 -0
  206. package/dist/lib/performance/request/request-inputs.js +303 -0
  207. package/dist/lib/performance/request/unbounded-promise-all.js +426 -0
  208. package/dist/lib/performance/request/upload-limits.js +145 -0
  209. package/dist/lib/performance/rule-ids.js +371 -0
  210. package/dist/lib/performance/schema/drizzle-schema.js +278 -0
  211. package/dist/lib/performance/schema/mongoose-schema.js +189 -0
  212. package/dist/lib/performance/schema/prisma-owners.js +118 -0
  213. package/dist/lib/performance/schema/prisma-schema.js +472 -0
  214. package/dist/lib/performance/schema/query-site-support.js +60 -0
  215. package/dist/lib/performance/schema/query-sites-drizzle.js +220 -0
  216. package/dist/lib/performance/schema/query-sites-mongoose.js +140 -0
  217. package/dist/lib/performance/schema/query-sites-prisma.js +173 -0
  218. package/dist/lib/performance/schema/query-sites-sequelize.js +133 -0
  219. package/dist/lib/performance/schema/query-sites-typeorm.js +180 -0
  220. package/dist/lib/performance/schema/raw-sql-sites.js +284 -0
  221. package/dist/lib/performance/schema/sequelize-schema.js +322 -0
  222. package/dist/lib/performance/schema/ts-helpers.js +130 -0
  223. package/dist/lib/performance/schema/typeorm-schema.js +262 -0
  224. package/dist/lib/performance/site-fix.js +271 -0
  225. package/dist/lib/performance/site-fixes/await-before-early-exit.js +121 -0
  226. package/dist/lib/performance/site-fixes/delete-preflight.js +99 -0
  227. package/dist/lib/performance/site-fixes/error-handling.js +115 -0
  228. package/dist/lib/performance/site-fixes/helpers.js +200 -0
  229. package/dist/lib/performance/site-fixes/http-timeouts.js +96 -0
  230. package/dist/lib/performance/site-fixes/json-parse.js +114 -0
  231. package/dist/lib/performance/site-fixes/last-insert-id.js +230 -0
  232. package/dist/lib/performance/site-fixes/list-queries.js +164 -0
  233. package/dist/lib/performance/site-fixes/literal-awaits.js +430 -0
  234. package/dist/lib/performance/site-fixes/page-counts.js +88 -0
  235. package/dist/lib/performance/site-fixes/prisma-aggregates.js +455 -0
  236. package/dist/lib/performance/site-fixes/promise-catch.js +174 -0
  237. package/dist/lib/performance/site-fixes/query-shapes.js +573 -0
  238. package/dist/lib/performance/site-fixes/scope-names.js +30 -0
  239. package/dist/lib/performance/site-fixes/service-loop-ast.js +84 -0
  240. package/dist/lib/performance/site-fixes/service-loop-callee.js +57 -0
  241. package/dist/lib/performance/site-fixes/small-rewrites.js +210 -0
  242. package/dist/lib/performance/site-fixes/typeorm-updates.js +277 -0
  243. package/dist/lib/performance/site-fixes/typeorm.js +239 -0
  244. package/dist/lib/performance/site-fixes/upload-limits.js +91 -0
  245. package/dist/lib/performance/site-fixes/workbook-decodes.js +254 -0
  246. package/dist/lib/reliability/analyze.js +47 -0
  247. package/dist/lib/reliability/boundary-access.js +521 -0
  248. package/dist/lib/reliability/callback-completion.js +649 -0
  249. package/dist/lib/reliability/callback-loop-overrides.js +63 -0
  250. package/dist/lib/reliability/child-process.js +528 -0
  251. package/dist/lib/reliability/cli.js +20 -0
  252. package/dist/lib/reliability/crlf-line-split.js +593 -0
  253. package/dist/lib/reliability/error-values.js +242 -0
  254. package/dist/lib/reliability/parse-failure-files.js +292 -0
  255. package/dist/lib/reliability/parse-failure-flow.js +196 -0
  256. package/dist/lib/reliability/parse-failure-paths.js +405 -0
  257. package/dist/lib/reliability/parse-failure-reset.js +482 -0
  258. package/dist/lib/reliability/pool-timeout.js +54 -0
  259. package/dist/lib/reliability/react-bugs.js +401 -0
  260. package/dist/lib/reliability/react-effect-bindings.js +107 -0
  261. package/dist/lib/reliability/react-state-aliases.js +313 -0
  262. package/dist/lib/reliability/react-state-initial.js +201 -0
  263. package/dist/lib/reliability/react-state-order.js +176 -0
  264. package/dist/lib/reliability/react-state-paths.js +86 -0
  265. package/dist/lib/reliability/react-state-setter.js +398 -0
  266. package/dist/lib/reliability/react-state-walker.js +654 -0
  267. package/dist/lib/reliability/react-state.js +49 -0
  268. package/dist/lib/reliability/resource-leaks.js +523 -0
  269. package/dist/lib/reliability/rule-ids.js +276 -0
  270. package/dist/lib/reliability/site-fixes/boundary-access.js +140 -0
  271. package/dist/lib/reliability/site-fixes/suspicious-logic.js +116 -0
  272. package/dist/lib/reliability/source-helpers.js +38 -0
  273. package/dist/lib/reliability/sql-insert-terminator.js +106 -0
  274. package/dist/lib/reliability/standalone-sources.js +93 -0
  275. package/dist/lib/reliability/suspicious-logic.js +423 -0
  276. package/dist/lib/reliability/swallowed-errors.js +371 -0
  277. package/dist/lib/reliability/switch-exhaustive.js +425 -0
  278. package/dist/lib/reliability/switch-fallthrough.js +152 -0
  279. package/dist/lib/reliability/test-cleanup-after-await.js +326 -0
  280. package/dist/lib/reliability/uncaught-exception.js +402 -0
  281. package/dist/lib/reliability/walk.js +16 -0
  282. package/dist/lib/security/analyze.js +129 -0
  283. package/dist/lib/security/auth-crypto/comparison.js +97 -0
  284. package/dist/lib/security/auth-crypto/hashing.js +302 -0
  285. package/dist/lib/security/auth-crypto/index.js +33 -0
  286. package/dist/lib/security/auth-crypto/jwt.js +522 -0
  287. package/dist/lib/security/auth-crypto/plaintext-password.js +171 -0
  288. package/dist/lib/security/auth-crypto/random.js +151 -0
  289. package/dist/lib/security/auth-crypto/rate-limits.js +328 -0
  290. package/dist/lib/security/auth-crypto/secrets.js +331 -0
  291. package/dist/lib/security/auth-crypto/shared.js +105 -0
  292. package/dist/lib/security/auth-crypto/transport-and-ciphers.js +386 -0
  293. package/dist/lib/security/bindings.js +286 -0
  294. package/dist/lib/security/cli.js +304 -0
  295. package/dist/lib/security/declarations.js +25 -0
  296. package/dist/lib/security/deps/cli.js +75 -0
  297. package/dist/lib/security/deps/lockfiles.js +310 -0
  298. package/dist/lib/security/deps/osv.js +217 -0
  299. package/dist/lib/security/deps/scan.js +69 -0
  300. package/dist/lib/security/examples/injection.cjs +58 -0
  301. package/dist/lib/security/exposure/backend-security-mastery.js +84 -0
  302. package/dist/lib/security/exposure/client-env.js +121 -0
  303. package/dist/lib/security/exposure/cookies.js +173 -0
  304. package/dist/lib/security/exposure/cors-origin-regex.js +177 -0
  305. package/dist/lib/security/exposure/cors.js +217 -0
  306. package/dist/lib/security/exposure/error-responses.js +453 -0
  307. package/dist/lib/security/exposure/frontend-security.js +583 -0
  308. package/dist/lib/security/exposure/graphql.js +131 -0
  309. package/dist/lib/security/exposure/jsx-url.js +336 -0
  310. package/dist/lib/security/exposure/literals.js +186 -0
  311. package/dist/lib/security/exposure/logging.js +168 -0
  312. package/dist/lib/security/exposure/mass-assignment.js +165 -0
  313. package/dist/lib/security/exposure/next-image-config.js +34 -0
  314. package/dist/lib/security/exposure/package-manifest.js +72 -0
  315. package/dist/lib/security/exposure/password-response.js +315 -0
  316. package/dist/lib/security/exposure/prototype-pollution.js +291 -0
  317. package/dist/lib/security/exposure/reflected-xss.js +57 -0
  318. package/dist/lib/security/exposure/storage-acl.js +87 -0
  319. package/dist/lib/security/exposure/template-autoescape.js +39 -0
  320. package/dist/lib/security/exposure/url-secrets.js +164 -0
  321. package/dist/lib/security/exposure/validation-pipe.js +36 -0
  322. package/dist/lib/security/exposure/xml.js +28 -0
  323. package/dist/lib/security/file-context.js +94 -0
  324. package/dist/lib/security/files/project-files.js +103 -0
  325. package/dist/lib/security/files/review-directive.js +30 -0
  326. package/dist/lib/security/files/secrets.js +123 -0
  327. package/dist/lib/security/injection/code.js +145 -0
  328. package/dist/lib/security/injection/command.js +180 -0
  329. package/dist/lib/security/injection/escape-replace.js +330 -0
  330. package/dist/lib/security/injection/index.js +23 -0
  331. package/dist/lib/security/injection/nosql.js +353 -0
  332. package/dist/lib/security/injection/redos.js +453 -0
  333. package/dist/lib/security/injection/regex.js +67 -0
  334. package/dist/lib/security/injection/rule-ids.js +18 -0
  335. package/dist/lib/security/injection/shared.js +137 -0
  336. package/dist/lib/security/injection/sql.js +513 -0
  337. package/dist/lib/security/pg-dynamic-query.js +30 -0
  338. package/dist/lib/security/pg-identifier-guards.js +155 -0
  339. package/dist/lib/security/phase5-rules.js +539 -0
  340. package/dist/lib/security/polyglot.js +8 -0
  341. package/dist/lib/security/request-forgery/open-redirect-query.js +338 -0
  342. package/dist/lib/security/request-forgery/open-redirect.js +371 -0
  343. package/dist/lib/security/request-forgery/path-traversal.js +103 -0
  344. package/dist/lib/security/request-forgery/shared.js +359 -0
  345. package/dist/lib/security/request-forgery/ssrf.js +133 -0
  346. package/dist/lib/security/request-forgery/upload-filename.js +75 -0
  347. package/dist/lib/security/request-forgery/zip-slip.js +42 -0
  348. package/dist/lib/security/rule-descriptions.js +89 -0
  349. package/dist/lib/security/rule-ids.js +150 -0
  350. package/dist/lib/security/scope/drizzle-policy.js +197 -0
  351. package/dist/lib/security/scope/query-policy.js +156 -0
  352. package/dist/lib/security/site-fixes/auth-crypto.js +224 -0
  353. package/dist/lib/security/site-fixes/injection.js +119 -0
  354. package/dist/lib/security/site-fixes/jwt.js +89 -0
  355. package/dist/lib/security/taint/archive-sources.js +127 -0
  356. package/dist/lib/security/taint/filename-guard.js +112 -0
  357. package/dist/lib/security/taint/guards.js +346 -0
  358. package/dist/lib/security/taint/index.js +615 -0
  359. package/dist/lib/security/taint/propagate.js +120 -0
  360. package/dist/lib/security/taint/resolution-cache.js +105 -0
  361. package/dist/lib/security/taint/sanitizers.js +71 -0
  362. package/dist/lib/security/taint/sources.js +360 -0
  363. package/dist/lib/security/taint/summaries.js +219 -0
  364. package/dist/lib/security/taint/url-parts.js +273 -0
  365. package/dist/lib/security/taint/validators.js +420 -0
  366. package/dist/lib/security/vm-module-members.js +52 -0
  367. package/dist/lib/shared/agent/agent-init.js +236 -0
  368. package/dist/lib/shared/agent/agent-verify.js +239 -0
  369. package/dist/lib/shared/agent/git-hook.js +153 -0
  370. package/dist/lib/shared/agent/pending-review.js +119 -0
  371. package/dist/lib/shared/agent/review-mcp.js +262 -0
  372. package/dist/lib/shared/analysis/ast-semantics.js +453 -0
  373. package/dist/lib/shared/analysis/caller-name-inventory.js +21 -0
  374. package/dist/lib/shared/analysis/declaration-path.js +87 -0
  375. package/dist/lib/shared/analysis/execution-context.js +397 -0
  376. package/dist/lib/shared/analysis/function-summaries.js +571 -0
  377. package/dist/lib/shared/analysis/function-syntax.js +86 -0
  378. package/dist/lib/shared/analysis/hot-path-graph.js +268 -0
  379. package/dist/lib/shared/analysis/scan-cache.js +351 -0
  380. package/dist/lib/shared/check.js +272 -0
  381. package/dist/lib/shared/config-root-files.js +28 -0
  382. package/dist/lib/shared/config.js +286 -0
  383. package/dist/lib/shared/fix/fix-command.js +23 -0
  384. package/dist/lib/shared/fix/fix-convergence.js +545 -0
  385. package/dist/lib/shared/fix/fix-handoff.js +57 -0
  386. package/dist/lib/shared/fix/fix-history.js +305 -0
  387. package/dist/lib/shared/fix/fix-hunks.js +117 -0
  388. package/dist/lib/shared/fix/fix-presentation-comments.js +254 -0
  389. package/dist/lib/shared/fix/fix-presentation-style.js +230 -0
  390. package/dist/lib/shared/fix/fix-presentation.js +177 -0
  391. package/dist/lib/shared/fix/fix-rationales.js +152 -0
  392. package/dist/lib/shared/fix/fix-recipes.js +101 -0
  393. package/dist/lib/shared/fix/fix-typecheck.js +222 -0
  394. package/dist/lib/shared/fix/project-file-access.js +172 -0
  395. package/dist/lib/shared/fix.js +258 -0
  396. package/dist/lib/shared/formats/finding-location.js +35 -0
  397. package/dist/lib/shared/formats/sarif.js +91 -0
  398. package/dist/lib/shared/package-root.js +18 -0
  399. package/dist/lib/shared/reporting/baseline-lines.js +127 -0
  400. package/dist/lib/shared/reporting/baseline.js +239 -0
  401. package/dist/lib/shared/reporting/coverage-notes.js +35 -0
  402. package/dist/lib/shared/reporting/flow-skips.js +87 -0
  403. package/dist/lib/shared/reporting/impact-levels.js +49 -0
  404. package/dist/lib/shared/reporting/pillar-rules.js +6 -0
  405. package/dist/lib/shared/reporting/pillars.js +377 -0
  406. package/dist/lib/shared/reporting/rule-docs.js +21 -0
  407. package/dist/lib/shared/reporting/source-report.js +157 -0
  408. package/dist/lib/shared/system/atomic-write.js +77 -0
  409. package/dist/lib/shared/system/terminal-safe.js +16 -0
  410. package/dist/lib/shared/types/typescript-outer-expression.js +1 -0
  411. package/dist/lib/shared/workspaces.js +434 -0
  412. package/dist/polyglot/maintainability/rules.js +159 -0
  413. package/package.json +36 -28
  414. package/plugin/.claude-plugin/plugin.json +2 -2
  415. package/plugin/hooks/check-edited-file.mjs +151 -0
  416. package/plugin/hooks/hooks.json +1 -1
  417. package/schema/loadwise.config.schema.json +16 -0
  418. package/bin/loadwise.js +0 -102
  419. package/lib/accessibility/analyze.js +0 -26
  420. package/lib/accessibility/angular-inline.js +0 -43
  421. package/lib/accessibility/cli.js +0 -11
  422. package/lib/accessibility/frontend-detect.js +0 -99
  423. package/lib/accessibility/jsx-elements.js +0 -110
  424. package/lib/accessibility/markup-files.js +0 -41
  425. package/lib/accessibility/markup.js +0 -24
  426. package/lib/accessibility/rule-ids.js +0 -39
  427. package/lib/accessibility/rules.js +0 -293
  428. package/lib/accessibility/template-attributes.js +0 -137
  429. package/lib/accessibility/template-elements.js +0 -434
  430. package/lib/accessibility/template-file.js +0 -183
  431. package/lib/editor/accessibility-examples.js +0 -89
  432. package/lib/editor/diagnostics.js +0 -365
  433. package/lib/editor/dismissals.js +0 -111
  434. package/lib/editor/language-server.js +0 -437
  435. package/lib/editor/reliability-examples.js +0 -136
  436. package/lib/editor/scan-session.js +0 -334
  437. package/lib/editor/server-commands.js +0 -232
  438. package/lib/editor/workspace-paths.js +0 -22
  439. package/lib/maintainability/analyze-source.js +0 -95
  440. package/lib/maintainability/ancestor-aliases.js +0 -35
  441. package/lib/maintainability/apply-fix.js +0 -85
  442. package/lib/maintainability/architecture-nest.js +0 -103
  443. package/lib/maintainability/architecture.js +0 -482
  444. package/lib/maintainability/changed-lines.js +0 -135
  445. package/lib/maintainability/changed-output.js +0 -21
  446. package/lib/maintainability/cli.js +0 -410
  447. package/lib/maintainability/config-entry-points.js +0 -86
  448. package/lib/maintainability/deprecated-apis.js +0 -170
  449. package/lib/maintainability/duplicates.js +0 -326
  450. package/lib/maintainability/entry-points.js +0 -603
  451. package/lib/maintainability/finding-ids.js +0 -46
  452. package/lib/maintainability/fix-cli.js +0 -235
  453. package/lib/maintainability/fix-text.js +0 -11
  454. package/lib/maintainability/functions.js +0 -315
  455. package/lib/maintainability/inputs.js +0 -231
  456. package/lib/maintainability/module-usage-dynamic.js +0 -175
  457. package/lib/maintainability/module-usage.js +0 -574
  458. package/lib/maintainability/polyglot.js +0 -173
  459. package/lib/maintainability/project.js +0 -116
  460. package/lib/maintainability/review-directive.js +0 -91
  461. package/lib/maintainability/rule-ids.js +0 -82
  462. package/lib/maintainability/scan-changed.js +0 -70
  463. package/lib/maintainability/scan-worker.js +0 -38
  464. package/lib/maintainability/scan.js +0 -242
  465. package/lib/maintainability/site-fix.js +0 -221
  466. package/lib/maintainability/site-fixes/branches.js +0 -418
  467. package/lib/maintainability/site-fixes/control-flow.js +0 -67
  468. package/lib/maintainability/site-fixes/deprecated-apis.js +0 -67
  469. package/lib/maintainability/site-fixes/duplicate-arrows.js +0 -343
  470. package/lib/maintainability/site-fixes/duplicate-edits.js +0 -396
  471. package/lib/maintainability/site-fixes/duplicate-methods.js +0 -407
  472. package/lib/maintainability/site-fixes/duplicates.js +0 -125
  473. package/lib/maintainability/site-fixes/extract-block-measure.js +0 -131
  474. package/lib/maintainability/site-fixes/extract-block.js +0 -38
  475. package/lib/maintainability/site-fixes/parameters.js +0 -460
  476. package/lib/maintainability/site-fixes/stray-console.js +0 -21
  477. package/lib/maintainability/site-fixes/unused-bindings.js +0 -158
  478. package/lib/maintainability/size-limits.js +0 -94
  479. package/lib/maintainability/snapshot-context.js +0 -63
  480. package/lib/maintainability/source-facts.js +0 -39
  481. package/lib/maintainability/stray-console.js +0 -352
  482. package/lib/maintainability/tsconfig-strict.js +0 -69
  483. package/lib/maintainability/type-safety-hygiene.js +0 -204
  484. package/lib/maintainability/unused-bindings.js +0 -182
  485. package/lib/maintainability/walk.js +0 -17
  486. package/lib/performance/analyze.js +0 -253
  487. package/lib/performance/async-errors.js +0 -190
  488. package/lib/performance/await-before-early-exit.js +0 -176
  489. package/lib/performance/awaits.js +0 -70
  490. package/lib/performance/backend-mastery.js +0 -444
  491. package/lib/performance/call-syntax.js +0 -27
  492. package/lib/performance/cartesian-includes.js +0 -364
  493. package/lib/performance/changed-lines.js +0 -141
  494. package/lib/performance/cli-output.js +0 -175
  495. package/lib/performance/cli-policy.js +0 -87
  496. package/lib/performance/cli-scan.js +0 -421
  497. package/lib/performance/cli.js +0 -101
  498. package/lib/performance/collection-bindings.js +0 -283
  499. package/lib/performance/collection-bounds.js +0 -247
  500. package/lib/performance/collection-copy.js +0 -169
  501. package/lib/performance/collection-lookups.js +0 -432
  502. package/lib/performance/collection-reduce.js +0 -340
  503. package/lib/performance/collections.js +0 -25
  504. package/lib/performance/contracts/cli.js +0 -230
  505. package/lib/performance/contracts/dto.js +0 -244
  506. package/lib/performance/contracts/openapi.js +0 -363
  507. package/lib/performance/db/cli.js +0 -469
  508. package/lib/performance/db/redact.js +0 -126
  509. package/lib/performance/dependent-writes.js +0 -228
  510. package/lib/performance/discarded-error-result.js +0 -46
  511. package/lib/performance/drizzle-write-preflight.js +0 -195
  512. package/lib/performance/drizzle.js +0 -288
  513. package/lib/performance/editor-signal.js +0 -57
  514. package/lib/performance/filter-existence.js +0 -149
  515. package/lib/performance/find-then-create.js +0 -281
  516. package/lib/performance/finding-ids.js +0 -48
  517. package/lib/performance/finding-text.js +0 -117
  518. package/lib/performance/fix-cli.js +0 -200
  519. package/lib/performance/floating-promises.js +0 -248
  520. package/lib/performance/frontend-dom-perf.js +0 -310
  521. package/lib/performance/frontend-helpers.js +0 -93
  522. package/lib/performance/frontend-perf.js +0 -479
  523. package/lib/performance/frontend-render-perf.js +0 -200
  524. package/lib/performance/function-kinds.js +0 -9
  525. package/lib/performance/guard-queries.js +0 -356
  526. package/lib/performance/http-timeouts.js +0 -492
  527. package/lib/performance/index-rules-foreign-keys.js +0 -81
  528. package/lib/performance/index-rules-order.js +0 -152
  529. package/lib/performance/index-rules-pattern.js +0 -137
  530. package/lib/performance/index-rules-table.js +0 -288
  531. package/lib/performance/index-rules.js +0 -107
  532. package/lib/performance/json-clone.js +0 -28
  533. package/lib/performance/json-parse-context.js +0 -99
  534. package/lib/performance/last-insert-id.js +0 -120
  535. package/lib/performance/list-counts.js +0 -321
  536. package/lib/performance/list-overfetch.js +0 -216
  537. package/lib/performance/literal-awaits.js +0 -190
  538. package/lib/performance/llm-max-tokens.js +0 -56
  539. package/lib/performance/memory-growth.js +0 -516
  540. package/lib/performance/migrations/cli.js +0 -203
  541. package/lib/performance/missing-packages.js +0 -116
  542. package/lib/performance/models/index.js +0 -284
  543. package/lib/performance/mongoose-patterns.js +0 -245
  544. package/lib/performance/native-checker.js +0 -312
  545. package/lib/performance/native-runtime.js +0 -24
  546. package/lib/performance/native-syntax.js +0 -132
  547. package/lib/performance/native-workspaces.js +0 -31
  548. package/lib/performance/native.js +0 -362
  549. package/lib/performance/node-fs-context.js +0 -390
  550. package/lib/performance/node-fs.js +0 -452
  551. package/lib/performance/notification-loops.js +0 -176
  552. package/lib/performance/offset-pagination.js +0 -166
  553. package/lib/performance/orm-owners.js +0 -145
  554. package/lib/performance/orm-queries.js +0 -496
  555. package/lib/performance/package-types.js +0 -57
  556. package/lib/performance/page-counts.js +0 -262
  557. package/lib/performance/parallel-reads.js +0 -139
  558. package/lib/performance/password-hashing.js +0 -218
  559. package/lib/performance/pg-fragments.js +0 -300
  560. package/lib/performance/pg-integrity.js +0 -115
  561. package/lib/performance/phase5-rules.js +0 -539
  562. package/lib/performance/polyglot.js +0 -214
  563. package/lib/performance/pooling.js +0 -215
  564. package/lib/performance/postgres.js +0 -182
  565. package/lib/performance/prisma-aggregates.js +0 -125
  566. package/lib/performance/prisma-integrity.js +0 -239
  567. package/lib/performance/prisma.js +0 -399
  568. package/lib/performance/projects.js +0 -452
  569. package/lib/performance/promise-return-escapes-catch.js +0 -96
  570. package/lib/performance/pure-js-hashing.js +0 -96
  571. package/lib/performance/query-loop-batch.js +0 -188
  572. package/lib/performance/query-loop-bounds.js +0 -219
  573. package/lib/performance/query-loop-exits.js +0 -171
  574. package/lib/performance/query-loop-helpers.js +0 -42
  575. package/lib/performance/query-loop-memo.js +0 -81
  576. package/lib/performance/query-loop-pagination.js +0 -130
  577. package/lib/performance/query-loops.js +0 -29
  578. package/lib/performance/query-results.js +0 -179
  579. package/lib/performance/queue-loops.js +0 -87
  580. package/lib/performance/redis-client.js +0 -19
  581. package/lib/performance/redis-keys.js +0 -78
  582. package/lib/performance/redis.js +0 -188
  583. package/lib/performance/redundant-indexes.js +0 -403
  584. package/lib/performance/repeated.js +0 -200
  585. package/lib/performance/request-handlers.js +0 -429
  586. package/lib/performance/request-heavy-work.js +0 -135
  587. package/lib/performance/request-inputs.js +0 -303
  588. package/lib/performance/retry-backoff.js +0 -132
  589. package/lib/performance/return-in-finally.js +0 -12
  590. package/lib/performance/return-newline.js +0 -54
  591. package/lib/performance/review-context.js +0 -434
  592. package/lib/performance/rule-ids.js +0 -371
  593. package/lib/performance/scan-outcome.js +0 -37
  594. package/lib/performance/schema/drizzle-schema.js +0 -278
  595. package/lib/performance/schema/mongoose-schema.js +0 -189
  596. package/lib/performance/schema/prisma-schema.js +0 -472
  597. package/lib/performance/schema/query-site-support.js +0 -61
  598. package/lib/performance/schema/query-sites-drizzle.js +0 -220
  599. package/lib/performance/schema/query-sites-mongoose.js +0 -140
  600. package/lib/performance/schema/query-sites-prisma.js +0 -201
  601. package/lib/performance/schema/query-sites-sequelize.js +0 -133
  602. package/lib/performance/schema/query-sites-typeorm.js +0 -180
  603. package/lib/performance/schema/raw-sql-sites.js +0 -284
  604. package/lib/performance/schema/sequelize-schema.js +0 -322
  605. package/lib/performance/schema/ts-helpers.js +0 -130
  606. package/lib/performance/schema/typeorm-schema.js +0 -262
  607. package/lib/performance/schema-tooling.js +0 -193
  608. package/lib/performance/scope-evidence.js +0 -137
  609. package/lib/performance/sequential-loops.js +0 -557
  610. package/lib/performance/service-call-resolution.js +0 -54
  611. package/lib/performance/service-loop-collections.js +0 -263
  612. package/lib/performance/service-loops.js +0 -416
  613. package/lib/performance/session-store.js +0 -86
  614. package/lib/performance/site-fix.js +0 -271
  615. package/lib/performance/site-fixes/await-before-early-exit.js +0 -121
  616. package/lib/performance/site-fixes/delete-preflight.js +0 -99
  617. package/lib/performance/site-fixes/error-handling.js +0 -99
  618. package/lib/performance/site-fixes/helpers.js +0 -200
  619. package/lib/performance/site-fixes/http-timeouts.js +0 -56
  620. package/lib/performance/site-fixes/json-parse.js +0 -114
  621. package/lib/performance/site-fixes/last-insert-id.js +0 -230
  622. package/lib/performance/site-fixes/list-queries.js +0 -164
  623. package/lib/performance/site-fixes/literal-awaits.js +0 -431
  624. package/lib/performance/site-fixes/page-counts.js +0 -88
  625. package/lib/performance/site-fixes/prisma-aggregates.js +0 -455
  626. package/lib/performance/site-fixes/promise-catch.js +0 -147
  627. package/lib/performance/site-fixes/query-shapes.js +0 -573
  628. package/lib/performance/site-fixes/scope-names.js +0 -30
  629. package/lib/performance/site-fixes/service-loop-ast.js +0 -85
  630. package/lib/performance/site-fixes/service-loop-callee.js +0 -57
  631. package/lib/performance/site-fixes/small-rewrites.js +0 -210
  632. package/lib/performance/site-fixes/typeorm-updates.js +0 -277
  633. package/lib/performance/site-fixes/typeorm.js +0 -239
  634. package/lib/performance/site-fixes/upload-limits.js +0 -74
  635. package/lib/performance/site-fixes/workbook-decodes.js +0 -254
  636. package/lib/performance/sort-extreme.js +0 -142
  637. package/lib/performance/source-inputs.js +0 -83
  638. package/lib/performance/source-options.js +0 -103
  639. package/lib/performance/source-pillars.js +0 -23
  640. package/lib/performance/source-text.js +0 -59
  641. package/lib/performance/stream-errors.js +0 -650
  642. package/lib/performance/transaction-io.js +0 -427
  643. package/lib/performance/typeorm-projection.js +0 -261
  644. package/lib/performance/typeorm-transaction-loops.js +0 -143
  645. package/lib/performance/typeorm-unused-count.js +0 -36
  646. package/lib/performance/typeorm-updates.js +0 -268
  647. package/lib/performance/unbounded-list-queries.js +0 -600
  648. package/lib/performance/unscanned-javascript.js +0 -76
  649. package/lib/performance/upload-limits.js +0 -68
  650. package/lib/performance/watch.js +0 -99
  651. package/lib/performance/workbook-decodes.js +0 -147
  652. package/lib/reliability/analyze.js +0 -41
  653. package/lib/reliability/boundary-access.js +0 -521
  654. package/lib/reliability/child-process.js +0 -106
  655. package/lib/reliability/cli.js +0 -20
  656. package/lib/reliability/error-values.js +0 -177
  657. package/lib/reliability/pool-timeout.js +0 -79
  658. package/lib/reliability/react-bugs.js +0 -602
  659. package/lib/reliability/resource-leaks.js +0 -523
  660. package/lib/reliability/rule-ids.js +0 -267
  661. package/lib/reliability/site-fixes/boundary-access.js +0 -80
  662. package/lib/reliability/site-fixes/suspicious-logic.js +0 -115
  663. package/lib/reliability/source-helpers.js +0 -32
  664. package/lib/reliability/sql-insert-terminator.js +0 -106
  665. package/lib/reliability/standalone-sources.js +0 -54
  666. package/lib/reliability/suspicious-logic.js +0 -364
  667. package/lib/reliability/swallowed-errors.js +0 -321
  668. package/lib/reliability/switch-exhaustive.js +0 -284
  669. package/lib/reliability/uncaught-exception.js +0 -223
  670. package/lib/reliability/walk.js +0 -16
  671. package/lib/security/analyze.js +0 -129
  672. package/lib/security/auth-crypto/comparison.js +0 -97
  673. package/lib/security/auth-crypto/hashing.js +0 -302
  674. package/lib/security/auth-crypto/index.js +0 -32
  675. package/lib/security/auth-crypto/jwt.js +0 -468
  676. package/lib/security/auth-crypto/plaintext-password.js +0 -171
  677. package/lib/security/auth-crypto/random.js +0 -124
  678. package/lib/security/auth-crypto/rate-limits.js +0 -326
  679. package/lib/security/auth-crypto/secrets.js +0 -331
  680. package/lib/security/auth-crypto/shared.js +0 -105
  681. package/lib/security/auth-crypto/transport-and-ciphers.js +0 -217
  682. package/lib/security/bindings.js +0 -286
  683. package/lib/security/cli.js +0 -294
  684. package/lib/security/declarations.js +0 -25
  685. package/lib/security/deps/cli.js +0 -75
  686. package/lib/security/deps/lockfiles.js +0 -310
  687. package/lib/security/deps/osv.js +0 -217
  688. package/lib/security/deps/scan.js +0 -69
  689. package/lib/security/examples/injection.cjs +0 -54
  690. package/lib/security/exposure/backend-security-mastery.js +0 -80
  691. package/lib/security/exposure/client-env.js +0 -113
  692. package/lib/security/exposure/cookies.js +0 -173
  693. package/lib/security/exposure/cors-origin-regex.js +0 -177
  694. package/lib/security/exposure/cors.js +0 -217
  695. package/lib/security/exposure/error-responses.js +0 -437
  696. package/lib/security/exposure/frontend-security.js +0 -549
  697. package/lib/security/exposure/graphql.js +0 -131
  698. package/lib/security/exposure/jsx-url.js +0 -267
  699. package/lib/security/exposure/literals.js +0 -133
  700. package/lib/security/exposure/logging.js +0 -168
  701. package/lib/security/exposure/mass-assignment.js +0 -165
  702. package/lib/security/exposure/next-image-config.js +0 -34
  703. package/lib/security/exposure/package-manifest.js +0 -45
  704. package/lib/security/exposure/password-response.js +0 -315
  705. package/lib/security/exposure/prototype-pollution.js +0 -291
  706. package/lib/security/exposure/reflected-xss.js +0 -57
  707. package/lib/security/exposure/storage-acl.js +0 -87
  708. package/lib/security/exposure/template-autoescape.js +0 -39
  709. package/lib/security/exposure/url-secrets.js +0 -164
  710. package/lib/security/exposure/validation-pipe.js +0 -36
  711. package/lib/security/exposure/xml.js +0 -28
  712. package/lib/security/file-context.js +0 -82
  713. package/lib/security/files/project-files.js +0 -103
  714. package/lib/security/files/review-directive.js +0 -30
  715. package/lib/security/files/secrets.js +0 -121
  716. package/lib/security/injection/code.js +0 -122
  717. package/lib/security/injection/command.js +0 -180
  718. package/lib/security/injection/index.js +0 -13
  719. package/lib/security/injection/nosql.js +0 -353
  720. package/lib/security/injection/redos.js +0 -453
  721. package/lib/security/injection/regex.js +0 -67
  722. package/lib/security/injection/rule-ids.js +0 -17
  723. package/lib/security/injection/shared.js +0 -137
  724. package/lib/security/injection/sql.js +0 -513
  725. package/lib/security/pg-dynamic-query.js +0 -30
  726. package/lib/security/pg-identifier-guards.js +0 -155
  727. package/lib/security/phase5-rules.js +0 -515
  728. package/lib/security/polyglot.js +0 -8
  729. package/lib/security/request-forgery/open-redirect.js +0 -336
  730. package/lib/security/request-forgery/path-traversal.js +0 -103
  731. package/lib/security/request-forgery/shared.js +0 -355
  732. package/lib/security/request-forgery/ssrf.js +0 -133
  733. package/lib/security/request-forgery/upload-filename.js +0 -75
  734. package/lib/security/request-forgery/zip-slip.js +0 -42
  735. package/lib/security/rule-descriptions.js +0 -88
  736. package/lib/security/rule-ids.js +0 -149
  737. package/lib/security/scope/drizzle-policy.js +0 -197
  738. package/lib/security/scope/query-policy.js +0 -156
  739. package/lib/security/site-fixes/auth-crypto.js +0 -223
  740. package/lib/security/site-fixes/injection.js +0 -119
  741. package/lib/security/site-fixes/jwt.js +0 -89
  742. package/lib/security/taint/archive-sources.js +0 -127
  743. package/lib/security/taint/filename-guard.js +0 -112
  744. package/lib/security/taint/guards.js +0 -348
  745. package/lib/security/taint/index.js +0 -670
  746. package/lib/security/taint/propagate.js +0 -120
  747. package/lib/security/taint/sanitizers.js +0 -71
  748. package/lib/security/taint/sources.js +0 -360
  749. package/lib/security/taint/summaries.js +0 -219
  750. package/lib/security/taint/url-parts.js +0 -273
  751. package/lib/security/taint/validators.js +0 -420
  752. package/lib/shared/agent-init.js +0 -235
  753. package/lib/shared/agent-verify.js +0 -239
  754. package/lib/shared/atomic-write.js +0 -52
  755. package/lib/shared/baseline.js +0 -237
  756. package/lib/shared/check.js +0 -257
  757. package/lib/shared/config.js +0 -286
  758. package/lib/shared/coverage-notes.js +0 -27
  759. package/lib/shared/execution-context.js +0 -278
  760. package/lib/shared/fix-command.js +0 -23
  761. package/lib/shared/fix-convergence.js +0 -389
  762. package/lib/shared/fix-handoff.js +0 -57
  763. package/lib/shared/fix-history.js +0 -303
  764. package/lib/shared/fix-hunks.js +0 -108
  765. package/lib/shared/fix-presentation-comments.js +0 -253
  766. package/lib/shared/fix-presentation-style.js +0 -230
  767. package/lib/shared/fix-presentation.js +0 -177
  768. package/lib/shared/fix-rationales.js +0 -151
  769. package/lib/shared/fix-recipes.js +0 -101
  770. package/lib/shared/fix-typecheck.js +0 -188
  771. package/lib/shared/fix.js +0 -257
  772. package/lib/shared/formats/finding-location.js +0 -35
  773. package/lib/shared/formats/sarif.js +0 -91
  774. package/lib/shared/function-summaries.js +0 -571
  775. package/lib/shared/function-syntax.js +0 -86
  776. package/lib/shared/git-hook.js +0 -153
  777. package/lib/shared/hot-path-graph.js +0 -268
  778. package/lib/shared/impact-levels.js +0 -49
  779. package/lib/shared/pending-review.js +0 -117
  780. package/lib/shared/pillar-rules.js +0 -6
  781. package/lib/shared/pillars.js +0 -384
  782. package/lib/shared/review-mcp.js +0 -262
  783. package/lib/shared/rule-docs.js +0 -12
  784. package/lib/shared/scan-cache.js +0 -233
  785. package/lib/shared/source-report.js +0 -156
  786. package/lib/shared/workspaces.js +0 -321
  787. package/plugin/hooks/check-edited-file.js +0 -142
  788. package/polyglot/maintainability/rules.js +0 -159
  789. /package/{bin → dist/bin}/github-action.js +0 -0
  790. /package/{lib → dist/lib}/accessibility/aria-tables.js +0 -0
  791. /package/{lib → dist/lib}/accessibility/site-fixes/buttons.js +0 -0
  792. /package/{lib → dist/lib}/accessibility/usage.js +0 -0
  793. /package/{lib → dist/lib}/editor/actions.js +0 -0
  794. /package/{lib → dist/lib}/editor/apply-fix.js +0 -0
  795. /package/{lib → dist/lib}/editor/control-flow-comparison.js +0 -0
  796. /package/{lib → dist/lib}/editor/editor-document.js +0 -0
  797. /package/{lib → dist/lib}/editor/finding-comparison.js +0 -0
  798. /package/{lib → dist/lib}/editor/fix-edits.js +0 -0
  799. /package/{lib → dist/lib}/editor/maintainability-examples.js +0 -0
  800. /package/{lib → dist/lib}/editor/perf-site-comparison.js +0 -0
  801. /package/{lib → dist/lib}/editor/perf-watch.js +0 -0
  802. /package/{lib → dist/lib}/editor/performance-examples.js +0 -0
  803. /package/{lib → dist/lib}/editor/security-examples.js +0 -0
  804. /package/{lib → dist/lib}/editor/source-example.js +0 -0
  805. /package/{lib → dist/lib}/editor/standalone-performance-examples.js +0 -0
  806. /package/{lib → dist/lib}/editor/types/comparison.js +0 -0
  807. /package/{lib → dist/lib}/editor/types/dismissal.js +0 -0
  808. /package/{lib → dist/lib}/editor/types/fix-example.js +0 -0
  809. /package/{lib → dist/lib}/editor/types/source-document.js +0 -0
  810. /package/{lib → dist/lib}/editor/workspace-files.js +0 -0
  811. /package/{lib/maintainability → dist/lib/maintainability/analysis}/advisory-context.js +0 -0
  812. /package/{lib/maintainability → dist/lib/maintainability/analysis}/checklist-context.js +0 -0
  813. /package/{lib/maintainability → dist/lib/maintainability/analysis}/source-exclusions.js +0 -0
  814. /package/{lib/maintainability → dist/lib/maintainability/analysis}/traversal-context.js +0 -0
  815. /package/{lib/maintainability → dist/lib/maintainability/architecture}/data-access.js +0 -0
  816. /package/{lib/maintainability → dist/lib/maintainability/architecture}/graph.js +0 -0
  817. /package/{lib/maintainability → dist/lib/maintainability/architecture}/layout.js +0 -0
  818. /package/{lib/maintainability → dist/lib/maintainability/cli}/branch-advice.js +0 -0
  819. /package/{lib/maintainability → dist/lib/maintainability/entry-points}/docker-entry-points.js +0 -0
  820. /package/{lib/maintainability → dist/lib/maintainability/entry-points}/html-entry-points.js +0 -0
  821. /package/{lib/maintainability → dist/lib/maintainability/entry-points}/mocha-entry-points.js +0 -0
  822. /package/{lib/maintainability → dist/lib/maintainability/entry-points}/runtime-directories.js +0 -0
  823. /package/{lib/maintainability → dist/lib/maintainability/entry-points}/workflow-entry-points.js +0 -0
  824. /package/{lib → dist/lib}/maintainability/examples.js +0 -0
  825. /package/{lib → dist/lib}/maintainability/polyglot-duplicates.js +0 -0
  826. /package/{lib/maintainability → dist/lib/maintainability/quality}/child-buffer.js +0 -0
  827. /package/{lib/maintainability → dist/lib/maintainability/quality}/limits.js +0 -0
  828. /package/{lib/maintainability → dist/lib/maintainability/quality}/modifiers.js +0 -0
  829. /package/{lib → dist/lib}/maintainability/site-fixes/boolean-returns.js +0 -0
  830. /package/{lib → dist/lib}/maintainability/site-fixes/cycles.js +0 -0
  831. /package/{lib → dist/lib}/maintainability/site-fixes/duplicate-bindings.js +0 -0
  832. /package/{lib → dist/lib}/maintainability/site-fixes/exports.js +0 -0
  833. /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-ast.js +0 -0
  834. /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-edits.js +0 -0
  835. /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-flow.js +0 -0
  836. /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-naming.js +0 -0
  837. /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-narrowing.js +0 -0
  838. /package/{lib → dist/lib}/maintainability/site-fixes/helpers.js +0 -0
  839. /package/{lib → dist/lib}/maintainability/site-fixes/if-rewrites.js +0 -0
  840. /package/{lib → dist/lib}/maintainability/site-fixes/isolated-program.js +0 -0
  841. /package/{lib → dist/lib}/maintainability/site-fixes/large-module.js +0 -0
  842. /package/{lib → dist/lib}/maintainability/types/changed-lines.js +0 -0
  843. /package/{lib → dist/lib}/maintainability/types/created-module.js +0 -0
  844. /package/{lib → dist/lib}/maintainability/types/duplicate-sites.js +0 -0
  845. /package/{lib → dist/lib}/maintainability/types/duplicates.js +0 -0
  846. /package/{lib → dist/lib}/maintainability/types/entry-points.js +0 -0
  847. /package/{lib → dist/lib}/maintainability/types/extract-block.js +0 -0
  848. /package/{lib → dist/lib}/maintainability/types/extraction-drafts.js +0 -0
  849. /package/{lib → dist/lib}/maintainability/types/finding-comparison.js +0 -0
  850. /package/{lib → dist/lib}/maintainability/types/fix-files.js +0 -0
  851. /package/{lib/maintainability/types/module-graph.js → dist/lib/maintainability/types/git-entry-source.js} +0 -0
  852. /package/{lib/maintainability/types/module-resolver.js → dist/lib/maintainability/types/module-graph.js} +0 -0
  853. /package/{lib/maintainability/types/module-usage.js → dist/lib/maintainability/types/module-resolver.js} +0 -0
  854. /package/{lib/maintainability/types/policy.js → dist/lib/maintainability/types/module-usage.js} +0 -0
  855. /package/{lib/maintainability/types/polyglot-scan.js → dist/lib/maintainability/types/policy.js} +0 -0
  856. /package/{lib/maintainability/types/scan-report.js → dist/lib/maintainability/types/polyglot-scan.js} +0 -0
  857. /package/{lib/maintainability/types/scan-worker.js → dist/lib/maintainability/types/scan-report.js} +0 -0
  858. /package/{lib/maintainability/types/site-fix-edits.js → dist/lib/maintainability/types/scan-worker.js} +0 -0
  859. /package/{lib/maintainability/types/site-fix-loader.js → dist/lib/maintainability/types/site-fix-edits.js} +0 -0
  860. /package/{lib/maintainability/types/site-fix-nodes.js → dist/lib/maintainability/types/site-fix-loader.js} +0 -0
  861. /package/{lib/maintainability/types/source-analysis.js → dist/lib/maintainability/types/site-fix-nodes.js} +0 -0
  862. /package/{lib/maintainability/types/source-facts.js → dist/lib/maintainability/types/source-analysis.js} +0 -0
  863. /package/{lib/maintainability/types/typescript-jsdoc-internals.js → dist/lib/maintainability/types/source-facts.js} +0 -0
  864. /package/{lib/maintainability/types/typescript-site-fix-internals.js → dist/lib/maintainability/types/typescript-jsdoc-internals.js} +0 -0
  865. /package/{lib/performance/cli-types.js → dist/lib/maintainability/types/typescript-site-fix-internals.js} +0 -0
  866. /package/{lib/maintainability → dist/lib/maintainability/unused}/operator-references.js +0 -0
  867. /package/{lib/maintainability → dist/lib/maintainability/unused}/unused-modules.js +0 -0
  868. /package/{lib/maintainability → dist/lib/maintainability/unused}/verified-private-types.js +0 -0
  869. /package/{lib/performance → dist/lib/performance/cli}/cli-arguments.js +0 -0
  870. /package/{lib/performance/migrations/extract-code-types.js → dist/lib/performance/cli/cli-types.js} +0 -0
  871. /package/{lib/performance → dist/lib/performance/cli}/emit-options.js +0 -0
  872. /package/{lib/performance → dist/lib/performance/cli}/impact.js +0 -0
  873. /package/{lib → dist/lib}/performance/contracts/git-files.js +0 -0
  874. /package/{lib → dist/lib}/performance/contracts/graphql.js +0 -0
  875. /package/{lib → dist/lib}/performance/db/checks.js +0 -0
  876. /package/{lib → dist/lib}/performance/db/cli-format.js +0 -0
  877. /package/{lib → dist/lib}/performance/db/cli-mysql.js +0 -0
  878. /package/{lib → dist/lib}/performance/db/drivers.js +0 -0
  879. /package/{lib → dist/lib}/performance/db/gateway.js +0 -0
  880. /package/{lib → dist/lib}/performance/db/hypopg.js +0 -0
  881. /package/{lib → dist/lib}/performance/db/measure.js +0 -0
  882. /package/{lib → dist/lib}/performance/db/mongo.js +0 -0
  883. /package/{lib → dist/lib}/performance/db/mysql-catalog.js +0 -0
  884. /package/{lib → dist/lib}/performance/db/pg-catalog.js +0 -0
  885. /package/{lib → dist/lib}/performance/db/plan-estimates.js +0 -0
  886. /package/{lib → dist/lib}/performance/db/snapshot.js +0 -0
  887. /package/{lib/performance → dist/lib/performance/engine}/compiler.js +0 -0
  888. /package/{lib/performance → dist/lib/performance/engine}/reference-checks.js +0 -0
  889. /package/{lib/performance → dist/lib/performance/evidence}/cache-reads.js +0 -0
  890. /package/{lib/performance → dist/lib/performance/evidence}/plans.js +0 -0
  891. /package/{lib/performance → dist/lib/performance/evidence}/span-timing.js +0 -0
  892. /package/{lib/performance → dist/lib/performance/evidence}/traces.js +0 -0
  893. /package/{lib → dist/lib}/performance/migrations/discover.js +0 -0
  894. /package/{lib → dist/lib}/performance/migrations/enforce.js +0 -0
  895. /package/{lib → dist/lib}/performance/migrations/extract-code-builders.js +0 -0
  896. /package/{lib → dist/lib}/performance/migrations/extract-code-discovery.js +0 -0
  897. /package/{lib → dist/lib}/performance/migrations/extract-code-sql.js +0 -0
  898. /package/{lib/performance/site-fixes/types/module-binding.js → dist/lib/performance/migrations/extract-code-types.js} +0 -0
  899. /package/{lib → dist/lib}/performance/migrations/extract-code.js +0 -0
  900. /package/{lib → dist/lib}/performance/migrations/extract-sql.js +0 -0
  901. /package/{lib → dist/lib}/performance/migrations/operations.js +0 -0
  902. /package/{lib → dist/lib}/performance/migrations/postgres-registry.js +0 -0
  903. /package/{lib → dist/lib}/performance/migrations/rules-mysql.js +0 -0
  904. /package/{lib → dist/lib}/performance/migrations/rules-postgres-add-column.js +0 -0
  905. /package/{lib → dist/lib}/performance/migrations/rules-postgres-shared.js +0 -0
  906. /package/{lib → dist/lib}/performance/migrations/rules-postgres.js +0 -0
  907. /package/{lib/performance → dist/lib/performance/query-loops}/parallel-reads-policy.js +0 -0
  908. /package/{lib/performance → dist/lib/performance/query-loops}/query-policy.js +0 -0
  909. /package/{lib/performance → dist/lib/performance/query-loops}/service-loop-operations.js +0 -0
  910. /package/{lib → dist/lib}/performance/schema/context.js +0 -0
  911. /package/{lib → dist/lib}/performance/schema/model.js +0 -0
  912. /package/{lib → dist/lib}/performance/schema/project-indexes-events.js +0 -0
  913. /package/{lib → dist/lib}/performance/schema/project-indexes.js +0 -0
  914. /package/{lib → dist/lib}/performance/schema/query-sites.js +0 -0
  915. /package/{lib → dist/lib}/performance/site-fixes/backend-mastery-fixes.js +0 -0
  916. /package/{lib → dist/lib}/performance/site-fixes/batch-loops.js +0 -0
  917. /package/{lib → dist/lib}/performance/site-fixes/collection-copy.js +0 -0
  918. /package/{lib → dist/lib}/performance/site-fixes/collection-existence.js +0 -0
  919. /package/{lib → dist/lib}/performance/site-fixes/collection-find.js +0 -0
  920. /package/{lib → dist/lib}/performance/site-fixes/collection-helpers.js +0 -0
  921. /package/{lib → dist/lib}/performance/site-fixes/collection-lookup-declarations.js +0 -0
  922. /package/{lib → dist/lib}/performance/site-fixes/collection-lookups.js +0 -0
  923. /package/{lib → dist/lib}/performance/site-fixes/collection-membership.js +0 -0
  924. /package/{lib → dist/lib}/performance/site-fixes/collections.js +0 -0
  925. /package/{lib → dist/lib}/performance/site-fixes/database.js +0 -0
  926. /package/{lib → dist/lib}/performance/site-fixes/drizzle-index.js +0 -0
  927. /package/{lib → dist/lib}/performance/site-fixes/frontend-fixes.js +0 -0
  928. /package/{lib → dist/lib}/performance/site-fixes/guard-queries.js +0 -0
  929. /package/{lib → dist/lib}/performance/site-fixes/hoisting.js +0 -0
  930. /package/{lib → dist/lib}/performance/site-fixes/indexes.js +0 -0
  931. /package/{lib → dist/lib}/performance/site-fixes/integrity-drizzle.js +0 -0
  932. /package/{lib → dist/lib}/performance/site-fixes/integrity-wrap.js +0 -0
  933. /package/{lib → dist/lib}/performance/site-fixes/integrity.js +0 -0
  934. /package/{lib → dist/lib}/performance/site-fixes/method-calls.js +0 -0
  935. /package/{lib → dist/lib}/performance/site-fixes/migration-column-rules.js +0 -0
  936. /package/{lib → dist/lib}/performance/site-fixes/migration-context.js +0 -0
  937. /package/{lib → dist/lib}/performance/site-fixes/migration-lock-rules.js +0 -0
  938. /package/{lib → dist/lib}/performance/site-fixes/migration-placement.js +0 -0
  939. /package/{lib → dist/lib}/performance/site-fixes/migrations.js +0 -0
  940. /package/{lib → dist/lib}/performance/site-fixes/pure-js-hashing.js +0 -0
  941. /package/{lib → dist/lib}/performance/site-fixes/query-loop-collections.js +0 -0
  942. /package/{lib → dist/lib}/performance/site-fixes/query-loop-lookups.js +0 -0
  943. /package/{lib → dist/lib}/performance/site-fixes/query-loop-materialization.js +0 -0
  944. /package/{lib → dist/lib}/performance/site-fixes/query-loop-names.js +0 -0
  945. /package/{lib → dist/lib}/performance/site-fixes/query-loop-nodes.js +0 -0
  946. /package/{lib → dist/lib}/performance/site-fixes/query-loop-pg-redis.js +0 -0
  947. /package/{lib → dist/lib}/performance/site-fixes/query-loop-prisma.js +0 -0
  948. /package/{lib → dist/lib}/performance/site-fixes/query-loop-sites.js +0 -0
  949. /package/{lib → dist/lib}/performance/site-fixes/query-loop-typeorm.js +0 -0
  950. /package/{lib → dist/lib}/performance/site-fixes/query-loops.js +0 -0
  951. /package/{lib → dist/lib}/performance/site-fixes/queue-loops.js +0 -0
  952. /package/{lib → dist/lib}/performance/site-fixes/redis-keys.js +0 -0
  953. /package/{lib → dist/lib}/performance/site-fixes/service-loop-concurrent.js +0 -0
  954. /package/{lib → dist/lib}/performance/site-fixes/service-loop-imports.js +0 -0
  955. /package/{lib → dist/lib}/performance/site-fixes/service-loop-read-batch.js +0 -0
  956. /package/{lib → dist/lib}/performance/site-fixes/service-loop-siblings.js +0 -0
  957. /package/{lib → dist/lib}/performance/site-fixes/service-loop-signature.js +0 -0
  958. /package/{lib → dist/lib}/performance/site-fixes/service-loop-sites.js +0 -0
  959. /package/{lib → dist/lib}/performance/site-fixes/service-loop-write-batch.js +0 -0
  960. /package/{lib → dist/lib}/performance/site-fixes/service-loops.js +0 -0
  961. /package/{lib → dist/lib}/performance/site-fixes/streams.js +0 -0
  962. /package/{lib → dist/lib}/performance/site-fixes/sync-calls.js +0 -0
  963. /package/{lib → dist/lib}/performance/site-fixes/sync-imports.js +0 -0
  964. /package/{lib → dist/lib}/performance/site-fixes/transaction-escape.js +0 -0
  965. /package/{lib → dist/lib}/performance/site-fixes/transaction-io.js +0 -0
  966. /package/{lib/performance/types/batch-plan.js → dist/lib/performance/site-fixes/types/module-binding.js} +0 -0
  967. /package/{lib → dist/lib}/performance/site-fixes/writes.js +0 -0
  968. /package/{lib → dist/lib}/performance/sql/locations.js +0 -0
  969. /package/{lib → dist/lib}/performance/sql/mysql-tokens.js +0 -0
  970. /package/{lib → dist/lib}/performance/sql/pg-parser.js +0 -0
  971. /package/{lib → dist/lib}/performance/types/ast-grep-match.js +0 -0
  972. /package/{lib/performance/types/batched-fix-input.js → dist/lib/performance/types/batch-plan.js} +0 -0
  973. /package/{lib/performance/types/call-site.js → dist/lib/performance/types/batched-fix-input.js} +0 -0
  974. /package/{lib/performance/types/callee-helper.js → dist/lib/performance/types/call-site.js} +0 -0
  975. /package/{lib/performance/types/client-family.js → dist/lib/performance/types/callee-helper.js} +0 -0
  976. /package/{lib/performance/types/collections.js → dist/lib/performance/types/client-family.js} +0 -0
  977. /package/{lib/performance/types/db-cli.js → dist/lib/performance/types/collections.js} +0 -0
  978. /package/{lib → dist/lib}/performance/types/contract-findings.js +0 -0
  979. /package/{lib/performance/types/db-connection.js → dist/lib/performance/types/db-cli.js} +0 -0
  980. /package/{lib/performance/types/db-plan-findings.js → dist/lib/performance/types/db-connection.js} +0 -0
  981. /package/{lib → dist/lib}/performance/types/db-model.js +0 -0
  982. /package/{lib/performance/types/db-snapshot.js → dist/lib/performance/types/db-plan-findings.js} +0 -0
  983. /package/{lib → dist/lib}/performance/types/db-plan.js +0 -0
  984. /package/{lib/performance/types/decorator-call.js → dist/lib/performance/types/db-snapshot.js} +0 -0
  985. /package/{lib → dist/lib}/performance/types/declaration-link.js +0 -0
  986. /package/{lib/performance/types/drizzle-query.js → dist/lib/performance/types/decorator-call.js} +0 -0
  987. /package/{lib/performance/types/helper-function.js → dist/lib/performance/types/drizzle-query.js} +0 -0
  988. /package/{lib → dist/lib}/performance/types/find-lookup-facts.js +0 -0
  989. /package/{lib/performance/types/hoist-anchor.js → dist/lib/performance/types/helper-function.js} +0 -0
  990. /package/{lib/performance/types/http-call.js → dist/lib/performance/types/hoist-anchor.js} +0 -0
  991. /package/{lib/performance/types/lookup-construction.js → dist/lib/performance/types/http-call.js} +0 -0
  992. /package/{lib/performance/types/lookup-placement.js → dist/lib/performance/types/lookup-construction.js} +0 -0
  993. /package/{lib/performance/types/loop-key-site.js → dist/lib/performance/types/lookup-placement.js} +0 -0
  994. /package/{lib/performance/types/loop-lookup.js → dist/lib/performance/types/loop-key-site.js} +0 -0
  995. /package/{lib/performance/types/method-call.js → dist/lib/performance/types/loop-lookup.js} +0 -0
  996. /package/{lib/performance/types/migration-extraction.js → dist/lib/performance/types/method-call.js} +0 -0
  997. /package/{lib/performance/types/migration-files.js → dist/lib/performance/types/migration-extraction.js} +0 -0
  998. /package/{lib/performance/types/migration-operations.js → dist/lib/performance/types/migration-files.js} +0 -0
  999. /package/{lib/performance/types/migrations.js → dist/lib/performance/types/migration-operations.js} +0 -0
  1000. /package/{lib/performance/types/native-modules.js → dist/lib/performance/types/migrations.js} +0 -0
  1001. /package/{lib → dist/lib}/performance/types/model-fallback.js +0 -0
  1002. /package/{lib → dist/lib}/performance/types/mysql-statements.js +0 -0
  1003. /package/{lib/performance/types/native-typescript.js → dist/lib/performance/types/native-modules.js} +0 -0
  1004. /package/{lib/performance/types/otlp-attributes.js → dist/lib/performance/types/native-typescript.js} +0 -0
  1005. /package/{lib/performance/types/otlp-trace.js → dist/lib/performance/types/otlp-attributes.js} +0 -0
  1006. /package/{lib/performance/types/page-count-pair.js → dist/lib/performance/types/otlp-trace.js} +0 -0
  1007. /package/{lib/performance/types/parallel-reads.js → dist/lib/performance/types/page-count-pair.js} +0 -0
  1008. /package/{lib/performance/types/performance-policy.js → dist/lib/performance/types/parallel-reads.js} +0 -0
  1009. /package/{lib/performance/types/pg-statements.js → dist/lib/performance/types/performance-policy.js} +0 -0
  1010. /package/{lib/performance/types/plain-property.js → dist/lib/performance/types/pg-statements.js} +0 -0
  1011. /package/{lib/performance/types/postgres-registry.js → dist/lib/performance/types/plain-property.js} +0 -0
  1012. /package/{lib/performance/types/prisma-schema.js → dist/lib/performance/types/postgres-registry.js} +0 -0
  1013. /package/{lib/performance/types/program-scan.js → dist/lib/performance/types/prisma-schema.js} +0 -0
  1014. /package/{lib/performance/types/project-indexes.js → dist/lib/performance/types/program-scan.js} +0 -0
  1015. /package/{lib/performance/types/query-loops.js → dist/lib/performance/types/project-indexes.js} +0 -0
  1016. /package/{lib/performance/types/query-site.js → dist/lib/performance/types/query-loops.js} +0 -0
  1017. /package/{lib/performance/types/repeat-owner.js → dist/lib/performance/types/query-site.js} +0 -0
  1018. /package/{lib → dist/lib}/performance/types/related-location.js +0 -0
  1019. /package/{lib/performance/types/request-handler.js → dist/lib/performance/types/repeat-owner.js} +0 -0
  1020. /package/{lib/performance/types/request-input.js → dist/lib/performance/types/request-handler.js} +0 -0
  1021. /package/{lib/performance/types/sibling-declaration.js → dist/lib/performance/types/request-input.js} +0 -0
  1022. /package/{lib → dist/lib}/performance/types/schema-model.js +0 -0
  1023. /package/{lib/performance/types/source-analyzer.js → dist/lib/performance/types/sibling-declaration.js} +0 -0
  1024. /package/{lib/performance/types/source-check-values.js → dist/lib/performance/types/source-analyzer.js} +0 -0
  1025. /package/{lib/performance/types/source-command.js → dist/lib/performance/types/source-check-values.js} +0 -0
  1026. /package/{lib/performance/types/source-scan-values.js → dist/lib/performance/types/source-command.js} +0 -0
  1027. /package/{lib → dist/lib}/performance/types/source-position.js +0 -0
  1028. /package/{lib/performance/types/typeorm-save-shape.js → dist/lib/performance/types/source-scan-values.js} +0 -0
  1029. /package/{lib → dist/lib}/performance/types/statement-range.js +0 -0
  1030. /package/{lib/performance/types/typescript-binder.js → dist/lib/performance/types/typeorm-save-shape.js} +0 -0
  1031. /package/{lib/performance/types/typescript-token-lookup.js → dist/lib/performance/types/typescript-binder.js} +0 -0
  1032. /package/{lib/performance/types/typescript-token-position.js → dist/lib/performance/types/typescript-token-lookup.js} +0 -0
  1033. /package/{lib/security/types/condition-guards.js → dist/lib/performance/types/typescript-token-position.js} +0 -0
  1034. /package/{lib → dist/lib}/reliability/site-fixes/resource-leaks.js +0 -0
  1035. /package/{lib/security/types/file-finding.js → dist/lib/reliability/types/parse-failure.js} +0 -0
  1036. /package/{lib → dist/lib}/reliability/usage.js +0 -0
  1037. /package/{lib → dist/lib}/security/auth-crypto/rule-ids.js +0 -0
  1038. /package/{lib → dist/lib}/security/deps/advisory.js +0 -0
  1039. /package/{lib → dist/lib}/security/deps/rule-ids.js +0 -0
  1040. /package/{lib → dist/lib}/security/examples/auth-crypto.cjs +0 -0
  1041. /package/{lib → dist/lib}/security/examples/deps.cjs +0 -0
  1042. /package/{lib → dist/lib}/security/examples/exposure.cjs +0 -0
  1043. /package/{lib → dist/lib}/security/examples/files.cjs +0 -0
  1044. /package/{lib → dist/lib}/security/examples/moved.cjs +0 -0
  1045. /package/{lib → dist/lib}/security/examples/request-forgery.cjs +0 -0
  1046. /package/{lib → dist/lib}/security/exposure/index.js +0 -0
  1047. /package/{lib → dist/lib}/security/exposure/react-version.js +0 -0
  1048. /package/{lib → dist/lib}/security/exposure/report.js +0 -0
  1049. /package/{lib → dist/lib}/security/exposure/rule-ids.js +0 -0
  1050. /package/{lib → dist/lib}/security/files/compose.js +0 -0
  1051. /package/{lib → dist/lib}/security/files/dockerfile.js +0 -0
  1052. /package/{lib → dist/lib}/security/files/index.js +0 -0
  1053. /package/{lib → dist/lib}/security/files/rule-ids.js +0 -0
  1054. /package/{lib → dist/lib}/security/files/secret-values.js +0 -0
  1055. /package/{lib → dist/lib}/security/injection/regex-pattern.js +0 -0
  1056. /package/{lib → dist/lib}/security/request-forgery/index.js +0 -0
  1057. /package/{lib → dist/lib}/security/request-forgery/rule-ids.js +0 -0
  1058. /package/{lib → dist/lib}/security/site-fixes/backend-security-fixes.js +0 -0
  1059. /package/{lib → dist/lib}/security/site-fixes/error-responses.js +0 -0
  1060. /package/{lib → dist/lib}/security/site-fixes/exposure.js +0 -0
  1061. /package/{lib → dist/lib}/security/site-fixes/files.js +0 -0
  1062. /package/{lib → dist/lib}/security/site-fixes/frontend-security-fixes.js +0 -0
  1063. /package/{lib → dist/lib}/security/site-fixes/list-edits.js +0 -0
  1064. /package/{lib → dist/lib}/security/site-fixes/request-forgery.js +0 -0
  1065. /package/{lib → dist/lib}/security/site-fixes/secret-comparison.js +0 -0
  1066. /package/{lib → dist/lib}/security/site-fixes/template-autoescape.js +0 -0
  1067. /package/{lib/security/types/inspectable-type.js → dist/lib/security/types/condition-guards.js} +0 -0
  1068. /package/{lib/security/types/lockfile.js → dist/lib/security/types/file-finding.js} +0 -0
  1069. /package/{lib/security/types/osv-vulnerability.js → dist/lib/security/types/inspectable-type.js} +0 -0
  1070. /package/{lib/security/types/project-files.js → dist/lib/security/types/lockfile.js} +0 -0
  1071. /package/{lib/security/types/propagation.js → dist/lib/security/types/osv-vulnerability.js} +0 -0
  1072. /package/{lib/security/types/rule-example.js → dist/lib/security/types/project-files.js} +0 -0
  1073. /package/{lib/security/types/schema-call.js → dist/lib/security/types/propagation.js} +0 -0
  1074. /package/{lib/security/types/security-check.js → dist/lib/security/types/rule-example.js} +0 -0
  1075. /package/{lib/shared/types.js → dist/lib/security/types/schema-call.js} +0 -0
  1076. /package/{lib/shared/types/baseline.js → dist/lib/security/types/security-check.js} +0 -0
  1077. /package/{lib/shared → dist/lib/shared/agent}/agent-session.js +0 -0
  1078. /package/{lib/shared → dist/lib/shared/agent}/managed-blocks.js +0 -0
  1079. /package/{lib/shared → dist/lib/shared/agent}/notify-editor.js +0 -0
  1080. /package/{lib/shared → dist/lib/shared/agent}/review-delivery.js +0 -0
  1081. /package/{lib/shared → dist/lib/shared/agent}/review-request.js +0 -0
  1082. /package/{lib/shared → dist/lib/shared/analysis}/hot-path.js +0 -0
  1083. /package/{lib/shared → dist/lib/shared/analysis}/polyglot-compatibility.js +0 -0
  1084. /package/{lib → dist/lib}/shared/explain.js +0 -0
  1085. /package/{lib/shared → dist/lib/shared/fix}/fix-imports.js +0 -0
  1086. /package/{lib/shared → dist/lib/shared/fix}/fix-presentation-prettier.js +0 -0
  1087. /package/{lib/shared → dist/lib/shared/fix}/fix-presentation-rows.js +0 -0
  1088. /package/{lib/shared → dist/lib/shared/fix}/fix-safety.js +0 -0
  1089. /package/{lib/shared → dist/lib/shared/fix}/fix-terminal.js +0 -0
  1090. /package/{lib → dist/lib}/shared/formats/contract-rules.js +0 -0
  1091. /package/{lib → dist/lib}/shared/formats/github.js +0 -0
  1092. /package/{lib → dist/lib}/shared/formats/index.js +0 -0
  1093. /package/{lib → dist/lib}/shared/project-root.js +0 -0
  1094. /package/{lib/shared → dist/lib/shared/reporting}/baseline-flags.js +0 -0
  1095. /package/{lib/shared → dist/lib/shared/reporting}/reason-groups.js +0 -0
  1096. /package/{lib → dist/lib}/shared/rule-registry.js +0 -0
  1097. /package/{lib/shared → dist/lib/shared/system}/build-output.js +0 -0
  1098. /package/{lib/shared → dist/lib/shared/system}/error-code.js +0 -0
  1099. /package/{lib/shared → dist/lib/shared/system}/git-paths.js +0 -0
  1100. /package/{lib/shared → dist/lib/shared/system}/glob.js +0 -0
  1101. /package/{lib/shared → dist/lib/shared/system}/heap-limit.js +0 -0
  1102. /package/{lib/shared → dist/lib/shared/system}/is-record.js +0 -0
  1103. /package/{lib/shared → dist/lib/shared/system}/real-target.js +0 -0
  1104. /package/{lib/shared → dist/lib/shared/system}/shell-argument.js +0 -0
  1105. /package/{lib/shared/types/cli-finding.js → dist/lib/shared/types/baseline.js} +0 -0
  1106. /package/{lib/shared/types/fix-hunks.js → dist/lib/shared/types/checker-run.js} +0 -0
  1107. /package/{lib/shared/types/fix-presentation.js → dist/lib/shared/types/fix-hunks.js} +0 -0
  1108. /package/{lib/shared/types/fix-run.js → dist/lib/shared/types/fix-presentation.js} +0 -0
  1109. /package/{lib/shared/types/function-summaries.js → dist/lib/shared/types/fix-run.js} +0 -0
  1110. /package/{lib/shared/types/managed-blocks.js → dist/lib/shared/types/function-summaries.js} +0 -0
  1111. /package/{lib/shared/types/pillar-name.js → dist/lib/shared/types/managed-blocks.js} +0 -0
  1112. /package/{lib/shared/types/report-formats.js → dist/lib/shared/types/pillar-name.js} +0 -0
  1113. /package/{lib/shared/types/review-event.js → dist/lib/shared/types/report-formats.js} +0 -0
  1114. /package/{lib/shared/types/review-history.js → dist/lib/shared/types/review-event.js} +0 -0
  1115. /package/{lib/shared/types/settings.js → dist/lib/shared/types/review-history.js} +0 -0
  1116. /package/{lib/shared/types/source-report.js → dist/lib/shared/types/settings.js} +0 -0
  1117. /package/{lib/shared/types/typescript-assignment-target.js → dist/lib/shared/types/source-report.js} +0 -0
  1118. /package/{lib/shared/types/typescript-internals.js → dist/lib/shared/types/typescript-assignment-target.js} +0 -0
  1119. /package/{lib/shared/types/typescript-module-resolution.js → dist/lib/shared/types/typescript-internals.js} +0 -0
  1120. /package/{lib/shared/types/typescript-outer-expression.js → dist/lib/shared/types/typescript-module-resolution.js} +0 -0
  1121. /package/{lib/shared/types/checker-run.js → dist/lib/shared/types.js} +0 -0
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/loadwise)](https://www.npmjs.com/package/loadwise) [![check](https://github.com/IbrahimHafez1/loadwise/actions/workflows/check.yml/badge.svg)](https://github.com/IbrahimHafez1/loadwise/actions/workflows/check.yml) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/IbrahimHafez1/loadwise/badge)](https://scorecard.dev/viewer/?uri=github.com/IbrahimHafez1/loadwise) [![license](https://img.shields.io/npm/l/loadwise?cacheSeconds=3600)](LICENSE)
4
4
 
5
+ **[npm package](https://www.npmjs.com/package/loadwise)** · **[Documentation](https://loadwise.mintlify.app/)** · **[Sponsor](https://github.com/sponsors/IbrahimHafez1)**
6
+
5
7
  Loadwise checks a TypeScript or JavaScript project before it ships. Its deepest coverage is backend and database code, and it also checks React, Next.js, Vue and Angular frontends. One CLI runs five checkers:
6
8
 
7
9
  - **Performance** (`loadwise perf`): repeated database work, ORM and query integrity, blocking calls, collection complexity, React, Vue and Angular rendering and cleanup work, schema-aware indexes, OpenTelemetry traces, executed query plans and an optional read-only database inspection.
@@ -16,16 +18,15 @@ Each finding has a stable `#id` for review. Where a checker can generate an edit
16
18
 
17
19
  ## Install
18
20
 
19
- Use Node.js 22 or later. Run directly with `npx` or install as a devDependency:
21
+ Use Node.js 22 or later. From the project root, install Loadwise from npm and run a check.
20
22
 
21
23
  ```sh
22
- npx loadwise check
23
-
24
- # or install in your project:
25
24
  npm install --save-dev loadwise
26
- npx loadwise --version
25
+ npx loadwise check
27
26
  ```
28
27
 
28
+ For a one-off scan, run `npx loadwise check` without adding a project dependency. Run `npx loadwise --version` to check the installed version. [Editor integration](docs/editor.mdx#set-up-a-custom-stdio-lsp-client) is optional.
29
+
29
30
  By default `loadwise check` runs all five checkers; see the [corpus rule scorecard](bench/corpus/scorecard.md) for measured precision and recall across real-world open-source backends.
30
31
 
31
32
  **Autofix example:** `npx loadwise fix --yes` rewrites eligible issues in place and verifies TypeScript projects with a post-edit typecheck:
@@ -38,8 +39,6 @@ By default `loadwise check` runs all five checkers; see the [corpus rule scoreca
38
39
 
39
40
  **With an AI coding agent**, say **“Run Loadwise”** in your project chat. The agent can run the installed CLI directly. It should check the findings against the code, explain what it would fix or leave alone and why, and let you choose before making edits. [Active-agent workflow and optional MCP setup](#using-loadwise-with-an-active-coding-agent)
40
41
 
41
- **Working manually**, run `npx loadwise check` to see recommendations or `npx loadwise fix --yes` to apply eligible fixes. In any editor with a language server client, `loadwise lsp` shows findings as diagnostics with hovers and fixes. [Editor setup](#editor-language-server)
42
-
43
42
  ### Try a finding and a fix
44
43
 
45
44
  From a project where you ran `npm install --save-dev loadwise`, copy the bundled example to a disposable file and scan it. The copy command refuses to overwrite an existing file.
@@ -84,7 +83,7 @@ The second scan should report two findings. Remove the disposable copy when fini
84
83
  - `--fail-on contract|all` sets the exit threshold. By default, performance, reliability, security and accessibility fail on displayed findings, and a full maintainability scan fails on contract violations. Changed-line maintainability scans fail on any displayed finding. Configured rule levels can change these defaults.
85
84
  - `--min-impact <low|medium|high|critical>` reports only findings at that level or above (see [Impact levels](#impact-levels)).
86
85
  - `--config <file>`, `--ignore <rule-id>` and `--workspace <name|path>` are described under [Configuration](#configuration); `--online` adds the [dependency checks](#dependency-checks).
87
- - `--write-baseline [file]` records the current findings and `--baseline [file]` reports only findings not recorded. The default file is `loadwise-baseline.json` in the checked directory, with one section per checker; the checker commands take the same flags and read or write only their own section. Entries match on rule, file and flagged code (the finding id), never the line number, with a count per entry so N recorded copies allow N findings. Text output ends with `N baseline findings hidden.` and `--json` adds `baselineHidden`. A full comparison reports unmatched entries in `baselineStale`; a partial one, such as a changed-line or single-file scan, reports `null`. Refresh the baseline using its original scope and settings. Not combinable with `--fix`, and `--write-baseline` not with `--staged` or `--changed-since`. `loadwise rel migrations` keeps its own baseline.
86
+ - `--write-baseline [file]` records the current findings and `--baseline [file]` reports only findings not recorded. The default file is `loadwise-baseline.json` in the checked directory, with one section per checker; the checker commands take the same flags and read or write only their own section. Entries match on rule, file and flagged code, with a count per entry so N recorded copies allow N findings. Refreshed JavaScript and TypeScript baselines also match after spacing changes and removal of optional statement-ending semicolons. Text output ends with `N baseline findings hidden.` and `--json` adds `baselineHidden`. A full comparison reports unmatched entries in `baselineStale`; a partial one, such as a changed-line or single-file scan, reports `null`. Refresh the baseline using its original scope and settings. Not combinable with `--fix`, and `--write-baseline` not with `--staged` or `--changed-since`. `loadwise rel migrations` keeps its own baseline.
88
87
 
89
88
  **Exit codes:** **0** passed, **1** a checker met its exit threshold, **2** invalid input or configuration in any checker, a checker that produced no result, or a scan that skipped a file. A JavaScript or TypeScript file that does not parse, or whose analysis fails, is skipped while every other file is still reported; it is named on stderr and in a `skippedFiles` array of `{ file, reason }` in `--json` output (also with `--fix` and `--write-baseline`). `check` keeps that checker's findings, marks its SARIF run as not successful and emits a GitHub warning for each skipped file. A file that exists but cannot be read (the schema snapshot, `package.json`, a review directive) prints a note on stderr; an absent file stays silent.
90
89
 
@@ -107,6 +106,8 @@ Checker names (`performance`, `reliability`, `maintainability`, `security`, `acc
107
106
 
108
107
  Each applied fix in a JavaScript or TypeScript file gets a `// Loadwise <rule-id>: <why>` comment above the fixed statement, and the changed lines are formatted with the project's own Prettier, honouring its config and `.prettierignore`; the rest of the file stays byte-identical. Without Prettier the edits are written as generated, with a note. `--no-comments` and `--no-format` turn these off, also on the per-checker `--fix`. `fix` also takes repeatable `--rule <rule-id>` filtering and `--no-verify-types` (skip the post-edit TypeScript check).
109
108
 
109
+ Maintainability `--fix` limits edits to the checked project. Performance, reliability, security, and accessibility `--fix` use the containing Git repositories of the checked projects or explicitly named source files, so fixes can include shared files such as a schema at a monorepo root. Outside a Git repository, they use the project root. Per-checker fixes refuse hard-linked files and symbolic links that are dangling or resolve outside those limits. Existing files keep their permissions when replaced.
110
+
110
111
  Some transformations always need individual review: making a locally used constant private can affect consumers outside the scan; sharing a private helper between sibling TypeScript modules changes the files included in the build; narrowing a whole-table Drizzle update to rows with differing values can affect locking, triggers and affected-row counts; an upload size limit (the 10 MiB example can reject valid uploads, so check existing gateway or Multer limits); and the Mongoose `.lean()` rewrite, because a lean result skips schema defaults, getters and virtuals. For private TypeScript applications that control their consumers, `npx loadwise fix --all --recipe verified-private-types` also makes locally used type declarations private, after checking the edits with the bundled TypeScript compiler; omit it when other repositories import your types.
111
112
 
112
113
  A local CommonJS recipe encodes your own policy for a manual finding, run alongside the built-in fixes with `npx loadwise fix --all reliability --recipe ./loadwise-fixes.cjs`:
@@ -130,9 +131,9 @@ Keys are `perf`, `rel`, `maint`, `sec` or `a11y` followed by `/` and the rule ID
130
131
 
131
132
  ### Per-checker fixes and dismissals
132
133
 
133
- The source-check commands (`perf`, `rel`, `maint`, `sec` and `a11y` on a project or files, not subcommands such as `perf traces`, `rel migrations` or `sec deps`) take `--fix` (asks **y**es, **n**o, **a**ll remaining or **q**uit for each fix; needs a terminal), `--fix --yes` (applies eligible fixes without asking) and `--fix --only <id>[,<id>...]` (applies exactly those fixes, no prompt or terminal needed). With `--json`, `--only` prints `{ applied, alreadyApplied, failed }`: an id whose change an earlier id already made, such as a shared `Set`, is in `alreadyApplied`; an unknown id, a finding without a fix or a stale fix is in `failed` and the exit code is 2. `--fix` cannot be combined with `--watch` or `--graph`, or with `--json` except with `--only`, and `--yes` is valid only with `--fix`. A fix applies only where the original lines still exist and never overwrites an existing file. With `--json`, a fix is `fix = { changes: [{ file, line, before, after, create? }], note? }`, where `create` holds a whole new file such as a migration; findings also carry `fixable`. The id hashes the rule, the file and the flagged line's text, so it survives edits above the finding.
134
+ The source-check commands (`perf`, `rel`, `maint`, `sec` and `a11y` on a project or files, not subcommands such as `perf traces`, `rel migrations` or `sec deps`) take `--fix` (asks **y**es, **n**o, **a**ll remaining or **q**uit for each fix; needs a terminal), `--fix --yes` (applies eligible fixes without asking) and `--fix --only <id>[,<id>...]` (applies exactly those fixes, no prompt or terminal needed). With `--json`, `--only` prints `{ applied, alreadyApplied, failed }`: an id whose change an earlier id already made, such as a shared `Set`, is in `alreadyApplied`; an unknown id, a finding without a fix or a stale fix is in `failed` and the exit code is 2. `--fix` cannot be combined with `--watch` or `--graph`, or with `--json` except with `--only`, and `--yes` is valid only with `--fix`. A fix applies only where the original lines still exist and never overwrites an existing file. With `--json`, a fix is `fix = { changes: [{ file, line, before, after, create? }], note? }`, where `create` holds a whole new file such as a migration; findings also carry `fixable`. The id hashes the rule, the file and the flagged line's text, so it survives edits above the finding. If identical findings occur in differently named JavaScript or TypeScript declarations, the ids also hash those names. Remaining collisions receive numbered suffixes.
134
135
 
135
- To keep an intentional site, put a comment on its own line immediately before the diagnostic line (line 1 for a whole-file finding such as `large-module`), naming one exact rule and a reason. The finding becomes contextual and stays visible with `--include-contextual`. Declared contracts (CI contract rules, `file-placement`, `folder-boundary`, `data-access-boundary`, `query-mutates-state`, configured row scopes) and Prisma transaction-client escapes and read-modify-write findings cannot be lowered this way.
136
+ To keep an intentional site, put a comment on its own line immediately before the diagnostic line (line 1 for a whole-file finding such as `large-module`), naming one exact rule and a reason. The comment makes every eligible finding of that rule on the diagnostic line contextual, including findings introduced by later edits to that line. Use `--include-contextual` to see those findings. Declared contracts (CI contract rules, `file-placement`, `folder-boundary`, `data-access-boundary`, `query-mutates-state`, configured row scopes) and Prisma transaction-client escapes and read-modify-write findings cannot be lowered this way.
136
137
 
137
138
  ```ts
138
139
  // loadwise-reviewed pg-query-in-loop -- Each iteration measures a separate query-plan sample.
@@ -184,7 +185,7 @@ One optional file, `loadwise.config.json`, sets the defaults for every checker.
184
185
  - `--ignore <rule-id>` (repeatable, on `check` and every checker) adds a rule to `"off"` for one run and beats the config.
185
186
  - `--workspace <name|path>` (repeatable) limits every checker to some workspace packages.
186
187
 
187
- An unknown key or rule id, a wrong level or a malformed section exits with code 2 and lists each problem. Rule ids come from the registered checkers, so a rule id that no checker has yet is rejected. The config applies to source checks and the `polyglot` commands; `rel migrations`, `rel contracts`, `perf db`, `perf traces` and `perf plan` do not read it.
188
+ An unknown key or rule id, a wrong level or a malformed section exits with code 2 and lists each problem. Rule ids come from the registered checkers, so a rule id that no checker has yet is rejected. The config applies to source checks and the `polyglot` commands. `rel contracts` reads `loadwise.config.json` in the current directory, or the file named by `--loadwise-config <file>`, and applies `ignore` and the rule levels in `rules` and `overrides`. An ignored file can still supply inherited properties when an included NestJS DTO extends a class from that file. In that case, any finding points to the included DTO. `rel migrations`, `perf db`, `perf traces` and `perf plan` do not read the config.
188
189
 
189
190
  ## Impact levels
190
191
 
@@ -281,13 +282,13 @@ The hook runs `loadwise check --staged` from the project folder, so every tool t
281
282
 
282
283
  ## Editor (language server)
283
284
 
284
- `loadwise lsp` is a language server for any editor with a Language Server Protocol client. It shows findings from all five checkers as diagnostics, with hovers, fixes, dismissals and code lenses. It needs Node.js 22+ and this package in the project (`npm install --save-dev loadwise`) or on the PATH. Every editor starts it with `npx loadwise lsp --stdio` (`npx.cmd` on Windows where the editor does not resolve `npx` itself). The snippets below attach it to JavaScript, TypeScript and Python; the checkers also read Go, Java, C#, Rust, HTML, Vue and Svelte.
285
+ `loadwise lsp` shows findings as editor diagnostics, with hovers, fixes, dismissals and code lenses. For any editor with a custom stdio LSP client, see the [Node.js launch settings and editor examples](docs/editor.mdx#set-up-a-custom-stdio-lsp-client). Use the installed CLI path in place of `/absolute/path/to/loadwise.js` in the examples below.
285
286
 
286
287
  **Neovim 0.11+** (`init.lua`); with an older Neovim, register the same `cmd`, `filetypes` and root markers as a custom nvim-lspconfig server:
287
288
 
288
289
  ```lua
289
290
  vim.lsp.config('loadwise', {
290
- cmd = { 'npx', 'loadwise', 'lsp', '--stdio' },
291
+ cmd = { 'node', '/absolute/path/to/loadwise.js', 'lsp', '--stdio' },
291
292
  filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'python' },
292
293
  root_markers = { 'loadwise.config.json', 'tsconfig.json', 'jsconfig.json', 'package.json', '.git' },
293
294
  init_options = { loadwise = { severity = 'default' } },
@@ -299,15 +300,15 @@ vim.lsp.enable('loadwise')
299
300
 
300
301
  ```toml
301
302
  [language-server.loadwise]
302
- command = "npx"
303
- args = ["loadwise", "lsp", "--stdio"]
303
+ command = "node"
304
+ args = ["/absolute/path/to/loadwise.js", "lsp", "--stdio"]
304
305
 
305
306
  [[language]]
306
307
  name = "typescript"
307
308
  language-servers = ["typescript-language-server", "loadwise"]
308
309
  ```
309
310
 
310
- **Zed** (`settings.json`) starts only language servers that an extension registers; with one that registers `loadwise`, set `"lsp": { "loadwise": { "binary": { "path": "npx", "arguments": ["loadwise", "lsp", "--stdio"] } } }` and add `"loadwise"` to each language's `language_servers` after `"..."`.
311
+ **Zed**: follow the [extension-based setup](docs/editor.mdx#zed) if your installed extension registers Loadwise.
311
312
 
312
313
  **Sublime Text** with the LSP package (**Preferences > Package Settings > LSP > Settings**):
313
314
 
@@ -316,7 +317,7 @@ language-servers = ["typescript-language-server", "loadwise"]
316
317
  "clients": {
317
318
  "loadwise": {
318
319
  "enabled": true,
319
- "command": ["npx", "loadwise", "lsp", "--stdio"],
320
+ "command": ["node", "/absolute/path/to/loadwise.js", "lsp", "--stdio"],
320
321
  "selector": "source.js | source.jsx | source.ts | source.tsx | source.python"
321
322
  }
322
323
  }
@@ -329,10 +330,10 @@ language-servers = ["typescript-language-server", "loadwise"]
329
330
  (with-eval-after-load 'eglot
330
331
  (add-to-list 'eglot-server-programs
331
332
  '((js-mode js-ts-mode typescript-ts-mode tsx-ts-mode python-mode python-ts-mode)
332
- . ("npx" "loadwise" "lsp" "--stdio"))))
333
+ . ("node" "/absolute/path/to/loadwise.js" "lsp" "--stdio"))))
333
334
  ```
334
335
 
335
- **VS Code and VSCodium**: install a generic Language Server Protocol client extension from Open VSX and set its server command to `npx loadwise lsp --stdio`. To apply eligible fixes on save, add `"editor.codeActionsOnSave": { "source.fixAll.loadwise": "explicit" }` to your settings.
336
+ **VS Code and VSCodium**: follow the [Simple LSP Client workspace setup](docs/editor.mdx#vs-code-and-vscodium). For IntelliJ IDEA, see the [stdio server configuration](docs/editor.mdx#intellij-idea).
336
337
 
337
338
  **What you see.** Each finding is a diagnostic with its checker as the source (`loadwise perf`, `loadwise maint`, `loadwise sec`) and its rule as the code, linked to the rule's page, with related locations such as the other imports of a dependency cycle. Rule levels from `loadwise.config.json` decide the severity: by default declared contract violations are errors and other findings warnings. Live-database findings appear on the first line of `package.json`. Hovers show the recommendation, the finding and the before and after code. Code actions are **Apply fix: <rule>**, **Dismiss this finding**, **Dismiss <rule> in this file** and **Apply all Loadwise fixes in this file**, and code lenses put **Apply fix**, **Dismiss** and **Apply all** above fixable lines. Multi-file fixes apply all-or-nothing, never overwrite an existing file and refuse code that changed since the scan, including unsaved editor text. `source.fixAll.loadwise` applies every eligible fix in the file as one undoable edit and leaves fixes that need individual review for **Apply fix**. A dismissed finding stays hidden until its flagged line changes; dismissals are saved in `.loadwise/dismissed.json` at the workspace folder root, which you can commit to share them.
338
339
 
@@ -353,7 +354,7 @@ Settings go in the client's `initializationOptions` or its `loadwise` configurat
353
354
  | ---------- | ----------- | ----------------------------------------------------------------------------- |
354
355
  | `enabled` | `true` | Show diagnostics for the folder |
355
356
  | `project` | `""` | TypeScript or JavaScript project config, relative to the folder |
356
- | `cli` | `""` | Absolute path to another `bin/loadwise.js`, such as a development build |
357
+ | `cli` | `""` | Absolute path to another `dist/bin/loadwise.js`, such as a development build |
357
358
  | `severity` | `"default"` | `error`, `warning`, `information` or `hint` shows every finding at that level |
358
359
  | `codeLens` | `true` | Show the Apply fix and Dismiss code lenses |
359
360
 
@@ -388,73 +389,73 @@ Engines: one-shot checks use Microsoft's Go-based [TypeScript 7](https://github.
388
389
 
389
390
  <!-- loadwise:rules:start checker=performance group=source-checks -->
390
391
 
391
- | Rule | Impact | What it flags |
392
- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
393
- | <a id="angular-default-change-detection"></a>[`angular-default-change-detection`](docs/rules/angular-default-change-detection.md) | low | An Angular component uses default change detection instead of OnPush, so its subtree is re-checked on every event. |
394
- | <a id="angular-ngfor-missing-trackby"></a>[`angular-ngfor-missing-trackby`](docs/rules/angular-ngfor-missing-trackby.md) | low | An *ngFor has no trackBy, so a list replaced with new objects recreates the DOM of every item. |
395
- | <a id="angular-subscribe-without-cleanup"></a>[`angular-subscribe-without-cleanup`](docs/rules/angular-subscribe-without-cleanup.md) | medium | An RxJS subscription in a component has no completing operator or ngOnDestroy unsubscribe and keeps running after destruction. |
396
- | <a id="array-repeated-find"></a>[`array-repeated-find`](docs/rules/array-repeated-find.md) | medium | An array is searched with find or findIndex repeatedly where a Map lookup would do. |
397
- | <a id="array-repeated-membership"></a>[`array-repeated-membership`](docs/rules/array-repeated-membership.md) | medium | An array is tested with includes or indexOf repeatedly where a Set would do. |
398
- | <a id="dom-layout-thrashing"></a>[`dom-layout-thrashing`](docs/rules/dom-layout-thrashing.md) | medium | A loop reads layout metrics and mutates DOM styles or classes, forcing a reflow on each iteration. |
399
- | <a id="dom-listener-without-cleanup"></a>[`dom-listener-without-cleanup`](docs/rules/dom-listener-without-cleanup.md) | low | A window or document listener uses an inline function with no AbortSignal or once, so it can never be removed. |
400
- | <a id="dom-unthrottled-scroll-resize"></a>[`dom-unthrottled-scroll-resize`](docs/rules/dom-unthrottled-scroll-resize.md) | low | A scroll, resize, mousemove, wheel or touch listener runs unthrottled work (or is non-passive) on the main thread. |
401
- | <a id="express-missing-compression"></a>[`express-missing-compression`](docs/rules/express-missing-compression.md) | low | An Express server registers no response compression middleware. |
402
- | <a id="external-call-in-transaction"></a>[`external-call-in-transaction`](docs/rules/external-call-in-transaction.md) | high | An external call is awaited inside a database transaction, holding its connection and locks. |
403
- | <a id="filter-for-existence"></a>[`filter-for-existence`](docs/rules/filter-for-existence.md) | low | filter(...).length is used only to test whether any element matches. |
404
- | <a id="frontend-barrel-heavy-import"></a>[`frontend-barrel-heavy-import`](docs/rules/frontend-barrel-heavy-import.md) | low | A client module imports the whole of lodash or moment instead of subpaths or a lighter library. |
405
- | <a id="graphql-n-plus-one-resolver"></a>[`graphql-n-plus-one-resolver`](docs/rules/graphql-n-plus-one-resolver.md) | high | A GraphQL field resolver executes a database or HTTP query per parent item without DataLoader batching. |
406
- | <a id="heavy-media-in-request-handler"></a>[`heavy-media-in-request-handler`](docs/rules/heavy-media-in-request-handler.md) | medium | Heavy image (sharp) or PDF rendering runs directly inside an HTTP request handler. |
407
- | <a id="json-roundtrip-clone"></a>[`json-roundtrip-clone`](docs/rules/json-roundtrip-clone.md) | low | A value is deep-cloned with JSON.parse(JSON.stringify(...)) on a request path. |
408
- | <a id="json-stringify-in-loop"></a>[`json-stringify-in-loop`](docs/rules/json-stringify-in-loop.md) | medium | JSON.stringify runs inside a loop instead of serializing once or streaming. |
409
- | <a id="list-count-per-request"></a>[`list-count-per-request`](docs/rules/list-count-per-request.md) | medium | A list endpoint runs a full count query on every request. |
410
- | <a id="list-query-overfetch"></a>[`list-query-overfetch`](docs/rules/list-query-overfetch.md) | medium | A list query loads large columns or nested relations without a narrow projection. |
411
- | <a id="llm-call-without-max-tokens"></a>[`llm-call-without-max-tokens`](docs/rules/llm-call-without-max-tokens.md) | medium | An OpenAI chat or responses call sets no output token limit. |
412
- | <a id="loop-copy-accumulator"></a>[`loop-copy-accumulator`](docs/rules/loop-copy-accumulator.md) | medium | A loop copies its growing result on every iteration. |
413
- | <a id="mongoose-hydrate-for-to-object"></a>[`mongoose-hydrate-for-to-object`](docs/rules/mongoose-hydrate-for-to-object.md) | medium | A Mongoose query hydrates full Documents only to convert them immediately via .toObject() or .toJSON(). |
414
- | <a id="mongoose-missing-lean"></a>[`mongoose-missing-lean`](docs/rules/mongoose-missing-lean.md) | medium | A Mongoose read query is returned or serialized without .lean(), paying full Document hydration overhead. |
415
- | <a id="node-event-listener-leak"></a>[`node-event-listener-leak`](docs/rules/node-event-listener-leak.md) | high | An event listener is registered inside a repeated or per-request context without matching cleanup. |
416
- | <a id="node-sync-compression-in-async"></a>[`node-sync-compression-in-async`](docs/rules/node-sync-compression-in-async.md) | medium | A synchronous zlib call blocks the event loop inside an async function. |
417
- | <a id="node-sync-crypto-in-async"></a>[`node-sync-crypto-in-async`](docs/rules/node-sync-crypto-in-async.md) | high | A synchronous crypto call blocks the event loop inside an async function. |
418
- | <a id="node-sync-fs-in-async"></a>[`node-sync-fs-in-async`](docs/rules/node-sync-fs-in-async.md) | medium | A synchronous fs call blocks the event loop inside an async function. |
419
- | <a id="node-sync-process-in-async"></a>[`node-sync-process-in-async`](docs/rules/node-sync-process-in-async.md) | high | A synchronous child_process call blocks the event loop inside an async function. |
420
- | <a id="notification-send-in-loop"></a>[`notification-send-in-loop`](docs/rules/notification-send-in-loop.md) | high | A push, email or Firebase message is sent once per loop iteration instead of in one batch. |
421
- | <a id="orm-cartesian-include"></a>[`orm-cartesian-include`](docs/rules/orm-cartesian-include.md) | high | One query joins two or more one-to-many relations, so the returned rows multiply. |
422
- | <a id="orm-deep-offset"></a>[`orm-deep-offset`](docs/rules/orm-deep-offset.md) | high | A list query pages with a large or unbounded offset, so the database reads and discards every skipped row. |
423
- | <a id="password-hash-pure-js"></a>[`password-hash-pure-js`](docs/rules/password-hash-pure-js.md) | medium | bcryptjs hashes passwords in pure JavaScript on the main thread. |
424
- | <a id="password-hash-sync-in-async"></a>[`password-hash-sync-in-async`](docs/rules/password-hash-sync-in-async.md) | high | A synchronous bcrypt call blocks the event loop inside an async function. |
425
- | <a id="pg-count-materialization"></a>[`pg-count-materialization`](docs/rules/pg-count-materialization.md) | medium | A pg query loads rows only to count them. |
426
- | <a id="pg-filter-materialization"></a>[`pg-filter-materialization`](docs/rules/pg-filter-materialization.md) | medium | A pg query loads an unbounded result that JavaScript then filters by equality. |
427
- | <a id="pg-first-materialization"></a>[`pg-first-materialization`](docs/rules/pg-first-materialization.md) | medium | A pg query loads an unbounded result to read only its first row. |
428
- | <a id="pg-query-in-loop"></a>[`pg-query-in-loop`](docs/rules/pg-query-in-loop.md) | high | A pg query runs once per loop iteration. |
429
- | <a id="pg-top-k-materialization"></a>[`pg-top-k-materialization`](docs/rules/pg-top-k-materialization.md) | medium | A pg query loads an unbounded result that JavaScript sorts to keep the top rows. |
430
- | <a id="pg-unreleased-checkout"></a>[`pg-unreleased-checkout`](docs/rules/pg-unreleased-checkout.md) | critical | A chained pool checkout loses the client, so it is never released. |
431
- | <a id="pool-created-per-request-or-item"></a>[`pool-created-per-request-or-item`](docs/rules/pool-created-per-request-or-item.md) | critical | A database, Redis, S3, OpenAI, Anthropic or Stripe client or pool is created on a per-request or per-item path. |
432
- | <a id="prisma-count-materialization"></a>[`prisma-count-materialization`](docs/rules/prisma-count-materialization.md) | medium | A Prisma query loads rows only to count them. |
433
- | <a id="prisma-filter-materialization"></a>[`prisma-filter-materialization`](docs/rules/prisma-filter-materialization.md) | medium | A Prisma query loads an unbounded result that JavaScript then filters by equality. |
434
- | <a id="prisma-first-materialization"></a>[`prisma-first-materialization`](docs/rules/prisma-first-materialization.md) | medium | A Prisma query loads an unbounded result to read only its first row. |
435
- | <a id="prisma-query-in-loop"></a>[`prisma-query-in-loop`](docs/rules/prisma-query-in-loop.md) | high | A Prisma query runs once per loop iteration. |
436
- | <a id="prisma-top-k-materialization"></a>[`prisma-top-k-materialization`](docs/rules/prisma-top-k-materialization.md) | medium | A Prisma query loads an unbounded result that JavaScript sorts to keep the top rows. |
437
- | <a id="queue-add-in-loop"></a>[`queue-add-in-loop`](docs/rules/queue-add-in-loop.md) | high | A job queue add runs once per item instead of one addBulk. |
438
- | <a id="react-component-defined-in-component"></a>[`react-component-defined-in-component`](docs/rules/react-component-defined-in-component.md) | medium | A component is declared inside another component and rendered as an element, so it remounts on every render and loses its state and DOM. |
439
- | <a id="react-context-value-recreated"></a>[`react-context-value-recreated`](docs/rules/react-context-value-recreated.md) | low | An inline object or array literal in Context.Provider value creates a new reference on every render. |
440
- | <a id="react-fetch-in-effect-no-abort"></a>[`react-fetch-in-effect-no-abort`](docs/rules/react-fetch-in-effect-no-abort.md) | low | A fetch in an effect has no AbortController or cleanup, so dependency changes can race and apply stale results. |
441
- | <a id="react-index-as-key"></a>[`react-index-as-key`](docs/rules/react-index-as-key.md) | low | A list item uses the map index as its React key, which breaks reconciliation when items are inserted or reordered. |
442
- | <a id="react-inline-object-in-jsx-prop"></a>[`react-inline-object-in-jsx-prop`](docs/rules/react-inline-object-in-jsx-prop.md) | low | An inline object literal is passed to a memo() component, creating a new reference each render and defeating the memo. |
443
- | <a id="react-missing-cleanup"></a>[`react-missing-cleanup`](docs/rules/react-missing-cleanup.md) | medium | An effect starts a global listener, interval, socket or endless subscription and returns no cleanup, so it leaks on every remount. |
444
- | <a id="rebuild-lookup-in-loop"></a>[`rebuild-lookup-in-loop`](docs/rules/rebuild-lookup-in-loop.md) | high | A Set or Map is rebuilt from the same data on every loop iteration. |
445
- | <a id="redis-command-in-loop"></a>[`redis-command-in-loop`](docs/rules/redis-command-in-loop.md) | high | A per-key Redis command runs once per loop iteration. |
446
- | <a id="redis-keys-command"></a>[`redis-keys-command`](docs/rules/redis-keys-command.md) | high | A Redis KEYS call blocks the server while it scans the keyspace. |
447
- | <a id="reduce-copy-accumulator"></a>[`reduce-copy-accumulator`](docs/rules/reduce-copy-accumulator.md) | medium | A reduce callback copies its growing accumulator on every step. |
448
- | <a id="sequential-http-in-loop"></a>[`sequential-http-in-loop`](docs/rules/sequential-http-in-loop.md) | high | Independent HTTP requests are awaited one at a time inside a loop. |
449
- | <a id="serial-awaits-in-literal"></a>[`serial-awaits-in-literal`](docs/rules/serial-awaits-in-literal.md) | medium | An array or object literal awaits two or more independent values one after another. |
450
- | <a id="service-query-in-loop"></a>[`service-query-in-loop`](docs/rules/service-query-in-loop.md) | high | A loop calls a project function that runs several database operations per item. |
451
- | <a id="session-memory-store"></a>[`session-memory-store`](docs/rules/session-memory-store.md) | high | An express-session middleware has no store, so sessions live in process memory. |
452
- | <a id="sql-select-star-in-query"></a>[`sql-select-star-in-query`](docs/rules/sql-select-star-in-query.md) | low | A raw SQL query selects every column with SELECT * instead of the columns it needs. |
453
- | <a id="unbounded-list-query"></a>[`unbounded-list-query`](docs/rules/unbounded-list-query.md) | high | A request handler returns query results without an apparent row limit. |
454
- | <a id="unbounded-module-cache"></a>[`unbounded-module-cache`](docs/rules/unbounded-module-cache.md) | medium | A long-lived cache accepts dynamic keys without an apparent bound or eviction. |
455
- | <a id="vue-v-for-missing-key"></a>[`vue-v-for-missing-key`](docs/rules/vue-v-for-missing-key.md) | low | A list rendered with h() has no key prop, forcing inefficient patching. |
456
- | <a id="vue-watch-missing-cleanup"></a>[`vue-watch-missing-cleanup`](docs/rules/vue-watch-missing-cleanup.md) | medium | onMounted registers a global listener, timer or observer with no unmount cleanup. |
457
- | <a id="whole-payload-in-memory"></a>[`whole-payload-in-memory`](docs/rules/whole-payload-in-memory.md) | medium | An operation loads an entire file, stream, or response into memory. |
392
+ | Rule | Impact | What it flags |
393
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
394
+ | <a id="angular-default-change-detection"></a>[`angular-default-change-detection`](docs/rules/performance/angular-default-change-detection.md) | low | An Angular component uses default change detection instead of OnPush, so its subtree is re-checked on every event. |
395
+ | <a id="angular-ngfor-missing-trackby"></a>[`angular-ngfor-missing-trackby`](docs/rules/performance/angular-ngfor-missing-trackby.md) | low | An *ngFor has no trackBy, so a list replaced with new objects recreates the DOM of every item. |
396
+ | <a id="angular-subscribe-without-cleanup"></a>[`angular-subscribe-without-cleanup`](docs/rules/performance/angular-subscribe-without-cleanup.md) | medium | An RxJS subscription in a component has no completing operator or ngOnDestroy unsubscribe and keeps running after destruction. |
397
+ | <a id="array-repeated-find"></a>[`array-repeated-find`](docs/rules/performance/array-repeated-find.md) | medium | An array is searched with find or findIndex repeatedly where a Map lookup would do. |
398
+ | <a id="array-repeated-membership"></a>[`array-repeated-membership`](docs/rules/performance/array-repeated-membership.md) | medium | An array is tested with includes or indexOf repeatedly where a Set would do. |
399
+ | <a id="dom-layout-thrashing"></a>[`dom-layout-thrashing`](docs/rules/performance/dom-layout-thrashing.md) | medium | A loop reads layout metrics and mutates DOM styles or classes, forcing a reflow on each iteration. |
400
+ | <a id="dom-listener-without-cleanup"></a>[`dom-listener-without-cleanup`](docs/rules/performance/dom-listener-without-cleanup.md) | low | A window or document listener uses an inline function with no AbortSignal or once, so it can never be removed. |
401
+ | <a id="dom-unthrottled-scroll-resize"></a>[`dom-unthrottled-scroll-resize`](docs/rules/performance/dom-unthrottled-scroll-resize.md) | low | A scroll, resize, mousemove, wheel or touch listener runs unthrottled work (or is non-passive) on the main thread. |
402
+ | <a id="express-missing-compression"></a>[`express-missing-compression`](docs/rules/performance/express-missing-compression.md) | low | An Express server registers no response compression middleware. |
403
+ | <a id="external-call-in-transaction"></a>[`external-call-in-transaction`](docs/rules/performance/external-call-in-transaction.md) | high | An external call is awaited inside a database transaction, holding its connection and locks. |
404
+ | <a id="filter-for-existence"></a>[`filter-for-existence`](docs/rules/performance/filter-for-existence.md) | low | filter(...).length is used only to test whether any element matches. |
405
+ | <a id="frontend-barrel-heavy-import"></a>[`frontend-barrel-heavy-import`](docs/rules/performance/frontend-barrel-heavy-import.md) | low | A client module imports the whole of lodash or moment instead of subpaths or a lighter library. |
406
+ | <a id="graphql-n-plus-one-resolver"></a>[`graphql-n-plus-one-resolver`](docs/rules/performance/graphql-n-plus-one-resolver.md) | high | A GraphQL field resolver executes a database or HTTP query per parent item without DataLoader batching. |
407
+ | <a id="heavy-media-in-request-handler"></a>[`heavy-media-in-request-handler`](docs/rules/performance/heavy-media-in-request-handler.md) | medium | Heavy image (sharp) or PDF rendering runs directly inside an HTTP request handler. |
408
+ | <a id="json-roundtrip-clone"></a>[`json-roundtrip-clone`](docs/rules/performance/json-roundtrip-clone.md) | low | A value is deep-cloned with JSON.parse(JSON.stringify(...)) on a request path. |
409
+ | <a id="json-stringify-in-loop"></a>[`json-stringify-in-loop`](docs/rules/performance/json-stringify-in-loop.md) | medium | JSON.stringify runs inside a loop instead of serializing once or streaming. |
410
+ | <a id="list-count-per-request"></a>[`list-count-per-request`](docs/rules/performance/list-count-per-request.md) | medium | A list endpoint runs a full count query on every request. |
411
+ | <a id="list-query-overfetch"></a>[`list-query-overfetch`](docs/rules/performance/list-query-overfetch.md) | medium | A list query loads large columns or nested relations without a narrow projection. |
412
+ | <a id="llm-call-without-max-tokens"></a>[`llm-call-without-max-tokens`](docs/rules/performance/llm-call-without-max-tokens.md) | medium | An OpenAI chat or responses call sets no output token limit. |
413
+ | <a id="loop-copy-accumulator"></a>[`loop-copy-accumulator`](docs/rules/performance/loop-copy-accumulator.md) | medium | A loop copies its growing result on every iteration. |
414
+ | <a id="mongoose-hydrate-for-to-object"></a>[`mongoose-hydrate-for-to-object`](docs/rules/performance/mongoose-hydrate-for-to-object.md) | medium | A Mongoose query hydrates full Documents only to convert them immediately via .toObject() or .toJSON(). |
415
+ | <a id="mongoose-missing-lean"></a>[`mongoose-missing-lean`](docs/rules/performance/mongoose-missing-lean.md) | medium | A Mongoose read query is returned or serialized without .lean(), paying full Document hydration overhead. |
416
+ | <a id="node-event-listener-leak"></a>[`node-event-listener-leak`](docs/rules/performance/node-event-listener-leak.md) | high | An event listener is registered inside a repeated or per-request context without matching cleanup. |
417
+ | <a id="node-sync-compression-in-async"></a>[`node-sync-compression-in-async`](docs/rules/performance/node-sync-compression-in-async.md) | medium | A synchronous zlib call blocks the event loop inside an async function. |
418
+ | <a id="node-sync-crypto-in-async"></a>[`node-sync-crypto-in-async`](docs/rules/performance/node-sync-crypto-in-async.md) | high | A synchronous crypto call blocks the event loop inside an async function. |
419
+ | <a id="node-sync-fs-in-async"></a>[`node-sync-fs-in-async`](docs/rules/performance/node-sync-fs-in-async.md) | medium | A synchronous fs call blocks the event loop inside an async function. |
420
+ | <a id="node-sync-process-in-async"></a>[`node-sync-process-in-async`](docs/rules/performance/node-sync-process-in-async.md) | high | A synchronous child_process call blocks the event loop inside an async function. |
421
+ | <a id="notification-send-in-loop"></a>[`notification-send-in-loop`](docs/rules/performance/notification-send-in-loop.md) | high | A push, email or Firebase message is sent once per loop iteration instead of in one batch. |
422
+ | <a id="orm-cartesian-include"></a>[`orm-cartesian-include`](docs/rules/performance/orm-cartesian-include.md) | high | One query joins two or more one-to-many relations, so the returned rows multiply. |
423
+ | <a id="orm-deep-offset"></a>[`orm-deep-offset`](docs/rules/performance/orm-deep-offset.md) | high | A list query pages with a large or unbounded offset, so the database reads and discards every skipped row. |
424
+ | <a id="password-hash-pure-js"></a>[`password-hash-pure-js`](docs/rules/performance/password-hash-pure-js.md) | medium | bcryptjs hashes passwords in pure JavaScript on the main thread. |
425
+ | <a id="password-hash-sync-in-async"></a>[`password-hash-sync-in-async`](docs/rules/performance/password-hash-sync-in-async.md) | high | A synchronous bcrypt call blocks the event loop inside an async function. |
426
+ | <a id="pg-count-materialization"></a>[`pg-count-materialization`](docs/rules/performance/pg-count-materialization.md) | medium | A pg query loads rows only to count them. |
427
+ | <a id="pg-filter-materialization"></a>[`pg-filter-materialization`](docs/rules/performance/pg-filter-materialization.md) | medium | A pg query loads an unbounded result that JavaScript then filters by equality. |
428
+ | <a id="pg-first-materialization"></a>[`pg-first-materialization`](docs/rules/performance/pg-first-materialization.md) | medium | A pg query loads an unbounded result to read only its first row. |
429
+ | <a id="pg-query-in-loop"></a>[`pg-query-in-loop`](docs/rules/performance/pg-query-in-loop.md) | high | A pg query runs once per loop iteration. |
430
+ | <a id="pg-top-k-materialization"></a>[`pg-top-k-materialization`](docs/rules/performance/pg-top-k-materialization.md) | medium | A pg query loads an unbounded result that JavaScript sorts to keep the top rows. |
431
+ | <a id="pg-unreleased-checkout"></a>[`pg-unreleased-checkout`](docs/rules/performance/pg-unreleased-checkout.md) | critical | A chained pool checkout loses the client, so it is never released. |
432
+ | <a id="pool-created-per-request-or-item"></a>[`pool-created-per-request-or-item`](docs/rules/performance/pool-created-per-request-or-item.md) | critical | A database, Redis, S3, OpenAI, Anthropic or Stripe client or pool is created on a per-request or per-item path. |
433
+ | <a id="prisma-count-materialization"></a>[`prisma-count-materialization`](docs/rules/performance/prisma-count-materialization.md) | medium | A Prisma query loads rows only to count them. |
434
+ | <a id="prisma-filter-materialization"></a>[`prisma-filter-materialization`](docs/rules/performance/prisma-filter-materialization.md) | medium | A Prisma query loads an unbounded result that JavaScript then filters by equality. |
435
+ | <a id="prisma-first-materialization"></a>[`prisma-first-materialization`](docs/rules/performance/prisma-first-materialization.md) | medium | A Prisma query loads an unbounded result to read only its first row. |
436
+ | <a id="prisma-query-in-loop"></a>[`prisma-query-in-loop`](docs/rules/performance/prisma-query-in-loop.md) | high | A Prisma query runs once per loop iteration. |
437
+ | <a id="prisma-top-k-materialization"></a>[`prisma-top-k-materialization`](docs/rules/performance/prisma-top-k-materialization.md) | medium | A Prisma query loads an unbounded result that JavaScript sorts to keep the top rows. |
438
+ | <a id="queue-add-in-loop"></a>[`queue-add-in-loop`](docs/rules/performance/queue-add-in-loop.md) | high | A job queue add runs once per item instead of one addBulk. |
439
+ | <a id="react-component-defined-in-component"></a>[`react-component-defined-in-component`](docs/rules/performance/react-component-defined-in-component.md) | medium | A component is declared inside another component and rendered as an element, so it remounts on every render and loses its state and DOM. |
440
+ | <a id="react-context-value-recreated"></a>[`react-context-value-recreated`](docs/rules/performance/react-context-value-recreated.md) | low | An inline object or array literal in Context.Provider value creates a new reference on every render. |
441
+ | <a id="react-fetch-in-effect-no-abort"></a>[`react-fetch-in-effect-no-abort`](docs/rules/performance/react-fetch-in-effect-no-abort.md) | low | A fetch in an effect has no AbortController or cleanup, so dependency changes can race and apply stale results. |
442
+ | <a id="react-index-as-key"></a>[`react-index-as-key`](docs/rules/performance/react-index-as-key.md) | low | A list item uses the map index as its React key, which breaks reconciliation when items are inserted or reordered. |
443
+ | <a id="react-inline-object-in-jsx-prop"></a>[`react-inline-object-in-jsx-prop`](docs/rules/performance/react-inline-object-in-jsx-prop.md) | low | An inline object literal is passed to a memo() component, creating a new reference each render and defeating the memo. |
444
+ | <a id="react-missing-cleanup"></a>[`react-missing-cleanup`](docs/rules/performance/react-missing-cleanup.md) | medium | An effect starts a global listener, interval, socket or endless subscription and returns no cleanup, so it leaks on every remount. |
445
+ | <a id="rebuild-lookup-in-loop"></a>[`rebuild-lookup-in-loop`](docs/rules/performance/rebuild-lookup-in-loop.md) | high | A Set or Map is rebuilt from the same data on every loop iteration. |
446
+ | <a id="redis-command-in-loop"></a>[`redis-command-in-loop`](docs/rules/performance/redis-command-in-loop.md) | high | A per-key Redis command runs once per loop iteration. |
447
+ | <a id="redis-keys-command"></a>[`redis-keys-command`](docs/rules/performance/redis-keys-command.md) | high | A Redis KEYS call blocks the server while it scans the keyspace. |
448
+ | <a id="reduce-copy-accumulator"></a>[`reduce-copy-accumulator`](docs/rules/performance/reduce-copy-accumulator.md) | medium | A reduce callback copies its growing accumulator on every step. |
449
+ | <a id="sequential-http-in-loop"></a>[`sequential-http-in-loop`](docs/rules/performance/sequential-http-in-loop.md) | high | Independent HTTP requests are awaited one at a time inside a loop. |
450
+ | <a id="serial-awaits-in-literal"></a>[`serial-awaits-in-literal`](docs/rules/performance/serial-awaits-in-literal.md) | medium | An array or object literal awaits two or more independent values one after another. |
451
+ | <a id="service-query-in-loop"></a>[`service-query-in-loop`](docs/rules/performance/service-query-in-loop.md) | high | A loop calls a project function that runs several database operations per item. |
452
+ | <a id="session-memory-store"></a>[`session-memory-store`](docs/rules/performance/session-memory-store.md) | high | An express-session middleware has no store, so sessions live in process memory. |
453
+ | <a id="sql-select-star-in-query"></a>[`sql-select-star-in-query`](docs/rules/performance/sql-select-star-in-query.md) | low | A raw SQL query selects every column with SELECT * instead of the columns it needs. |
454
+ | <a id="unbounded-list-query"></a>[`unbounded-list-query`](docs/rules/performance/unbounded-list-query.md) | high | A request handler returns query results without an apparent row limit. |
455
+ | <a id="unbounded-module-cache"></a>[`unbounded-module-cache`](docs/rules/performance/unbounded-module-cache.md) | medium | A long-lived cache accepts dynamic keys without an apparent bound or eviction. |
456
+ | <a id="vue-v-for-missing-key"></a>[`vue-v-for-missing-key`](docs/rules/performance/vue-v-for-missing-key.md) | low | A list rendered with h() has no key prop, forcing inefficient patching. |
457
+ | <a id="vue-watch-missing-cleanup"></a>[`vue-watch-missing-cleanup`](docs/rules/performance/vue-watch-missing-cleanup.md) | medium | onMounted registers a global listener, timer or observer with no unmount cleanup. |
458
+ | <a id="whole-payload-in-memory"></a>[`whole-payload-in-memory`](docs/rules/performance/whole-payload-in-memory.md) | medium | An operation loads an entire file, stream, or response into memory. |
458
459
 
459
460
  <!-- loadwise:rules:end -->
460
461
 
@@ -464,18 +465,18 @@ Covered libraries: Prisma, Drizzle ORM (PostgreSQL, MySQL and SQLite core APIs),
464
465
 
465
466
  <!-- loadwise:rules:start checker=performance group=orm-and-query-integrity-checks -->
466
467
 
467
- | Rule | Impact | What it flags |
468
- | ------------------------------------------------------------------------------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------- |
469
- | <a id="drizzle-query-in-loop"></a>[`drizzle-query-in-loop`](docs/rules/drizzle-query-in-loop.md) | high | A Drizzle statement executes once per loop iteration. |
470
- | <a id="guard-query-per-request"></a>[`guard-query-per-request`](docs/rules/guard-query-per-request.md) | medium | A guard or per-request hook runs a database query before every handler. |
471
- | <a id="orm-count-materialization"></a>[`orm-count-materialization`](docs/rules/orm-count-materialization.md) | medium | A TypeORM, Sequelize, Mongoose, Knex or Kysely query loads rows only to count them. |
472
- | <a id="orm-query-in-loop"></a>[`orm-query-in-loop`](docs/rules/orm-query-in-loop.md) | high | A TypeORM, Sequelize, Mongoose, Knex or Kysely operation runs once per loop iteration. |
473
- | <a id="prisma-distinct-in-memory"></a>[`prisma-distinct-in-memory`](docs/rules/prisma-distinct-in-memory.md) | medium | Prisma findMany with distinct reads every matching row and de-duplicates in memory. |
474
- | <a id="prisma-relation-count-in-list"></a>[`prisma-relation-count-in-list`](docs/rules/prisma-relation-count-in-list.md) | medium | A paged Prisma findMany selects a relation _count computed over the whole related table. |
475
- | <a id="typeorm-existence-materialization"></a>[`typeorm-existence-materialization`](docs/rules/typeorm-existence-materialization.md) | medium | A TypeORM entity is loaded only to check whether it exists. |
476
- | <a id="typeorm-load-then-save"></a>[`typeorm-load-then-save`](docs/rules/typeorm-load-then-save.md) | high | A TypeORM entity is loaded only to change a few fields and save it back. |
477
- | <a id="typeorm-transaction-in-loop"></a>[`typeorm-transaction-in-loop`](docs/rules/typeorm-transaction-in-loop.md) | high | A loop calls a helper that starts one TypeORM transaction per item. |
478
- | <a id="typeorm-wide-projection"></a>[`typeorm-wide-projection`](docs/rules/typeorm-wide-projection.md) | low | A TypeORM DTO projection loads wide columns it never uses. |
468
+ | Rule | Impact | What it flags |
469
+ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------- |
470
+ | <a id="drizzle-query-in-loop"></a>[`drizzle-query-in-loop`](docs/rules/performance/drizzle-query-in-loop.md) | high | A Drizzle statement executes once per loop iteration. |
471
+ | <a id="guard-query-per-request"></a>[`guard-query-per-request`](docs/rules/performance/guard-query-per-request.md) | medium | A guard or per-request hook runs a database query before every handler. |
472
+ | <a id="orm-count-materialization"></a>[`orm-count-materialization`](docs/rules/performance/orm-count-materialization.md) | medium | A TypeORM, Sequelize, Mongoose, Knex or Kysely query loads rows only to count them. |
473
+ | <a id="orm-query-in-loop"></a>[`orm-query-in-loop`](docs/rules/performance/orm-query-in-loop.md) | high | A TypeORM, Sequelize, Mongoose, Knex or Kysely operation runs once per loop iteration. |
474
+ | <a id="prisma-distinct-in-memory"></a>[`prisma-distinct-in-memory`](docs/rules/performance/prisma-distinct-in-memory.md) | medium | Prisma findMany with distinct reads every matching row and de-duplicates in memory. |
475
+ | <a id="prisma-relation-count-in-list"></a>[`prisma-relation-count-in-list`](docs/rules/performance/prisma-relation-count-in-list.md) | medium | A paged Prisma findMany selects a relation _count computed over the whole related table. |
476
+ | <a id="typeorm-existence-materialization"></a>[`typeorm-existence-materialization`](docs/rules/performance/typeorm-existence-materialization.md) | medium | A TypeORM entity is loaded only to check whether it exists. |
477
+ | <a id="typeorm-load-then-save"></a>[`typeorm-load-then-save`](docs/rules/performance/typeorm-load-then-save.md) | high | A TypeORM entity is loaded only to change a few fields and save it back. |
478
+ | <a id="typeorm-transaction-in-loop"></a>[`typeorm-transaction-in-loop`](docs/rules/performance/typeorm-transaction-in-loop.md) | high | A loop calls a helper that starts one TypeORM transaction per item. |
479
+ | <a id="typeorm-wide-projection"></a>[`typeorm-wide-projection`](docs/rules/performance/typeorm-wide-projection.md) | low | A TypeORM DTO projection loads wide columns it never uses. |
479
480
 
480
481
  <!-- loadwise:rules:end -->
481
482
 
@@ -487,17 +488,17 @@ Put the policy in the `performance` section of `loadwise.config.json` beside the
487
488
 
488
489
  <!-- loadwise:rules:start checker=performance group=async-work-and-sorting -->
489
490
 
490
- | Rule | Impact | What it flags |
491
- | ------------------------------------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------- |
492
- | <a id="await-before-early-exit"></a>[`await-before-early-exit`](docs/rules/await-before-early-exit.md) | medium | An awaited read runs before a guard that returns or throws without using its result. |
493
- | <a id="count-then-page-serial"></a>[`count-then-page-serial`](docs/rules/count-then-page-serial.md) | low | A count and a page query with the same filter run one after the other. |
494
- | <a id="drizzle-last-insert-id"></a>[`drizzle-last-insert-id`](docs/rules/drizzle-last-insert-id.md) | medium | A MySQL insert is followed by an extra query for its generated ID. |
495
- | <a id="known-reads-awaited-serially"></a>[`known-reads-awaited-serially`](docs/rules/known-reads-awaited-serially.md) | medium | Two independent reads from a configured parallelReads group are awaited one after the other. |
496
- | <a id="numeric-sort-for-extreme"></a>[`numeric-sort-for-extreme`](docs/rules/numeric-sort-for-extreme.md) | low | A numeric sort is used only to read the smallest or largest value. |
497
- | <a id="prisma-count-for-existence"></a>[`prisma-count-for-existence`](docs/rules/prisma-count-for-existence.md) | medium | A Prisma query counts all matches only to check whether any row exists. |
498
- | <a id="promise-combinator-serial-await"></a>[`promise-combinator-serial-await`](docs/rules/promise-combinator-serial-await.md) | medium | Promise.all receives calls that were already awaited one by one. |
499
- | <a id="repeated-workbook-decode"></a>[`repeated-workbook-decode`](docs/rules/repeated-workbook-decode.md) | medium | A workflow decodes the same input with ExcelJS more than once. |
500
- | <a id="typeorm-unused-count"></a>[`typeorm-unused-count`](docs/rules/typeorm-unused-count.md) | medium | A TypeORM count-and-list query discards its total in immediate tuple destructuring. |
491
+ | Rule | Impact | What it flags |
492
+ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------- |
493
+ | <a id="await-before-early-exit"></a>[`await-before-early-exit`](docs/rules/performance/await-before-early-exit.md) | medium | An awaited read runs before a guard that returns or throws without using its result. |
494
+ | <a id="count-then-page-serial"></a>[`count-then-page-serial`](docs/rules/performance/count-then-page-serial.md) | low | A count and a page query with the same filter run one after the other. |
495
+ | <a id="drizzle-last-insert-id"></a>[`drizzle-last-insert-id`](docs/rules/performance/drizzle-last-insert-id.md) | medium | A MySQL insert is followed by an extra query for its generated ID. |
496
+ | <a id="known-reads-awaited-serially"></a>[`known-reads-awaited-serially`](docs/rules/performance/known-reads-awaited-serially.md) | medium | Two independent reads from a configured parallelReads group are awaited one after the other. |
497
+ | <a id="numeric-sort-for-extreme"></a>[`numeric-sort-for-extreme`](docs/rules/performance/numeric-sort-for-extreme.md) | low | A numeric sort is used only to read the smallest or largest value. |
498
+ | <a id="prisma-count-for-existence"></a>[`prisma-count-for-existence`](docs/rules/performance/prisma-count-for-existence.md) | medium | A Prisma query counts all matches only to check whether any row exists. |
499
+ | <a id="promise-combinator-serial-await"></a>[`promise-combinator-serial-await`](docs/rules/performance/promise-combinator-serial-await.md) | medium | Promise.all receives calls that were already awaited one by one. |
500
+ | <a id="repeated-workbook-decode"></a>[`repeated-workbook-decode`](docs/rules/performance/repeated-workbook-decode.md) | medium | A workflow decodes the same input with ExcelJS more than once. |
501
+ | <a id="typeorm-unused-count"></a>[`typeorm-unused-count`](docs/rules/performance/typeorm-unused-count.md) | medium | A TypeORM count-and-list query discards its total in immediate tuple destructuring. |
501
502
 
502
503
  <!-- loadwise:rules:end -->
503
504
 
@@ -507,14 +508,14 @@ The source checker reads the project's ORM schema (Prisma, Drizzle, TypeORM, Seq
507
508
 
508
509
  <!-- loadwise:rules:start checker=performance group=schema-aware-index-checks -->
509
510
 
510
- | Rule | Impact | What it flags |
511
- | ------------------------------------------------------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------- |
512
- | <a id="index-missing-filter"></a>[`index-missing-filter`](docs/rules/index-missing-filter.md) | high | A query filters on a column that no index leads with. |
513
- | <a id="index-missing-foreign-key"></a>[`index-missing-foreign-key`](docs/rules/index-missing-foreign-key.md) | high | A foreign key column in the schema has no index. |
514
- | <a id="index-missing-order"></a>[`index-missing-order`](docs/rules/index-missing-order.md) | medium | A query orders by columns that no index serves in that order. |
515
- | <a id="index-redundant-prefix"></a>[`index-redundant-prefix`](docs/rules/index-redundant-prefix.md) | low | An index repeats the leading columns of a longer index on the same table, adding write cost for no read benefit. |
516
- | <a id="index-unusable-expression"></a>[`index-unusable-expression`](docs/rules/index-unusable-expression.md) | high | A function or expression on an indexed column keeps the index from being used. |
517
- | <a id="index-unusable-pattern"></a>[`index-unusable-pattern`](docs/rules/index-unusable-pattern.md) | high | A predicate such as a leading-wildcard LIKE cannot use an ordinary index. |
511
+ | Rule | Impact | What it flags |
512
+ | ------------------------------------------------------------------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------- |
513
+ | <a id="index-missing-filter"></a>[`index-missing-filter`](docs/rules/performance/index-missing-filter.md) | high | A query filters on a column that no index leads with. |
514
+ | <a id="index-missing-foreign-key"></a>[`index-missing-foreign-key`](docs/rules/performance/index-missing-foreign-key.md) | high | A foreign key column in the schema has no index. |
515
+ | <a id="index-missing-order"></a>[`index-missing-order`](docs/rules/performance/index-missing-order.md) | medium | A query orders by columns that no index serves in that order. |
516
+ | <a id="index-redundant-prefix"></a>[`index-redundant-prefix`](docs/rules/performance/index-redundant-prefix.md) | low | An index repeats the leading columns of a longer index on the same table, adding write cost for no read benefit. |
517
+ | <a id="index-unusable-expression"></a>[`index-unusable-expression`](docs/rules/performance/index-unusable-expression.md) | high | A function or expression on an indexed column keeps the index from being used. |
518
+ | <a id="index-unusable-pattern"></a>[`index-unusable-pattern`](docs/rules/performance/index-unusable-pattern.md) | high | A predicate such as a leading-wildcard LIKE cannot use an ordinary index. |
518
519
 
519
520
  <!-- loadwise:rules:end -->
520
521
 
@@ -524,25 +525,25 @@ The source checker reads the project's ORM schema (Prisma, Drizzle, TypeORM, Seq
524
525
 
525
526
  <!-- loadwise:rules:start checker=performance group=polyglot-source-checks -->
526
527
 
527
- | Rule | Impact | What it flags |
528
- | --------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------- |
529
- | <a id="csharp-fixed-regex-in-loop"></a>[`csharp-fixed-regex-in-loop`](docs/rules/csharp-fixed-regex-in-loop.md) | medium | A C# Regex with a fixed pattern is constructed inside a loop. |
530
- | <a id="csharp-string-concat-in-loop"></a>[`csharp-string-concat-in-loop`](docs/rules/csharp-string-concat-in-loop.md) | medium | String concatenation in a C# loop allocates repeatedly; use StringBuilder. |
531
- | <a id="go-fixed-regexp-in-loop"></a>[`go-fixed-regexp-in-loop`](docs/rules/go-fixed-regexp-in-loop.md) | medium | A Go regexp with a fixed pattern is compiled inside a loop. |
532
- | <a id="go-sql-query-in-loop"></a>[`go-sql-query-in-loop`](docs/rules/go-sql-query-in-loop.md) | high | A Go database query executes inside a loop instead of batching. |
533
- | <a id="go-string-concat-in-loop"></a>[`go-string-concat-in-loop`](docs/rules/go-string-concat-in-loop.md) | medium | String concatenation in a Go loop allocates repeatedly; use strings.Builder. |
534
- | <a id="java-fixed-regex-in-loop"></a>[`java-fixed-regex-in-loop`](docs/rules/java-fixed-regex-in-loop.md) | medium | A Java Pattern with a fixed pattern is compiled inside a loop. |
535
- | <a id="java-jdbc-query-in-loop"></a>[`java-jdbc-query-in-loop`](docs/rules/java-jdbc-query-in-loop.md) | high | A JDBC query executes inside a Java loop instead of batching. |
536
- | <a id="java-string-concat-in-loop"></a>[`java-string-concat-in-loop`](docs/rules/java-string-concat-in-loop.md) | medium | String concatenation in a Java loop allocates repeatedly; use StringBuilder. |
537
- | <a id="python-blocking-sleep-in-async"></a>[`python-blocking-sleep-in-async`](docs/rules/python-blocking-sleep-in-async.md) | high | A blocking time.sleep call runs inside a Python async def function. |
538
- | <a id="python-copy-growing-list"></a>[`python-copy-growing-list`](docs/rules/python-copy-growing-list.md) | medium | A Python loop rebuilds a growing list with items = items + [value]. |
539
- | <a id="python-fixed-regex-in-loop"></a>[`python-fixed-regex-in-loop`](docs/rules/python-fixed-regex-in-loop.md) | low | A Python loop compiles a fixed pattern with re.compile on every iteration. |
540
- | <a id="python-n-plus-one-orm-loop"></a>[`python-n-plus-one-orm-loop`](docs/rules/python-n-plus-one-orm-loop.md) | high | An ORM query executes inside a Python loop instead of using eager loading or batching. |
541
- | <a id="python-sync-requests-in-async"></a>[`python-sync-requests-in-async`](docs/rules/python-sync-requests-in-async.md) | high | A blocking requests HTTP call runs inside a Python async def function. |
542
- | <a id="python-unbounded-comprehension"></a>[`python-unbounded-comprehension`](docs/rules/python-unbounded-comprehension.md) | medium | A Python list comprehension materializes an unbounded collection in memory. |
543
- | <a id="rust-clone-in-loop"></a>[`rust-clone-in-loop`](docs/rules/rust-clone-in-loop.md) | low | Cloning values inside a Rust loop adds avoidable heap allocations. |
544
- | <a id="rust-fixed-regex-in-loop"></a>[`rust-fixed-regex-in-loop`](docs/rules/rust-fixed-regex-in-loop.md) | medium | A Rust Regex with a fixed pattern is compiled inside a loop. |
545
- | <a id="rust-format-in-loop"></a>[`rust-format-in-loop`](docs/rules/rust-format-in-loop.md) | low | Calling format! inside a Rust loop allocates a new String on every iteration. |
528
+ | Rule | Impact | What it flags |
529
+ | --------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------- |
530
+ | <a id="csharp-fixed-regex-in-loop"></a>[`csharp-fixed-regex-in-loop`](docs/rules/performance/csharp-fixed-regex-in-loop.md) | medium | A C# Regex with a fixed pattern is constructed inside a loop. |
531
+ | <a id="csharp-string-concat-in-loop"></a>[`csharp-string-concat-in-loop`](docs/rules/performance/csharp-string-concat-in-loop.md) | medium | String concatenation in a C# loop allocates repeatedly; use StringBuilder. |
532
+ | <a id="go-fixed-regexp-in-loop"></a>[`go-fixed-regexp-in-loop`](docs/rules/performance/go-fixed-regexp-in-loop.md) | medium | A Go regexp with a fixed pattern is compiled inside a loop. |
533
+ | <a id="go-sql-query-in-loop"></a>[`go-sql-query-in-loop`](docs/rules/performance/go-sql-query-in-loop.md) | high | A Go database query executes inside a loop instead of batching. |
534
+ | <a id="go-string-concat-in-loop"></a>[`go-string-concat-in-loop`](docs/rules/performance/go-string-concat-in-loop.md) | medium | String concatenation in a Go loop allocates repeatedly; use strings.Builder. |
535
+ | <a id="java-fixed-regex-in-loop"></a>[`java-fixed-regex-in-loop`](docs/rules/performance/java-fixed-regex-in-loop.md) | medium | A Java Pattern with a fixed pattern is compiled inside a loop. |
536
+ | <a id="java-jdbc-query-in-loop"></a>[`java-jdbc-query-in-loop`](docs/rules/performance/java-jdbc-query-in-loop.md) | high | A JDBC query executes inside a Java loop instead of batching. |
537
+ | <a id="java-string-concat-in-loop"></a>[`java-string-concat-in-loop`](docs/rules/performance/java-string-concat-in-loop.md) | medium | String concatenation in a Java loop allocates repeatedly; use StringBuilder. |
538
+ | <a id="python-blocking-sleep-in-async"></a>[`python-blocking-sleep-in-async`](docs/rules/performance/python-blocking-sleep-in-async.md) | high | A blocking time.sleep call runs inside a Python async def function. |
539
+ | <a id="python-copy-growing-list"></a>[`python-copy-growing-list`](docs/rules/performance/python-copy-growing-list.md) | medium | A Python loop rebuilds a growing list with items = items + [value]. |
540
+ | <a id="python-fixed-regex-in-loop"></a>[`python-fixed-regex-in-loop`](docs/rules/performance/python-fixed-regex-in-loop.md) | low | A Python loop compiles a fixed pattern with re.compile on every iteration. |
541
+ | <a id="python-n-plus-one-orm-loop"></a>[`python-n-plus-one-orm-loop`](docs/rules/performance/python-n-plus-one-orm-loop.md) | high | An ORM query executes inside a Python loop instead of using eager loading or batching. |
542
+ | <a id="python-sync-requests-in-async"></a>[`python-sync-requests-in-async`](docs/rules/performance/python-sync-requests-in-async.md) | high | A blocking requests HTTP call runs inside a Python async def function. |
543
+ | <a id="python-unbounded-comprehension"></a>[`python-unbounded-comprehension`](docs/rules/performance/python-unbounded-comprehension.md) | medium | A Python list comprehension materializes an unbounded collection in memory. |
544
+ | <a id="rust-clone-in-loop"></a>[`rust-clone-in-loop`](docs/rules/performance/rust-clone-in-loop.md) | low | Cloning values inside a Rust loop adds avoidable heap allocations. |
545
+ | <a id="rust-fixed-regex-in-loop"></a>[`rust-fixed-regex-in-loop`](docs/rules/performance/rust-fixed-regex-in-loop.md) | medium | A Rust Regex with a fixed pattern is compiled inside a loop. |
546
+ | <a id="rust-format-in-loop"></a>[`rust-format-in-loop`](docs/rules/performance/rust-format-in-loop.md) | low | Calling format! inside a Rust loop allocates a new String on every iteration. |
546
547
 
547
548
  <!-- loadwise:rules:end -->
548
549
 
@@ -552,12 +553,12 @@ The source checker reads the project's ORM schema (Prisma, Drizzle, TypeORM, Seq
552
553
 
553
554
  <!-- loadwise:rules:start checker=performance group=trace-checks-in-other-languages-and-databases -->
554
555
 
555
- | Rule | Impact | What it flags |
556
- | ------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------- |
557
- | <a id="duplicate-key-read"></a>[`duplicate-key-read`](docs/rules/duplicate-key-read.md) | medium | A trace repeats the same key or row read under one parent span. |
558
- | <a id="redis-keys-scan"></a>[`redis-keys-scan`](docs/rules/redis-keys-scan.md) | high | A trace shows a Redis KEYS command scanning the keyspace. |
559
- | <a id="redis-repeated-read"></a>[`redis-repeated-read`](docs/rules/redis-repeated-read.md) | medium | A trace shows repeated sibling Redis GET or HGET calls. |
560
- | <a id="repeated-db-span"></a>[`repeated-db-span`](docs/rules/repeated-db-span.md) | high | A trace shows many similar sibling database calls under one parent. |
556
+ | Rule | Impact | What it flags |
557
+ | ------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------- |
558
+ | <a id="duplicate-key-read"></a>[`duplicate-key-read`](docs/rules/performance/duplicate-key-read.md) | medium | A trace repeats the same key or row read under one parent span. |
559
+ | <a id="redis-keys-scan"></a>[`redis-keys-scan`](docs/rules/performance/redis-keys-scan.md) | high | A trace shows a Redis KEYS command scanning the keyspace. |
560
+ | <a id="redis-repeated-read"></a>[`redis-repeated-read`](docs/rules/performance/redis-repeated-read.md) | medium | A trace shows repeated sibling Redis GET or HGET calls. |
561
+ | <a id="repeated-db-span"></a>[`repeated-db-span`](docs/rules/performance/repeated-db-span.md) | high | A trace shows many similar sibling database calls under one parent. |
561
562
 
562
563
  <!-- loadwise:rules:end -->
563
564
 
@@ -567,14 +568,14 @@ The source checker reads the project's ORM schema (Prisma, Drizzle, TypeORM, Seq
567
568
 
568
569
  <!-- loadwise:rules:start checker=performance group=executed-query-plans -->
569
570
 
570
- | Rule | Impact | What it flags |
571
- | ------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------- |
572
- | <a id="mongo-collection-scan"></a>[`mongo-collection-scan`](docs/rules/mongo-collection-scan.md) | high | A MongoDB plan scans many documents for each one it returns. |
573
- | <a id="mongo-deep-skip"></a>[`mongo-deep-skip`](docs/rules/mongo-deep-skip.md) | high | A MongoDB query skips past many documents to return a page. |
574
- | <a id="mongo-disk-sort"></a>[`mongo-disk-sort`](docs/rules/mongo-disk-sort.md) | medium | A MongoDB sort spilled to disk. |
575
- | <a id="pg-deep-offset"></a>[`pg-deep-offset`](docs/rules/pg-deep-offset.md) | high | A PostgreSQL plan walks past many rows with OFFSET to return a page. |
576
- | <a id="pg-disk-sort"></a>[`pg-disk-sort`](docs/rules/pg-disk-sort.md) | medium | A PostgreSQL sort spilled to disk. |
577
- | <a id="pg-sequential-scan"></a>[`pg-sequential-scan`](docs/rules/pg-sequential-scan.md) | high | A PostgreSQL plan scans many rows for each one it returns. |
571
+ | Rule | Impact | What it flags |
572
+ | ------------------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------- |
573
+ | <a id="mongo-collection-scan"></a>[`mongo-collection-scan`](docs/rules/performance/mongo-collection-scan.md) | high | A MongoDB plan scans many documents for each one it returns. |
574
+ | <a id="mongo-deep-skip"></a>[`mongo-deep-skip`](docs/rules/performance/mongo-deep-skip.md) | high | A MongoDB query skips past many documents to return a page. |
575
+ | <a id="mongo-disk-sort"></a>[`mongo-disk-sort`](docs/rules/performance/mongo-disk-sort.md) | medium | A MongoDB sort spilled to disk. |
576
+ | <a id="pg-deep-offset"></a>[`pg-deep-offset`](docs/rules/performance/pg-deep-offset.md) | high | A PostgreSQL plan walks past many rows with OFFSET to return a page. |
577
+ | <a id="pg-disk-sort"></a>[`pg-disk-sort`](docs/rules/performance/pg-disk-sort.md) | medium | A PostgreSQL sort spilled to disk. |
578
+ | <a id="pg-sequential-scan"></a>[`pg-sequential-scan`](docs/rules/performance/pg-sequential-scan.md) | high | A PostgreSQL plan scans many rows for each one it returns. |
578
579
 
579
580
  <!-- loadwise:rules:end -->
580
581
 
@@ -603,15 +604,15 @@ npx loadwise perf --schema snapshot.json
603
604
 
604
605
  <!-- loadwise:rules:start checker=performance group=database-inspection-optional -->
605
606
 
606
- | Rule | Impact | What it flags |
607
- | --------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
608
- | <a id="db-duplicate-index"></a>[`db-duplicate-index`](docs/rules/db-duplicate-index.md) | low | A database index is covered by another index on the same table. |
609
- | <a id="db-missing-index"></a>[`db-missing-index`](docs/rules/db-missing-index.md) | high | A query plan scans a table that a suggested index would let it seek. |
610
- | <a id="db-seq-scan-heavy-table"></a>[`db-seq-scan-heavy-table`](docs/rules/db-seq-scan-heavy-table.md) | high | A large table is read by many sequential scans on the live database. |
611
- | <a id="db-slow-query-plan"></a>[`db-slow-query-plan`](docs/rules/db-slow-query-plan.md) | high | One of the slowest statements reads a table with a full table scan. |
612
- | <a id="db-unindexed-foreign-key"></a>[`db-unindexed-foreign-key`](docs/rules/db-unindexed-foreign-key.md) | high | A foreign key on the live database has no index that leads with its columns. |
613
- | <a id="db-unused-index"></a>[`db-unused-index`](docs/rules/db-unused-index.md) | low | A database index has not been scanned since statistics were last reset. |
614
- | <a id="mongo-collection-scan-observed"></a>[`mongo-collection-scan-observed`](docs/rules/mongo-collection-scan-observed.md) | high | Profiled MongoDB operations scanned a whole collection. |
607
+ | Rule | Impact | What it flags |
608
+ | --------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
609
+ | <a id="db-duplicate-index"></a>[`db-duplicate-index`](docs/rules/performance/db-duplicate-index.md) | low | A database index is covered by another index on the same table. |
610
+ | <a id="db-missing-index"></a>[`db-missing-index`](docs/rules/performance/db-missing-index.md) | high | A query plan scans a table that a suggested index would let it seek. |
611
+ | <a id="db-seq-scan-heavy-table"></a>[`db-seq-scan-heavy-table`](docs/rules/performance/db-seq-scan-heavy-table.md) | high | A large table is read by many sequential scans on the live database. |
612
+ | <a id="db-slow-query-plan"></a>[`db-slow-query-plan`](docs/rules/performance/db-slow-query-plan.md) | high | One of the slowest statements reads a table with a full table scan. |
613
+ | <a id="db-unindexed-foreign-key"></a>[`db-unindexed-foreign-key`](docs/rules/performance/db-unindexed-foreign-key.md) | high | A foreign key on the live database has no index that leads with its columns. |
614
+ | <a id="db-unused-index"></a>[`db-unused-index`](docs/rules/performance/db-unused-index.md) | low | A database index has not been scanned since statistics were last reset. |
615
+ | <a id="mongo-collection-scan-observed"></a>[`mongo-collection-scan-observed`](docs/rules/performance/mongo-collection-scan-observed.md) | high | Profiled MongoDB operations scanned a whole collection. |
615
616
 
616
617
  <!-- loadwise:rules:end -->
617
618
 
@@ -629,67 +630,70 @@ Some rules moved here from the performance and maintainability checkers and kept
629
630
 
630
631
  <!-- loadwise:rules:start checker=reliability group=source-rules -->
631
632
 
632
- | Rule | Impact | What it flags |
633
- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
634
- | <a id="assignment-in-condition"></a>[`assignment-in-condition`](docs/rules/assignment-in-condition.md) | high | A condition assigns with = where a comparison was probably meant. |
635
- | <a id="async-callback-unhandled-rejection"></a>[`async-callback-unhandled-rejection`](docs/rules/async-callback-unhandled-rejection.md) | high | An async callback given to an event emitter, timer or scheduler has no error handling, so a rejection is unhandled. |
636
- | <a id="async-route-unhandled-rejection"></a>[`async-route-unhandled-rejection`](docs/rules/async-route-unhandled-rejection.md) | high | An Express 4 async route handler has no error handling, so a rejection never reaches the error middleware. |
637
- | <a id="browser-not-closed"></a>[`browser-not-closed`](docs/rules/browser-not-closed.md) | high | A Playwright or Puppeteer browser is not closed in a finally block, so an error leaves the process running. |
638
- | <a id="check-then-update-race"></a>[`check-then-update-race`](docs/rules/check-then-update-race.md) | high | A Mongoose or Sequelize document's numeric field is read, changed in JavaScript and saved without a transaction, losing concurrent updates. |
639
- | <a id="child-process-without-error-listener"></a>[`child-process-without-error-listener`](docs/rules/child-process-without-error-listener.md) | high | A spawned child process has no 'error' listener, so a failed spawn crashes the parent process. |
640
- | <a id="csharp-async-void"></a>[`csharp-async-void`](docs/rules/csharp-async-void.md) | high | An async void method cannot be awaited and can crash the process on unhandled exceptions. |
641
- | <a id="csharp-disposable-without-using"></a>[`csharp-disposable-without-using`](docs/rules/csharp-disposable-without-using.md) | medium | A C# stream, connection or other IDisposable is created without using, so an exception leaks it. |
642
- | <a id="discarded-error-result"></a>[`discarded-error-result`](docs/rules/discarded-error-result.md) | high | A call discards a typed Either or Result that can carry a failure as a value. |
643
- | <a id="drizzle-unfiltered-write"></a>[`drizzle-unfiltered-write`](docs/rules/drizzle-unfiltered-write.md) | critical | A Drizzle update or delete executes without an effective where clause. |
644
- | <a id="drizzle-write-preflight"></a>[`drizzle-write-preflight`](docs/rules/drizzle-write-preflight.md) | medium | A separate existence check before a Drizzle write can race with another request. |
645
- | <a id="error-logged-without-stack"></a>[`error-logged-without-stack`](docs/rules/error-logged-without-stack.md) | low | A catch block logs only error.message and carries on, so the stack trace is lost. |
646
- | <a id="error-rethrown-without-cause"></a>[`error-rethrown-without-cause`](docs/rules/error-rethrown-without-cause.md) | low | A catch block throws a new error without the caught one, so the original message and stack are lost. |
647
- | <a id="file-handle-not-closed"></a>[`file-handle-not-closed`](docs/rules/file-handle-not-closed.md) | high | A FileHandle from fs/promises open() is not closed on every path, leaking a file descriptor. |
648
- | <a id="find-then-create-race"></a>[`find-then-create-race`](docs/rules/find-then-create-race.md) | high | A lookup by key is followed by an insert with that key, with no unique constraint to stop duplicates. |
649
- | <a id="floating-promise"></a>[`floating-promise`](docs/rules/floating-promise.md) | high | A promise-returning call is neither awaited, returned nor handled, so its failure goes unseen. |
650
- | <a id="go-defer-before-error-check"></a>[`go-defer-before-error-check`](docs/rules/go-defer-before-error-check.md) | high | A Go defer closes a resource before its error is checked, so a failed open dereferences nil. |
651
- | <a id="go-error-discarded"></a>[`go-error-discarded`](docs/rules/go-error-discarded.md) | high | A Go error result is assigned to the blank identifier and never checked. |
652
- | <a id="http-call-without-timeout"></a>[`http-call-without-timeout`](docs/rules/http-call-without-timeout.md) | high | A fetch or axios call has no timeout or abort signal. |
653
- | <a id="interval-not-cleared"></a>[`interval-not-cleared`](docs/rules/interval-not-cleared.md) | medium | A setInterval handle is discarded or never cleared, so the timer outlives its owner. |
654
- | <a id="invalid-typeof-comparison"></a>[`invalid-typeof-comparison`](docs/rules/invalid-typeof-comparison.md) | high | A typeof result is compared to a string typeof never returns, so the check never matches. |
655
- | <a id="java-resource-without-try"></a>[`java-resource-without-try`](docs/rules/java-resource-without-try.md) | high | A Java stream, reader or connection is opened outside try-with-resources, so an exception leaks it. |
656
- | <a id="json-parse-unguarded"></a>[`json-parse-unguarded`](docs/rules/json-parse-unguarded.md) | medium | JSON.parse runs on outside input with no try/catch, so malformed input throws where it is not handled. |
657
- | <a id="loop-index-past-length"></a>[`loop-index-past-length`](docs/rules/loop-index-past-length.md) | high | A loop runs its index up to and including length, so the last pass reads past the end. |
658
- | <a id="mongoose-aggregate-uncast-id"></a>[`mongoose-aggregate-uncast-id`](docs/rules/mongoose-aggregate-uncast-id.md) | high | A Mongoose aggregate $match compares _id to an uncast string instead of an ObjectId. |
659
- | <a id="nan-comparison"></a>[`nan-comparison`](docs/rules/nan-comparison.md) | high | A value is compared to NaN with an equality operator, which is never true. |
660
- | <a id="next-server-env-in-client"></a>[`next-server-env-in-client`](docs/rules/next-server-env-in-client.md) | high | A 'use client' file reads a process.env variable without the NEXT_PUBLIC_ prefix, so it is unavailable in the browser by default. |
661
- | <a id="payment-missing-idempotency-key"></a>[`payment-missing-idempotency-key`](docs/rules/payment-missing-idempotency-key.md) | high | A Stripe call that moves money has no idempotency key, so a retry can charge or pay out twice. |
662
- | <a id="pg-transaction-on-pool"></a>[`pg-transaction-on-pool`](docs/rules/pg-transaction-on-pool.md) | critical | A transaction statement is sent to a pool, so its statements can run on different connections. |
663
- | <a id="pool-without-connection-timeout"></a>[`pool-without-connection-timeout`](docs/rules/pool-without-connection-timeout.md) | medium | A pg Pool or Client sets no connectionTimeoutMillis, so its default of 0 waits for a connection forever. |
664
- | <a id="prisma-dependent-writes"></a>[`prisma-dependent-writes`](docs/rules/prisma-dependent-writes.md) | high | Adjacent Prisma creates pass a value from the first record into the next write. |
665
- | <a id="prisma-read-modify-write"></a>[`prisma-read-modify-write`](docs/rules/prisma-read-modify-write.md) | critical | A Prisma read feeds a numeric update of the same row, losing concurrent updates. |
666
- | <a id="prisma-transaction-client-escape"></a>[`prisma-transaction-client-escape`](docs/rules/prisma-transaction-client-escape.md) | critical | A Prisma call inside an interactive transaction uses the outer client instead of the transaction client. |
667
- | <a id="promise-return-escapes-catch"></a>[`promise-return-escapes-catch`](docs/rules/promise-return-escapes-catch.md) | high | Returning a promise directly from a protected try block can bypass its catch on rejection. |
668
- | <a id="python-bare-except"></a>[`python-bare-except`](docs/rules/python-bare-except.md) | medium | A bare except also catches SystemExit and KeyboardInterrupt, hiding shutdowns and bugs. |
669
- | <a id="python-swallowed-exception"></a>[`python-swallowed-exception`](docs/rules/python-swallowed-exception.md) | medium | A Python except block only passes, so the failure is dropped silently. |
670
- | <a id="query-runner-not-released"></a>[`query-runner-not-released`](docs/rules/query-runner-not-released.md) | critical | A TypeORM QueryRunner is not released in a finally block, so an error leaks its pooled connection. |
671
- | <a id="react-async-effect-callback"></a>[`react-async-effect-callback`](docs/rules/react-async-effect-callback.md) | medium | An async function is passed to useEffect, so its promise is treated as the cleanup function and its errors go unhandled. |
672
- | <a id="react-effect-sets-state-every-render"></a>[`react-effect-sets-state-every-render`](docs/rules/react-effect-sets-state-every-render.md) | high | An effect with no dependency array sets state to a new value on every run, so the component re-renders forever. |
673
- | <a id="react-list-missing-key"></a>[`react-list-missing-key`](docs/rules/react-list-missing-key.md) | medium | An element or fragment returned from .map() has no key prop, so React cannot track items when the list changes. |
674
- | <a id="react-state-mutated-in-place"></a>[`react-state-mutated-in-place`](docs/rules/react-state-mutated-in-place.md) | high | A useState value is mutated in place and passed to its own setter, so React sees the same reference and skips the re-render. |
675
- | <a id="redis-incr-then-expire"></a>[`redis-incr-then-expire`](docs/rules/redis-incr-then-expire.md) | medium | A Redis counter increment and its expire on the same key are two round trips and not atomic. |
676
- | <a id="request-number-unvalidated"></a>[`request-number-unvalidated`](docs/rules/request-number-unvalidated.md) | medium | A number parsed from request input reaches a query or calculation with no NaN or range check. |
677
- | <a id="retry-without-backoff"></a>[`retry-without-backoff`](docs/rules/retry-without-backoff.md) | medium | A retry loop calls the network again with no delay between attempts. |
678
- | <a id="return-in-finally"></a>[`return-in-finally`](docs/rules/return-in-finally.md) | high | Returning from finally can replace a pending return value or suppress a thrown error. |
679
- | <a id="return-newline"></a>[`return-newline`](docs/rules/return-newline.md) | high | A line break after return ends the statement before the apparent return value. |
680
- | <a id="rust-unwrap-in-production"></a>[`rust-unwrap-in-production`](docs/rules/rust-unwrap-in-production.md) | medium | Rust code outside tests calls unwrap(), turning an Err or None into a panic. |
681
- | <a id="sql-insert-truncated-at-semicolon"></a>[`sql-insert-truncated-at-semicolon`](docs/rules/sql-insert-truncated-at-semicolon.md) | high | A SQL dump parser ends INSERT values at a semicolon inside quoted text. |
682
- | <a id="stream-pipe-unhandled-error"></a>[`stream-pipe-unhandled-error`](docs/rules/stream-pipe-unhandled-error.md) | high | A stream is piped with .pipe() and no error handling, so a stream error can crash the process or leak the file. |
683
- | <a id="swallowed-error"></a>[`swallowed-error`](docs/rules/swallowed-error.md) | medium | A catch block drops the error and the code after the try carries on as if it succeeded. |
684
- | <a id="switch-not-exhaustive"></a>[`switch-not-exhaustive`](docs/rules/switch-not-exhaustive.md) | medium | A switch over a union or enum has no default and misses members, so the missing value leaves the result undefined. |
685
- | <a id="throw-non-error"></a>[`throw-non-error`](docs/rules/throw-non-error.md) | medium | A string, number or object literal is thrown instead of an Error, so there is no stack trace. |
686
- | <a id="typeorm-transaction-client-escape"></a>[`typeorm-transaction-client-escape`](docs/rules/typeorm-transaction-client-escape.md) | critical | A write inside a TypeORM transaction goes through a repository not bound to it. |
687
- | <a id="unbounded-promise-all"></a>[`unbounded-promise-all`](docs/rules/unbounded-promise-all.md) | high | Promise.all runs over an unbounded collection without a concurrency limit, risking memory spikes or downstream saturation. |
688
- | <a id="uncaught-exception-continues"></a>[`uncaught-exception-continues`](docs/rules/uncaught-exception-continues.md) | high | An uncaughtException handler neither exits nor rethrows, so the process keeps running in an undefined state. |
689
- | <a id="unguarded-boundary-access"></a>[`unguarded-boundary-access`](docs/rules/unguarded-boundary-access.md) | medium | A nested property is read from outside input or a lookup that can be missing, so absent data throws a TypeError. |
690
- | <a id="unreachable-code"></a>[`unreachable-code`](docs/rules/unreachable-code.md) | medium | Statements follow a return, throw, break or continue in the same block and never run. |
691
- | <a id="upload-without-size-limit"></a>[`upload-without-size-limit`](docs/rules/upload-without-size-limit.md) | high | A multer or Nest upload interceptor has no file size limit. |
692
- | <a id="webhook-missing-idempotency-check"></a>[`webhook-missing-idempotency-check`](docs/rules/webhook-missing-idempotency-check.md) | medium | A webhook route inserts rows without first checking whether the event was already processed. |
633
+ | Rule | Impact | What it flags |
634
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
635
+ | <a id="assignment-in-condition"></a>[`assignment-in-condition`](docs/rules/reliability/assignment-in-condition.md) | high | A condition assigns with = where a comparison was probably meant. |
636
+ | <a id="async-callback-unhandled-rejection"></a>[`async-callback-unhandled-rejection`](docs/rules/reliability/async-callback-unhandled-rejection.md) | high | An async callback given to an event emitter, timer or scheduler has no error handling, so a rejection is unhandled. |
637
+ | <a id="async-route-unhandled-rejection"></a>[`async-route-unhandled-rejection`](docs/rules/reliability/async-route-unhandled-rejection.md) | high | An Express 4 async route handler has no error handling, so a rejection never reaches the error middleware. |
638
+ | <a id="browser-not-closed"></a>[`browser-not-closed`](docs/rules/reliability/browser-not-closed.md) | high | A Playwright or Puppeteer browser is not closed in a finally block, so an error leaves the process running. |
639
+ | <a id="check-then-update-race"></a>[`check-then-update-race`](docs/rules/reliability/check-then-update-race.md) | high | A Mongoose or Sequelize document's numeric field is read, changed in JavaScript and saved without a transaction, losing concurrent updates. |
640
+ | <a id="child-process-without-error-listener"></a>[`child-process-without-error-listener`](docs/rules/reliability/child-process-without-error-listener.md) | high | A spawned child process has no 'error' listener, so a failed spawn crashes the parent process. |
641
+ | <a id="crlf-unsafe-line-split"></a>[`crlf-unsafe-line-split`](docs/rules/reliability/crlf-unsafe-line-split.md) | medium | Splitting file text on a bare newline leaves carriage returns on CRLF lines and can change exact comparisons. |
642
+ | <a id="csharp-async-void"></a>[`csharp-async-void`](docs/rules/reliability/csharp-async-void.md) | high | An async void method cannot be awaited and can crash the process on unhandled exceptions. |
643
+ | <a id="csharp-disposable-without-using"></a>[`csharp-disposable-without-using`](docs/rules/reliability/csharp-disposable-without-using.md) | medium | A C# stream, connection or other IDisposable is created without using, so an exception leaks it. |
644
+ | <a id="discarded-error-result"></a>[`discarded-error-result`](docs/rules/reliability/discarded-error-result.md) | high | A call discards a typed Either or Result that can carry a failure as a value. |
645
+ | <a id="drizzle-unfiltered-write"></a>[`drizzle-unfiltered-write`](docs/rules/reliability/drizzle-unfiltered-write.md) | critical | A Drizzle update or delete executes without an effective where clause. |
646
+ | <a id="drizzle-write-preflight"></a>[`drizzle-write-preflight`](docs/rules/reliability/drizzle-write-preflight.md) | medium | A separate existence check before a Drizzle write can race with another request. |
647
+ | <a id="error-logged-without-stack"></a>[`error-logged-without-stack`](docs/rules/reliability/error-logged-without-stack.md) | low | A catch block logs only error.message and carries on, so the stack trace is lost. |
648
+ | <a id="error-rethrown-without-cause"></a>[`error-rethrown-without-cause`](docs/rules/reliability/error-rethrown-without-cause.md) | low | A catch block throws a new error without the caught one, so the original message and stack are lost. |
649
+ | <a id="file-handle-not-closed"></a>[`file-handle-not-closed`](docs/rules/reliability/file-handle-not-closed.md) | high | A FileHandle from fs/promises open() is not closed on every path, leaking a file descriptor. |
650
+ | <a id="find-then-create-race"></a>[`find-then-create-race`](docs/rules/reliability/find-then-create-race.md) | high | A lookup by key is followed by an insert with that key, with no unique constraint to stop duplicates. |
651
+ | <a id="floating-promise"></a>[`floating-promise`](docs/rules/reliability/floating-promise.md) | high | A promise-returning call is neither awaited, returned nor handled, so its failure goes unseen. |
652
+ | <a id="go-defer-before-error-check"></a>[`go-defer-before-error-check`](docs/rules/reliability/go-defer-before-error-check.md) | high | A Go defer closes a resource before its error is checked, so a failed open dereferences nil. |
653
+ | <a id="go-error-discarded"></a>[`go-error-discarded`](docs/rules/reliability/go-error-discarded.md) | high | A Go error result is assigned to the blank identifier and never checked. |
654
+ | <a id="http-call-without-timeout"></a>[`http-call-without-timeout`](docs/rules/reliability/http-call-without-timeout.md) | high | A fetch or axios call has no timeout or abort signal. |
655
+ | <a id="interval-not-cleared"></a>[`interval-not-cleared`](docs/rules/reliability/interval-not-cleared.md) | medium | A setInterval handle is discarded or never cleared, so the timer outlives its owner. |
656
+ | <a id="invalid-typeof-comparison"></a>[`invalid-typeof-comparison`](docs/rules/reliability/invalid-typeof-comparison.md) | high | A typeof result is compared to a string typeof never returns, so the check never matches. |
657
+ | <a id="java-resource-without-try"></a>[`java-resource-without-try`](docs/rules/reliability/java-resource-without-try.md) | high | A Java stream, reader or connection is opened outside try-with-resources, so an exception leaks it. |
658
+ | <a id="json-parse-unguarded"></a>[`json-parse-unguarded`](docs/rules/reliability/json-parse-unguarded.md) | medium | JSON.parse runs on outside input with no try/catch, so malformed input throws where it is not handled. |
659
+ | <a id="loop-index-past-length"></a>[`loop-index-past-length`](docs/rules/reliability/loop-index-past-length.md) | high | A loop runs its index up to and including length, so the last pass reads past the end. |
660
+ | <a id="mongoose-aggregate-uncast-id"></a>[`mongoose-aggregate-uncast-id`](docs/rules/reliability/mongoose-aggregate-uncast-id.md) | high | A Mongoose aggregate $match compares _id to an uncast string instead of an ObjectId. |
661
+ | <a id="nan-comparison"></a>[`nan-comparison`](docs/rules/reliability/nan-comparison.md) | high | A value is compared to NaN with an equality operator, which is never true. |
662
+ | <a id="next-server-env-in-client"></a>[`next-server-env-in-client`](docs/rules/reliability/next-server-env-in-client.md) | high | A 'use client' file reads a process.env variable without the NEXT_PUBLIC_ prefix, so it is unavailable in the browser by default. |
663
+ | <a id="parse-failure-resets-file"></a>[`parse-failure-resets-file`](docs/rules/reliability/parse-failure-resets-file.md) | high | A write after a read or parse failure can replace unreadable contents at the same path. |
664
+ | <a id="payment-missing-idempotency-key"></a>[`payment-missing-idempotency-key`](docs/rules/reliability/payment-missing-idempotency-key.md) | high | A Stripe call that moves money has no idempotency key, so a retry can charge or pay out twice. |
665
+ | <a id="pg-transaction-on-pool"></a>[`pg-transaction-on-pool`](docs/rules/reliability/pg-transaction-on-pool.md) | critical | A transaction statement is sent to a pool, so its statements can run on different connections. |
666
+ | <a id="pool-without-connection-timeout"></a>[`pool-without-connection-timeout`](docs/rules/reliability/pool-without-connection-timeout.md) | medium | A pg Pool or Client sets no connectionTimeoutMillis, so its default of 0 waits for a connection forever. |
667
+ | <a id="prisma-dependent-writes"></a>[`prisma-dependent-writes`](docs/rules/reliability/prisma-dependent-writes.md) | high | Adjacent Prisma creates pass a value from the first record into the next write. |
668
+ | <a id="prisma-read-modify-write"></a>[`prisma-read-modify-write`](docs/rules/reliability/prisma-read-modify-write.md) | critical | A Prisma read feeds a numeric update of the same row, losing concurrent updates. |
669
+ | <a id="prisma-transaction-client-escape"></a>[`prisma-transaction-client-escape`](docs/rules/reliability/prisma-transaction-client-escape.md) | critical | A Prisma call inside an interactive transaction uses the outer client instead of the transaction client. |
670
+ | <a id="promise-return-escapes-catch"></a>[`promise-return-escapes-catch`](docs/rules/reliability/promise-return-escapes-catch.md) | high | Returning a promise directly from a protected try block can bypass its catch on rejection. |
671
+ | <a id="python-bare-except"></a>[`python-bare-except`](docs/rules/reliability/python-bare-except.md) | medium | A bare except also catches SystemExit and KeyboardInterrupt, hiding shutdowns and bugs. |
672
+ | <a id="python-swallowed-exception"></a>[`python-swallowed-exception`](docs/rules/reliability/python-swallowed-exception.md) | medium | A Python except block only passes, so the failure is dropped silently. |
673
+ | <a id="query-runner-not-released"></a>[`query-runner-not-released`](docs/rules/reliability/query-runner-not-released.md) | critical | A TypeORM QueryRunner is not released in a finally block, so an error leaks its pooled connection. |
674
+ | <a id="react-async-effect-callback"></a>[`react-async-effect-callback`](docs/rules/reliability/react-async-effect-callback.md) | medium | An async function is passed to useEffect, so its promise is treated as the cleanup function and its errors go unhandled. |
675
+ | <a id="react-effect-sets-state-every-render"></a>[`react-effect-sets-state-every-render`](docs/rules/reliability/react-effect-sets-state-every-render.md) | high | An effect with no dependency array sets state to a new value on every run, so the component re-renders forever. |
676
+ | <a id="react-list-missing-key"></a>[`react-list-missing-key`](docs/rules/reliability/react-list-missing-key.md) | medium | An element or fragment returned from .map() has no key prop, so React cannot track items when the list changes. |
677
+ | <a id="react-state-mutated-in-place"></a>[`react-state-mutated-in-place`](docs/rules/reliability/react-state-mutated-in-place.md) | high | A useState value is mutated in place and passed to its own setter, so React sees the same reference and skips the re-render. |
678
+ | <a id="redis-incr-then-expire"></a>[`redis-incr-then-expire`](docs/rules/reliability/redis-incr-then-expire.md) | medium | A Redis counter increment and its expire on the same key are two round trips and not atomic. |
679
+ | <a id="request-number-unvalidated"></a>[`request-number-unvalidated`](docs/rules/reliability/request-number-unvalidated.md) | medium | A number parsed from request input reaches a query or calculation with no NaN or range check. |
680
+ | <a id="retry-without-backoff"></a>[`retry-without-backoff`](docs/rules/reliability/retry-without-backoff.md) | medium | A retry loop calls the network again with no delay between attempts. |
681
+ | <a id="return-in-finally"></a>[`return-in-finally`](docs/rules/reliability/return-in-finally.md) | high | Returning from finally can replace a pending return value or suppress a thrown error. |
682
+ | <a id="return-newline"></a>[`return-newline`](docs/rules/reliability/return-newline.md) | high | A line break after return ends the statement before the apparent return value. |
683
+ | <a id="rust-unwrap-in-production"></a>[`rust-unwrap-in-production`](docs/rules/reliability/rust-unwrap-in-production.md) | medium | Rust code outside tests calls unwrap(), turning an Err or None into a panic. |
684
+ | <a id="sql-insert-truncated-at-semicolon"></a>[`sql-insert-truncated-at-semicolon`](docs/rules/reliability/sql-insert-truncated-at-semicolon.md) | high | A SQL dump parser ends INSERT values at a semicolon inside quoted text. |
685
+ | <a id="stream-pipe-unhandled-error"></a>[`stream-pipe-unhandled-error`](docs/rules/reliability/stream-pipe-unhandled-error.md) | high | A stream is piped with .pipe() and no error handling, so a stream error can crash the process or leak the file. |
686
+ | <a id="swallowed-error"></a>[`swallowed-error`](docs/rules/reliability/swallowed-error.md) | medium | A catch block drops the error and the code after the try carries on as if it succeeded. |
687
+ | <a id="switch-not-exhaustive"></a>[`switch-not-exhaustive`](docs/rules/reliability/switch-not-exhaustive.md) | medium | A switch over a union or enum has no default and misses members, so the missing value leaves the result undefined. |
688
+ | <a id="test-cleanup-after-await"></a>[`test-cleanup-after-await`](docs/rules/reliability/test-cleanup-after-await.md) | medium | A test waits before cleaning up a local resource, so a rejection can leave it running. |
689
+ | <a id="throw-non-error"></a>[`throw-non-error`](docs/rules/reliability/throw-non-error.md) | medium | A string, number or object literal is thrown instead of an Error, so there is no stack trace. |
690
+ | <a id="typeorm-transaction-client-escape"></a>[`typeorm-transaction-client-escape`](docs/rules/reliability/typeorm-transaction-client-escape.md) | critical | A write inside a TypeORM transaction goes through a repository not bound to it. |
691
+ | <a id="unbounded-promise-all"></a>[`unbounded-promise-all`](docs/rules/reliability/unbounded-promise-all.md) | high | Promise.all runs over an unbounded collection without a concurrency limit, risking memory spikes or downstream saturation. |
692
+ | <a id="uncaught-exception-continues"></a>[`uncaught-exception-continues`](docs/rules/reliability/uncaught-exception-continues.md) | high | An uncaughtException handler neither exits nor rethrows, so the process keeps running in an undefined state. |
693
+ | <a id="unguarded-boundary-access"></a>[`unguarded-boundary-access`](docs/rules/reliability/unguarded-boundary-access.md) | medium | A nested property is read from outside input or a lookup that can be missing, so absent data throws a TypeError. |
694
+ | <a id="unreachable-code"></a>[`unreachable-code`](docs/rules/reliability/unreachable-code.md) | medium | Statements follow a return, throw, break or continue in the same block and never run. |
695
+ | <a id="upload-without-size-limit"></a>[`upload-without-size-limit`](docs/rules/reliability/upload-without-size-limit.md) | high | A multer or Nest upload interceptor has no file size limit. |
696
+ | <a id="webhook-missing-idempotency-check"></a>[`webhook-missing-idempotency-check`](docs/rules/reliability/webhook-missing-idempotency-check.md) | medium | A webhook route inserts rows without first checking whether the event was already processed. |
693
697
 
694
698
  <!-- loadwise:rules:end -->
695
699
 
@@ -699,23 +703,23 @@ Some rules moved here from the performance and maintainability checkers and kept
699
703
 
700
704
  <!-- loadwise:rules:start checker=reliability group=migration-safety -->
701
705
 
702
- | Rule | Impact | What it flags |
703
- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------- |
704
- | <a id="migration-breaking-drop"></a>[`migration-breaking-drop`](docs/rules/migration-breaking-drop.md) | critical | A migration drops a column or table that running code may still use. |
705
- | <a id="migration-breaking-rename"></a>[`migration-breaking-rename`](docs/rules/migration-breaking-rename.md) | high | A migration renames a column or table that running code may still use. |
706
- | <a id="migration-column-type-rewrite"></a>[`migration-column-type-rewrite`](docs/rules/migration-column-type-rewrite.md) | critical | A migration changes a column type in a way that rewrites the table. |
707
- | <a id="migration-concurrent-in-transaction"></a>[`migration-concurrent-in-transaction`](docs/rules/migration-concurrent-in-transaction.md) | high | A CONCURRENTLY index statement runs inside a transaction, where PostgreSQL rejects it. |
708
- | <a id="migration-constraint-not-valid"></a>[`migration-constraint-not-valid`](docs/rules/migration-constraint-not-valid.md) | high | A constraint is added and validated in one step instead of NOT VALID first. |
709
- | <a id="migration-constraint-without-index"></a>[`migration-constraint-without-index`](docs/rules/migration-constraint-without-index.md) | high | A unique or primary key constraint builds its index while blocking writes. |
710
- | <a id="migration-index-not-concurrent"></a>[`migration-index-not-concurrent`](docs/rules/migration-index-not-concurrent.md) | critical | A PostgreSQL index is built without CONCURRENTLY, blocking writes to the table. |
711
- | <a id="migration-missing-lock-timeout"></a>[`migration-missing-lock-timeout`](docs/rules/migration-missing-lock-timeout.md) | high | A migration statement takes a lock with no lock_timeout set. |
712
- | <a id="migration-mysql-lock-unspecified"></a>[`migration-mysql-lock-unspecified`](docs/rules/migration-mysql-lock-unspecified.md) | high | A MySQL ALTER does not state its LOCK level. |
713
- | <a id="migration-mysql-table-copy"></a>[`migration-mysql-table-copy`](docs/rules/migration-mysql-table-copy.md) | critical | A MySQL ALTER copies the whole table. |
714
- | <a id="migration-not-null-without-default"></a>[`migration-not-null-without-default`](docs/rules/migration-not-null-without-default.md) | high | A NOT NULL column is added without a default, which fails once rows exist. |
715
- | <a id="migration-set-not-null-scan"></a>[`migration-set-not-null-scan`](docs/rules/migration-set-not-null-scan.md) | high | SET NOT NULL scans the whole table while holding a lock. |
716
- | <a id="migration-table-rewrite-command"></a>[`migration-table-rewrite-command`](docs/rules/migration-table-rewrite-command.md) | critical | A migration runs VACUUM FULL, CLUSTER or REINDEX, which rewrites or locks the table. |
717
- | <a id="migration-unparsed"></a>[`migration-unparsed`](docs/rules/migration-unparsed.md) | low | A migration statement could not be parsed and needs a manual review. |
718
- | <a id="migration-volatile-default"></a>[`migration-volatile-default`](docs/rules/migration-volatile-default.md) | high | A column is added with a volatile default, which rewrites the table. |
706
+ | Rule | Impact | What it flags |
707
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------- |
708
+ | <a id="migration-breaking-drop"></a>[`migration-breaking-drop`](docs/rules/reliability/migration-breaking-drop.md) | critical | A migration drops a column or table that running code may still use. |
709
+ | <a id="migration-breaking-rename"></a>[`migration-breaking-rename`](docs/rules/reliability/migration-breaking-rename.md) | high | A migration renames a column or table that running code may still use. |
710
+ | <a id="migration-column-type-rewrite"></a>[`migration-column-type-rewrite`](docs/rules/reliability/migration-column-type-rewrite.md) | critical | A migration changes a column type in a way that rewrites the table. |
711
+ | <a id="migration-concurrent-in-transaction"></a>[`migration-concurrent-in-transaction`](docs/rules/reliability/migration-concurrent-in-transaction.md) | high | A CONCURRENTLY index statement runs inside a transaction, where PostgreSQL rejects it. |
712
+ | <a id="migration-constraint-not-valid"></a>[`migration-constraint-not-valid`](docs/rules/reliability/migration-constraint-not-valid.md) | high | A constraint is added and validated in one step instead of NOT VALID first. |
713
+ | <a id="migration-constraint-without-index"></a>[`migration-constraint-without-index`](docs/rules/reliability/migration-constraint-without-index.md) | high | A unique or primary key constraint builds its index while blocking writes. |
714
+ | <a id="migration-index-not-concurrent"></a>[`migration-index-not-concurrent`](docs/rules/reliability/migration-index-not-concurrent.md) | critical | A PostgreSQL index is built without CONCURRENTLY, blocking writes to the table. |
715
+ | <a id="migration-missing-lock-timeout"></a>[`migration-missing-lock-timeout`](docs/rules/reliability/migration-missing-lock-timeout.md) | high | A migration statement takes a lock with no lock_timeout set. |
716
+ | <a id="migration-mysql-lock-unspecified"></a>[`migration-mysql-lock-unspecified`](docs/rules/reliability/migration-mysql-lock-unspecified.md) | high | A MySQL ALTER does not state its LOCK level. |
717
+ | <a id="migration-mysql-table-copy"></a>[`migration-mysql-table-copy`](docs/rules/reliability/migration-mysql-table-copy.md) | critical | A MySQL ALTER copies the whole table. |
718
+ | <a id="migration-not-null-without-default"></a>[`migration-not-null-without-default`](docs/rules/reliability/migration-not-null-without-default.md) | high | A NOT NULL column is added without a default, which fails once rows exist. |
719
+ | <a id="migration-set-not-null-scan"></a>[`migration-set-not-null-scan`](docs/rules/reliability/migration-set-not-null-scan.md) | high | SET NOT NULL scans the whole table while holding a lock. |
720
+ | <a id="migration-table-rewrite-command"></a>[`migration-table-rewrite-command`](docs/rules/reliability/migration-table-rewrite-command.md) | critical | A migration runs VACUUM FULL, CLUSTER or REINDEX, which rewrites or locks the table. |
721
+ | <a id="migration-unparsed"></a>[`migration-unparsed`](docs/rules/reliability/migration-unparsed.md) | low | A migration statement could not be parsed and needs a manual review. |
722
+ | <a id="migration-volatile-default"></a>[`migration-volatile-default`](docs/rules/reliability/migration-volatile-default.md) | high | A column is added with a volatile default, which rewrites the table. |
719
723
 
720
724
  <!-- loadwise:rules:end -->
721
725
 
@@ -734,13 +738,13 @@ npx loadwise rel migrations # new migrations fail; baselined
734
738
 
735
739
  <!-- loadwise:rules:start checker=reliability group=api-contract-safety -->
736
740
 
737
- | Rule | Impact | What it flags |
738
- | --------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
739
- | <a id="api-enum-value-removed"></a>[`api-enum-value-removed`](docs/rules/api-enum-value-removed.md) | high | An enum value or string-literal option that clients could send was removed. |
740
- | <a id="api-removed-field"></a>[`api-removed-field`](docs/rules/api-removed-field.md) | high | A response field, GraphQL type, field, argument or union member, or returned DTO property was removed. |
741
- | <a id="api-removed-operation"></a>[`api-removed-operation`](docs/rules/api-removed-operation.md) | critical | An OpenAPI operation or a GraphQL Query, Mutation or Subscription field was removed. |
742
- | <a id="api-required-input"></a>[`api-required-input`](docs/rules/api-required-input.md) | high | A request field, parameter or GraphQL argument is new and required, or became required. |
743
- | <a id="api-type-changed"></a>[`api-type-changed`](docs/rules/api-type-changed.md) | high | A field or parameter changed type, or a GraphQL type changed nullability in a breaking direction. |
741
+ | Rule | Impact | What it flags |
742
+ | --------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
743
+ | <a id="api-enum-value-removed"></a>[`api-enum-value-removed`](docs/rules/reliability/api-enum-value-removed.md) | high | An enum value or string-literal option that clients could send was removed. |
744
+ | <a id="api-removed-field"></a>[`api-removed-field`](docs/rules/reliability/api-removed-field.md) | high | A response field, GraphQL type, field, argument or union member, or returned DTO property was removed. |
745
+ | <a id="api-removed-operation"></a>[`api-removed-operation`](docs/rules/reliability/api-removed-operation.md) | critical | An OpenAPI operation or a GraphQL Query, Mutation or Subscription field was removed. |
746
+ | <a id="api-required-input"></a>[`api-required-input`](docs/rules/reliability/api-required-input.md) | high | A request field, parameter or GraphQL argument is new and required, or became required. |
747
+ | <a id="api-type-changed"></a>[`api-type-changed`](docs/rules/reliability/api-type-changed.md) | high | A field or parameter changed type, or a GraphQL type changed nullability in a breaking direction. |
744
748
 
745
749
  <!-- loadwise:rules:end -->
746
750
 
@@ -752,29 +756,29 @@ npx loadwise rel migrations # new migrations fail; baselined
752
756
 
753
757
  <!-- loadwise:rules:start checker=maintainability group=what-gets-checked -->
754
758
 
755
- | Rule | Impact | What it flags |
756
- | ------------------------------------------------------------------------------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------- |
757
- | <a id="data-access-boundary"></a>[`data-access-boundary`](docs/rules/data-access-boundary.md) | medium | A file outside the approved paths imports a configured database driver or ORM. |
758
- | <a id="deep-control-flow"></a>[`deep-control-flow`](docs/rules/deep-control-flow.md) | low | Control structures are nested four levels deep. |
759
- | <a id="dependency-cycle"></a>[`dependency-cycle`](docs/rules/dependency-cycle.md) | high | An eager chain of internal imports leads back to the module it started from. |
760
- | <a id="deprecated-node-api"></a>[`deprecated-node-api`](docs/rules/deprecated-node-api.md) | medium | A deprecated Node.js API is used: new Buffer(), url.parse() or fs.exists(). |
761
- | <a id="double-type-assertion"></a>[`double-type-assertion`](docs/rules/double-type-assertion.md) | low | A value is cast through unknown or any to a second type, bypassing the type checker. |
762
- | <a id="duplicate-implementation"></a>[`duplicate-implementation`](docs/rules/duplicate-implementation.md) | medium | Substantial functions share the same implementation. |
763
- | <a id="file-placement"></a>[`file-placement`](docs/rules/file-placement.md) | low | A file with a configured suffix sits outside its allowed folders. |
764
- | <a id="focused-test-committed"></a>[`focused-test-committed`](docs/rules/focused-test-committed.md) | medium | A committed .only, fit or fdescribe makes the test runner skip every other test. |
765
- | <a id="folder-boundary"></a>[`folder-boundary`](docs/rules/folder-boundary.md) | medium | An import crosses a folder boundary the team declared. |
766
- | <a id="high-branch-complexity"></a>[`high-branch-complexity`](docs/rules/high-branch-complexity.md) | medium | A function reaches a branch complexity score of 15. |
767
- | <a id="large-class"></a>[`large-class`](docs/rules/large-class.md) | low | A class has more than 30 methods, accessors, constructors or function-valued fields. |
768
- | <a id="large-module"></a>[`large-module`](docs/rules/large-module.md) | low | A file has more than 600 lines of code. |
769
- | <a id="long-parameter-list"></a>[`long-parameter-list`](docs/rules/long-parameter-list.md) | low | A function takes more than 5 positional parameters. |
770
- | <a id="query-mutates-state"></a>[`query-mutates-state`](docs/rules/query-mutates-state.md) | medium | A method marked @maintainabilityQuery writes through this. |
771
- | <a id="stray-console"></a>[`stray-console`](docs/rules/stray-console.md) | low | A console call in production code bypasses the logger, so its output has no level or structure. |
772
- | <a id="ts-suppression-without-reason"></a>[`ts-suppression-without-reason`](docs/rules/ts-suppression-without-reason.md) | low | A @ts-ignore, @ts-expect-error or @ts-nocheck directive has no explanation. |
773
- | <a id="tsconfig-strict-disabled"></a>[`tsconfig-strict-disabled`](docs/rules/tsconfig-strict-disabled.md) | medium | A tsconfig turns off strict type checking. |
774
- | <a id="unreferenced-file"></a>[`unreferenced-file`](docs/rules/unreferenced-file.md) | low | A source file that nothing imports and that is not an entry point. |
775
- | <a id="unused-export"></a>[`unused-export`](docs/rules/unused-export.md) | low | An export that no scanned file imports. |
776
- | <a id="unused-import"></a>[`unused-import`](docs/rules/unused-import.md) | low | An imported name is never used in the file. |
777
- | <a id="unused-local-variable"></a>[`unused-local-variable`](docs/rules/unused-local-variable.md) | low | A local variable is assigned but never read. |
759
+ | Rule | Impact | What it flags |
760
+ | ---------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------- |
761
+ | <a id="data-access-boundary"></a>[`data-access-boundary`](docs/rules/maintainability/data-access-boundary.md) | medium | A file outside the approved paths imports a configured database driver or ORM. |
762
+ | <a id="deep-control-flow"></a>[`deep-control-flow`](docs/rules/maintainability/deep-control-flow.md) | low | Control structures are nested four levels deep. |
763
+ | <a id="dependency-cycle"></a>[`dependency-cycle`](docs/rules/maintainability/dependency-cycle.md) | high | An eager chain of internal imports leads back to the module it started from. |
764
+ | <a id="deprecated-node-api"></a>[`deprecated-node-api`](docs/rules/maintainability/deprecated-node-api.md) | medium | A deprecated Node.js API is used: new Buffer(), url.parse() or fs.exists(). |
765
+ | <a id="double-type-assertion"></a>[`double-type-assertion`](docs/rules/maintainability/double-type-assertion.md) | low | A value is cast through unknown or any to a second type, bypassing the type checker. |
766
+ | <a id="duplicate-implementation"></a>[`duplicate-implementation`](docs/rules/maintainability/duplicate-implementation.md) | medium | Substantial functions share the same implementation. |
767
+ | <a id="file-placement"></a>[`file-placement`](docs/rules/maintainability/file-placement.md) | low | A file with a configured suffix sits outside its allowed folders. |
768
+ | <a id="focused-test-committed"></a>[`focused-test-committed`](docs/rules/maintainability/focused-test-committed.md) | medium | A committed .only, only: true, fit or fdescribe can make the test runner skip other tests. |
769
+ | <a id="folder-boundary"></a>[`folder-boundary`](docs/rules/maintainability/folder-boundary.md) | medium | An import crosses a folder boundary the team declared. |
770
+ | <a id="high-branch-complexity"></a>[`high-branch-complexity`](docs/rules/maintainability/high-branch-complexity.md) | medium | A function reaches a branch complexity score of 15. |
771
+ | <a id="large-class"></a>[`large-class`](docs/rules/maintainability/large-class.md) | low | A class has more than 30 methods, accessors, constructors or function-valued fields. |
772
+ | <a id="large-module"></a>[`large-module`](docs/rules/maintainability/large-module.md) | low | A file has more than 600 lines of code. |
773
+ | <a id="long-parameter-list"></a>[`long-parameter-list`](docs/rules/maintainability/long-parameter-list.md) | low | A function takes more than 5 positional parameters. |
774
+ | <a id="query-mutates-state"></a>[`query-mutates-state`](docs/rules/maintainability/query-mutates-state.md) | medium | A method marked @maintainabilityQuery writes through this. |
775
+ | <a id="stray-console"></a>[`stray-console`](docs/rules/maintainability/stray-console.md) | low | A console call in production code bypasses the logger, so its output has no level or structure. |
776
+ | <a id="ts-suppression-without-reason"></a>[`ts-suppression-without-reason`](docs/rules/maintainability/ts-suppression-without-reason.md) | low | A @ts-ignore, @ts-expect-error or @ts-nocheck directive has no explanation. |
777
+ | <a id="tsconfig-strict-disabled"></a>[`tsconfig-strict-disabled`](docs/rules/maintainability/tsconfig-strict-disabled.md) | medium | A tsconfig turns off strict type checking. |
778
+ | <a id="unreferenced-file"></a>[`unreferenced-file`](docs/rules/maintainability/unreferenced-file.md) | low | A source file that nothing imports and that is not an entry point. |
779
+ | <a id="unused-export"></a>[`unused-export`](docs/rules/maintainability/unused-export.md) | low | An export that no scanned file imports. |
780
+ | <a id="unused-import"></a>[`unused-import`](docs/rules/maintainability/unused-import.md) | low | An imported name is never used in the file. |
781
+ | <a id="unused-local-variable"></a>[`unused-local-variable`](docs/rules/maintainability/unused-local-variable.md) | low | A local variable is assigned but never read. |
778
782
 
779
783
  <!-- loadwise:rules:end -->
780
784
 
@@ -832,80 +836,81 @@ It accepts the source-check flags of `loadwise perf`, including `--format`, `--m
832
836
 
833
837
  <!-- loadwise:rules:start checker=security group=rules -->
834
838
 
835
- | Rule | Impact | What it flags |
836
- | ------------------------------------------------------------------------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
837
- | <a id="angular-bypass-security-trust"></a>[`angular-bypass-security-trust`](docs/rules/angular-bypass-security-trust.md) | high | DomSanitizer.bypassSecurityTrust* is called on a dynamic value, which turns off Angular's built-in sanitization. |
838
- | <a id="auth-route-without-rate-limit"></a>[`auth-route-without-rate-limit`](docs/rules/auth-route-without-rate-limit.md) | medium | A login, signup or password-reset route has no rate limiter. |
839
- | <a id="bcrypt-low-cost"></a>[`bcrypt-low-cost`](docs/rules/bcrypt-low-cost.md) | medium | A bcrypt password hash uses a work factor below the recommended minimum. |
840
- | <a id="client-env-secret-exposed"></a>[`client-env-secret-exposed`](docs/rules/client-env-secret-exposed.md) | critical | A secret-named env variable is read under a browser prefix (NEXT_PUBLIC_, VITE_, REACT_APP_...), so the build ships it to every visitor. |
841
- | <a id="code-injection"></a>[`code-injection`](docs/rules/code-injection.md) | critical | Request-controlled input becomes source code evaluated by the application. |
842
- | <a id="command-injection"></a>[`command-injection`](docs/rules/command-injection.md) | critical | Request-controlled input reaches a shell command string. |
843
- | <a id="committed-secret"></a>[`committed-secret`](docs/rules/committed-secret.md) | critical | A tracked file contains a value that appears to be a credential. |
844
- | <a id="compose-hardcoded-secret"></a>[`compose-hardcoded-secret`](docs/rules/compose-hardcoded-secret.md) | high | A Docker Compose service supplies a secret as a literal environment value. |
845
- | <a id="cookie-missing-security-flags"></a>[`cookie-missing-security-flags`](docs/rules/cookie-missing-security-flags.md) | high | A sensitive cookie is set without the expected security attributes. |
846
- | <a id="cors-credentials-any-origin"></a>[`cors-credentials-any-origin`](docs/rules/cors-credentials-any-origin.md) | high | A credentialed CORS response allows arbitrary origins. |
847
- | <a id="cors-origin-regex-unanchored"></a>[`cors-origin-regex-unanchored`](docs/rules/cors-origin-regex-unanchored.md) | medium | A CORS origin regex also accepts look-alike hosts. |
848
- | <a id="database-error-in-response"></a>[`database-error-in-response`](docs/rules/database-error-in-response.md) | medium | An HTTP response includes a raw database error message. |
849
- | <a id="dockerfile-add-remote-url"></a>[`dockerfile-add-remote-url`](docs/rules/dockerfile-add-remote-url.md) | medium | A Dockerfile ADD instruction retrieves a resource from a remote URL. |
850
- | <a id="dockerfile-runs-as-root"></a>[`dockerfile-runs-as-root`](docs/rules/dockerfile-runs-as-root.md) | medium | The final image selects root or inherits an unverified base-image user. |
851
- | <a id="dockerfile-secret-in-build"></a>[`dockerfile-secret-in-build`](docs/rules/dockerfile-secret-in-build.md) | high | A Dockerfile exposes a secret through a build argument or environment variable. |
852
- | <a id="dockerfile-unpinned-base-image"></a>[`dockerfile-unpinned-base-image`](docs/rules/dockerfile-unpinned-base-image.md) | low | A Dockerfile uses a base image reference that can change between builds. |
853
- | <a id="dom-xss-sink"></a>[`dom-xss-sink`](docs/rules/dom-xss-sink.md) | high | Untrusted or dynamic HTML reaches innerHTML, outerHTML, insertAdjacentHTML, document.write or createContextualFragment (DOM XSS). |
854
- | <a id="drizzle-scope-unverified"></a>[`drizzle-scope-unverified`](docs/rules/drizzle-scope-unverified.md) | high | A Drizzle operation lacks the row scope required by the declared policy. |
855
- | <a id="drizzle-sql-raw-dynamic"></a>[`drizzle-sql-raw-dynamic`](docs/rules/drizzle-sql-raw-dynamic.md) | critical | A dynamic SQL fragment reaches Drizzle without parameter binding. |
856
- | <a id="error-stack-in-response"></a>[`error-stack-in-response`](docs/rules/error-stack-in-response.md) | medium | An HTTP response includes an internal error stack. |
857
- | <a id="express-cookie-auth-missing-csrf"></a>[`express-cookie-auth-missing-csrf`](docs/rules/express-cookie-auth-missing-csrf.md) | high | Cookie-based session or auth is paired with state-changing routes without CSRF protection or `sameSite: "strict"`. |
858
- | <a id="express-missing-helmet"></a>[`express-missing-helmet`](docs/rules/express-missing-helmet.md) | low | The Express or NestJS server starts without helmet security headers middleware (contextual: a proxy may set them). |
859
- | <a id="frontend-storage-secret-token"></a>[`frontend-storage-secret-token`](docs/rules/frontend-storage-secret-token.md) | medium | A token, JWT, password or API key is stored in localStorage or sessionStorage, readable by any script on the page. |
860
- | <a id="graphql-batching-unbounded"></a>[`graphql-batching-unbounded`](docs/rules/graphql-batching-unbounded.md) | medium | GraphQL query batching is enabled without a batch size, query depth, or cost/complexity limit. |
861
- | <a id="graphql-introspection-enabled"></a>[`graphql-introspection-enabled`](docs/rules/graphql-introspection-enabled.md) | medium | A GraphQL server explicitly enables schema introspection. |
862
- | <a id="graphql-query-depth-unbounded"></a>[`graphql-query-depth-unbounded`](docs/rules/graphql-query-depth-unbounded.md) | medium | A GraphQL server accepts queries of any depth. |
863
- | <a id="hardcoded-secret"></a>[`hardcoded-secret`](docs/rules/hardcoded-secret.md) | critical | The source supplies a literal credential or cryptographic secret. |
864
- | <a id="insecure-cipher"></a>[`insecure-cipher`](docs/rules/insecure-cipher.md) | medium | A cryptographic operation selects an insecure cipher or mode. |
865
- | <a id="insecure-random-for-secret"></a>[`insecure-random-for-secret`](docs/rules/insecure-random-for-secret.md) | high | A sensitive token or secret uses a non-cryptographic random source. |
866
- | <a id="jsx-javascript-url"></a>[`jsx-javascript-url`](docs/rules/jsx-javascript-url.md) | high | In React 18 and older or Preact, a URL search parameter or location hash starts a JSX href, action or iframe src (javascript: XSS). |
867
- | <a id="jwt-decode-for-auth"></a>[`jwt-decode-for-auth`](docs/rules/jwt-decode-for-auth.md) | high | Authentication uses decoded JWT claims without verifying the token signature. |
868
- | <a id="jwt-none-algorithm"></a>[`jwt-none-algorithm`](docs/rules/jwt-none-algorithm.md) | critical | JWT signing or verification allows an unsigned token. |
869
- | <a id="jwt-sign-without-expiry"></a>[`jwt-sign-without-expiry`](docs/rules/jwt-sign-without-expiry.md) | medium | A signed JWT has no explicit expiration. |
870
- | <a id="jwt-verify-without-algorithms"></a>[`jwt-verify-without-algorithms`](docs/rules/jwt-verify-without-algorithms.md) | high | JWT verification does not restrict the accepted signing algorithms. |
871
- | <a id="jwt-weak-secret-literal"></a>[`jwt-weak-secret-literal`](docs/rules/jwt-weak-secret-literal.md) | high | JWT signing or verification uses a short (< 32 chars) or weak literal secret susceptible to brute-force forgery. |
872
- | <a id="knex-raw-dynamic-text"></a>[`knex-raw-dynamic-text`](docs/rules/knex-raw-dynamic-text.md) | critical | A dynamic SQL fragment reaches Knex without parameter binding. |
873
- | <a id="mass-assignment"></a>[`mass-assignment`](docs/rules/mass-assignment.md) | high | An unfiltered request body reaches a persistence operation. |
874
- | <a id="mysql-dynamic-query-text"></a>[`mysql-dynamic-query-text`](docs/rules/mysql-dynamic-query-text.md) | critical | Dynamic SQL text reaches a MySQL client without parameter binding. |
875
- | <a id="nest-validation-without-whitelist"></a>[`nest-validation-without-whitelist`](docs/rules/nest-validation-without-whitelist.md) | medium | A NestJS ValidationPipe permits properties outside the validated DTO. |
876
- | <a id="next-image-any-remote-host"></a>[`next-image-any-remote-host`](docs/rules/next-image-any-remote-host.md) | medium | A Next.js images.remotePatterns entry sets hostname '**', so the image optimizer fetches and serves any host (open proxy). |
877
- | <a id="nosql-operator-injection"></a>[`nosql-operator-injection`](docs/rules/nosql-operator-injection.md) | high | Request data can introduce query operators into a NoSQL filter. |
878
- | <a id="open-redirect"></a>[`open-redirect`](docs/rules/open-redirect.md) | medium | An HTTP redirect destination is controlled by request data. |
879
- | <a id="password-hash-in-response"></a>[`password-hash-in-response`](docs/rules/password-hash-in-response.md) | high | A response returns a user record that still holds its password hash. |
880
- | <a id="path-traversal"></a>[`path-traversal`](docs/rules/path-traversal.md) | high | Request data controls a filesystem path without a recognized containment check. |
881
- | <a id="pg-dynamic-query-text"></a>[`pg-dynamic-query-text`](docs/rules/pg-dynamic-query-text.md) | medium | Dynamic SQL text reaches the PostgreSQL client without parameter binding. |
882
- | <a id="plaintext-password-storage"></a>[`plaintext-password-storage`](docs/rules/plaintext-password-storage.md) | critical | A password is stored or written without being hashed. |
883
- | <a id="postmessage-missing-origin-check"></a>[`postmessage-missing-origin-check`](docs/rules/postmessage-missing-origin-check.md) | medium | postMessage targets '*', or a window message listener reads event.data without checking origin or source. |
884
- | <a id="prisma-raw-unsafe-dynamic"></a>[`prisma-raw-unsafe-dynamic`](docs/rules/prisma-raw-unsafe-dynamic.md) | critical | Dynamic SQL text reaches an unsafe Prisma raw-query method. |
885
- | <a id="prisma-scope-unverified"></a>[`prisma-scope-unverified`](docs/rules/prisma-scope-unverified.md) | high | A Prisma operation lacks the row scope required by the declared policy. |
886
- | <a id="prototype-pollution"></a>[`prototype-pollution`](docs/rules/prototype-pollution.md) | high | Request data can supply keys to a write or merge that can modify an object prototype. |
887
- | <a id="react-dangerously-set-inner-html"></a>[`react-dangerously-set-inner-html`](docs/rules/react-dangerously-set-inner-html.md) | high | dangerouslySetInnerHTML receives HTML that is not a constant or sanitized. |
888
- | <a id="reflected-xss-response"></a>[`reflected-xss-response`](docs/rules/reflected-xss-response.md) | low | An HTML response reflects request data without recognized escaping. |
889
- | <a id="regex-catastrophic-backtracking"></a>[`regex-catastrophic-backtracking`](docs/rules/regex-catastrophic-backtracking.md) | high | A regular expression that can backtrack exponentially or in polynomial time runs on request input. |
890
- | <a id="regex-from-input"></a>[`regex-from-input`](docs/rules/regex-from-input.md) | medium | Request input supplies a regular expression pattern without recognized escaping. |
891
- | <a id="secret-compared-non-constant-time"></a>[`secret-compared-non-constant-time`](docs/rules/secret-compared-non-constant-time.md) | medium | A secret is compared with an operation that can vary in timing with its contents. |
892
- | <a id="secret-in-log"></a>[`secret-in-log`](docs/rules/secret-in-log.md) | high | A log statement can expose a credential, token, or other secret. |
893
- | <a id="secret-in-url-query"></a>[`secret-in-url-query`](docs/rules/secret-in-url-query.md) | medium | A password, token or API key is passed in a URL query string. |
894
- | <a id="sequelize-dynamic-query-text"></a>[`sequelize-dynamic-query-text`](docs/rules/sequelize-dynamic-query-text.md) | critical | Dynamic SQL text reaches Sequelize without parameter binding. |
895
- | <a id="server-action-missing-auth"></a>[`server-action-missing-auth`](docs/rules/server-action-missing-auth.md) | high | An exported Next.js Server Action performs work without verifying authentication or session state. |
896
- | <a id="ssrf-redirect-bypass"></a>[`ssrf-redirect-bypass`](docs/rules/ssrf-redirect-bypass.md) | high | An outbound HTTP request with a dynamic URL does not disable redirects, allowing SSRF allowlist bypasses. |
897
- | <a id="ssrf-request-url"></a>[`ssrf-request-url`](docs/rules/ssrf-request-url.md) | high | Request data controls the destination of a server-side network request. |
898
- | <a id="storage-object-public-acl"></a>[`storage-object-public-acl`](docs/rules/storage-object-public-acl.md) | high | A storage upload makes the object publicly readable. |
899
- | <a id="template-autoescape-disabled"></a>[`template-autoescape-disabled`](docs/rules/template-autoescape-disabled.md) | medium | A template engine is configured to render values without HTML escaping. |
900
- | <a id="template-injection"></a>[`template-injection`](docs/rules/template-injection.md) | critical | Request data is interpreted as template source rather than a template value. |
901
- | <a id="tls-verification-disabled"></a>[`tls-verification-disabled`](docs/rules/tls-verification-disabled.md) | high | A TLS client skips certificate or server hostname verification. |
902
- | <a id="typeorm-dynamic-query-text"></a>[`typeorm-dynamic-query-text`](docs/rules/typeorm-dynamic-query-text.md) | critical | A dynamic SQL fragment reaches TypeORM without parameter binding. |
903
- | <a id="upload-client-filename"></a>[`upload-client-filename`](docs/rules/upload-client-filename.md) | medium | A file upload is stored under the original name supplied by the client. |
904
- | <a id="vm-sandbox-escape"></a>[`vm-sandbox-escape`](docs/rules/vm-sandbox-escape.md) | critical | Node `vm` or `vm2` executes dynamic code or an untrusted context, risking sandbox escape and host RCE. |
905
- | <a id="vue-v-html-unsanitized"></a>[`vue-v-html-unsanitized`](docs/rules/vue-v-html-unsanitized.md) | high | A Vue render function binds unsanitized dynamic HTML to innerHTML. |
906
- | <a id="weak-password-hash"></a>[`weak-password-hash`](docs/rules/weak-password-hash.md) | high | A password is hashed with an algorithm unsuitable for password storage. |
907
- | <a id="xml-external-entities"></a>[`xml-external-entities`](docs/rules/xml-external-entities.md) | medium | An XML parser allows processing of external entities. |
908
- | <a id="zip-slip-extraction"></a>[`zip-slip-extraction`](docs/rules/zip-slip-extraction.md) | high | An archive entry controls an extraction path without a recognized containment check. |
839
+ | Rule | Impact | What it flags |
840
+ | --------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
841
+ | <a id="angular-bypass-security-trust"></a>[`angular-bypass-security-trust`](docs/rules/security/angular-bypass-security-trust.md) | high | DomSanitizer.bypassSecurityTrust* is called on a dynamic value, which turns off Angular's built-in sanitization. |
842
+ | <a id="auth-route-without-rate-limit"></a>[`auth-route-without-rate-limit`](docs/rules/security/auth-route-without-rate-limit.md) | medium | A login, signup or password-reset route has no rate limiter. |
843
+ | <a id="bcrypt-low-cost"></a>[`bcrypt-low-cost`](docs/rules/security/bcrypt-low-cost.md) | medium | A bcrypt password hash uses a work factor below the recommended minimum. |
844
+ | <a id="client-env-secret-exposed"></a>[`client-env-secret-exposed`](docs/rules/security/client-env-secret-exposed.md) | critical | A secret-named env variable is read under a browser prefix (NEXT_PUBLIC_, VITE_, REACT_APP_...), so the build ships it to every visitor. |
845
+ | <a id="code-injection"></a>[`code-injection`](docs/rules/security/code-injection.md) | critical | Request-controlled input becomes source code evaluated by the application. |
846
+ | <a id="command-injection"></a>[`command-injection`](docs/rules/security/command-injection.md) | critical | Request-controlled input reaches a shell command string. |
847
+ | <a id="committed-secret"></a>[`committed-secret`](docs/rules/security/committed-secret.md) | critical | A tracked file contains a value that appears to be a credential. |
848
+ | <a id="compose-hardcoded-secret"></a>[`compose-hardcoded-secret`](docs/rules/security/compose-hardcoded-secret.md) | high | A Docker Compose service supplies a secret as a literal environment value. |
849
+ | <a id="cookie-missing-security-flags"></a>[`cookie-missing-security-flags`](docs/rules/security/cookie-missing-security-flags.md) | high | A sensitive cookie is set without the expected security attributes. |
850
+ | <a id="cors-credentials-any-origin"></a>[`cors-credentials-any-origin`](docs/rules/security/cors-credentials-any-origin.md) | high | A credentialed CORS response allows arbitrary origins. |
851
+ | <a id="cors-origin-regex-unanchored"></a>[`cors-origin-regex-unanchored`](docs/rules/security/cors-origin-regex-unanchored.md) | medium | A CORS origin regex also accepts look-alike hosts. |
852
+ | <a id="database-error-in-response"></a>[`database-error-in-response`](docs/rules/security/database-error-in-response.md) | medium | An HTTP response includes a raw database error message. |
853
+ | <a id="dockerfile-add-remote-url"></a>[`dockerfile-add-remote-url`](docs/rules/security/dockerfile-add-remote-url.md) | medium | A Dockerfile ADD instruction retrieves a resource from a remote URL. |
854
+ | <a id="dockerfile-runs-as-root"></a>[`dockerfile-runs-as-root`](docs/rules/security/dockerfile-runs-as-root.md) | medium | The final image selects root or inherits an unverified base-image user. |
855
+ | <a id="dockerfile-secret-in-build"></a>[`dockerfile-secret-in-build`](docs/rules/security/dockerfile-secret-in-build.md) | high | A Dockerfile exposes a secret through a build argument or environment variable. |
856
+ | <a id="dockerfile-unpinned-base-image"></a>[`dockerfile-unpinned-base-image`](docs/rules/security/dockerfile-unpinned-base-image.md) | low | A Dockerfile uses a base image reference that can change between builds. |
857
+ | <a id="dom-xss-sink"></a>[`dom-xss-sink`](docs/rules/security/dom-xss-sink.md) | high | Untrusted or dynamic HTML reaches innerHTML, outerHTML, insertAdjacentHTML, document.write or createContextualFragment (DOM XSS). |
858
+ | <a id="drizzle-scope-unverified"></a>[`drizzle-scope-unverified`](docs/rules/security/drizzle-scope-unverified.md) | high | A Drizzle operation lacks the row scope required by the declared policy. |
859
+ | <a id="drizzle-sql-raw-dynamic"></a>[`drizzle-sql-raw-dynamic`](docs/rules/security/drizzle-sql-raw-dynamic.md) | critical | A dynamic SQL fragment reaches Drizzle without parameter binding. |
860
+ | <a id="error-stack-in-response"></a>[`error-stack-in-response`](docs/rules/security/error-stack-in-response.md) | medium | An HTTP response includes an internal error stack. |
861
+ | <a id="escape-replace-incomplete"></a>[`escape-replace-incomplete`](docs/rules/security/escape-replace-incomplete.md) | medium | A hand-written string escape replaces only the first match, or escapes a delimiter without escaping backslashes first. |
862
+ | <a id="express-cookie-auth-missing-csrf"></a>[`express-cookie-auth-missing-csrf`](docs/rules/security/express-cookie-auth-missing-csrf.md) | high | Cookie-based session or auth is paired with state-changing routes without CSRF protection or `sameSite: "strict"`. |
863
+ | <a id="express-missing-helmet"></a>[`express-missing-helmet`](docs/rules/security/express-missing-helmet.md) | low | The Express or NestJS server starts without helmet security headers middleware (contextual: a proxy may set them). |
864
+ | <a id="frontend-storage-secret-token"></a>[`frontend-storage-secret-token`](docs/rules/security/frontend-storage-secret-token.md) | medium | A token, JWT, password or API key is stored in localStorage or sessionStorage, readable by any script on the page. |
865
+ | <a id="graphql-batching-unbounded"></a>[`graphql-batching-unbounded`](docs/rules/security/graphql-batching-unbounded.md) | medium | GraphQL query batching is enabled without a batch size, query depth, or cost/complexity limit. |
866
+ | <a id="graphql-introspection-enabled"></a>[`graphql-introspection-enabled`](docs/rules/security/graphql-introspection-enabled.md) | medium | A GraphQL server explicitly enables schema introspection. |
867
+ | <a id="graphql-query-depth-unbounded"></a>[`graphql-query-depth-unbounded`](docs/rules/security/graphql-query-depth-unbounded.md) | medium | A GraphQL server accepts queries of any depth. |
868
+ | <a id="hardcoded-secret"></a>[`hardcoded-secret`](docs/rules/security/hardcoded-secret.md) | critical | The source supplies a literal credential or cryptographic secret. |
869
+ | <a id="insecure-cipher"></a>[`insecure-cipher`](docs/rules/security/insecure-cipher.md) | medium | A cryptographic operation selects an insecure cipher or mode. |
870
+ | <a id="insecure-random-for-secret"></a>[`insecure-random-for-secret`](docs/rules/security/insecure-random-for-secret.md) | high | A sensitive token or secret uses a non-cryptographic random source. |
871
+ | <a id="jsx-javascript-url"></a>[`jsx-javascript-url`](docs/rules/security/jsx-javascript-url.md) | high | In React 18 and older or Preact, a URL search parameter or location hash starts a JSX href, action or iframe src (javascript: XSS). |
872
+ | <a id="jwt-decode-for-auth"></a>[`jwt-decode-for-auth`](docs/rules/security/jwt-decode-for-auth.md) | high | Authentication uses decoded JWT claims without verifying the token signature. |
873
+ | <a id="jwt-none-algorithm"></a>[`jwt-none-algorithm`](docs/rules/security/jwt-none-algorithm.md) | critical | JWT signing or verification allows an unsigned token. |
874
+ | <a id="jwt-sign-without-expiry"></a>[`jwt-sign-without-expiry`](docs/rules/security/jwt-sign-without-expiry.md) | medium | A signed JWT has no explicit expiration. |
875
+ | <a id="jwt-verify-without-algorithms"></a>[`jwt-verify-without-algorithms`](docs/rules/security/jwt-verify-without-algorithms.md) | high | JWT verification does not restrict the accepted signing algorithms. |
876
+ | <a id="jwt-weak-secret-literal"></a>[`jwt-weak-secret-literal`](docs/rules/security/jwt-weak-secret-literal.md) | high | JWT signing or verification uses a short (< 32 chars) or weak literal secret susceptible to brute-force forgery. |
877
+ | <a id="knex-raw-dynamic-text"></a>[`knex-raw-dynamic-text`](docs/rules/security/knex-raw-dynamic-text.md) | critical | A dynamic SQL fragment reaches Knex without parameter binding. |
878
+ | <a id="mass-assignment"></a>[`mass-assignment`](docs/rules/security/mass-assignment.md) | high | An unfiltered request body reaches a persistence operation. |
879
+ | <a id="mysql-dynamic-query-text"></a>[`mysql-dynamic-query-text`](docs/rules/security/mysql-dynamic-query-text.md) | critical | Dynamic SQL text reaches a MySQL client without parameter binding. |
880
+ | <a id="nest-validation-without-whitelist"></a>[`nest-validation-without-whitelist`](docs/rules/security/nest-validation-without-whitelist.md) | medium | A NestJS ValidationPipe permits properties outside the validated DTO. |
881
+ | <a id="next-image-any-remote-host"></a>[`next-image-any-remote-host`](docs/rules/security/next-image-any-remote-host.md) | medium | A Next.js images.remotePatterns entry sets hostname '**', so the image optimizer fetches and serves any host (open proxy). |
882
+ | <a id="nosql-operator-injection"></a>[`nosql-operator-injection`](docs/rules/security/nosql-operator-injection.md) | high | Request data can introduce query operators into a NoSQL filter. |
883
+ | <a id="open-redirect"></a>[`open-redirect`](docs/rules/security/open-redirect.md) | medium | An HTTP redirect destination is controlled by request data. |
884
+ | <a id="password-hash-in-response"></a>[`password-hash-in-response`](docs/rules/security/password-hash-in-response.md) | high | A response returns a user record that still holds its password hash. |
885
+ | <a id="path-traversal"></a>[`path-traversal`](docs/rules/security/path-traversal.md) | high | Request data controls a filesystem path without a recognized containment check. |
886
+ | <a id="pg-dynamic-query-text"></a>[`pg-dynamic-query-text`](docs/rules/security/pg-dynamic-query-text.md) | medium | Dynamic SQL text reaches the PostgreSQL client without parameter binding. |
887
+ | <a id="plaintext-password-storage"></a>[`plaintext-password-storage`](docs/rules/security/plaintext-password-storage.md) | critical | A password is stored or written without being hashed. |
888
+ | <a id="postmessage-missing-origin-check"></a>[`postmessage-missing-origin-check`](docs/rules/security/postmessage-missing-origin-check.md) | medium | postMessage targets '*', or a window message listener reads event.data without checking origin or source. |
889
+ | <a id="prisma-raw-unsafe-dynamic"></a>[`prisma-raw-unsafe-dynamic`](docs/rules/security/prisma-raw-unsafe-dynamic.md) | critical | Dynamic SQL text reaches an unsafe Prisma raw-query method. |
890
+ | <a id="prisma-scope-unverified"></a>[`prisma-scope-unverified`](docs/rules/security/prisma-scope-unverified.md) | high | A Prisma operation lacks the row scope required by the declared policy. |
891
+ | <a id="prototype-pollution"></a>[`prototype-pollution`](docs/rules/security/prototype-pollution.md) | high | Request data can supply keys to a write or merge that can modify an object prototype. |
892
+ | <a id="react-dangerously-set-inner-html"></a>[`react-dangerously-set-inner-html`](docs/rules/security/react-dangerously-set-inner-html.md) | high | dangerouslySetInnerHTML receives HTML that is not a constant or sanitized. |
893
+ | <a id="reflected-xss-response"></a>[`reflected-xss-response`](docs/rules/security/reflected-xss-response.md) | low | An HTML response reflects request data without recognized escaping. |
894
+ | <a id="regex-catastrophic-backtracking"></a>[`regex-catastrophic-backtracking`](docs/rules/security/regex-catastrophic-backtracking.md) | high | A regular expression that can backtrack exponentially or in polynomial time runs on request input. |
895
+ | <a id="regex-from-input"></a>[`regex-from-input`](docs/rules/security/regex-from-input.md) | medium | Request input supplies a regular expression pattern without recognized escaping. |
896
+ | <a id="secret-compared-non-constant-time"></a>[`secret-compared-non-constant-time`](docs/rules/security/secret-compared-non-constant-time.md) | medium | A secret is compared with an operation that can vary in timing with its contents. |
897
+ | <a id="secret-in-log"></a>[`secret-in-log`](docs/rules/security/secret-in-log.md) | high | A log statement can expose a credential, token, or other secret. |
898
+ | <a id="secret-in-url-query"></a>[`secret-in-url-query`](docs/rules/security/secret-in-url-query.md) | medium | A password, token or API key is passed in a URL query string. |
899
+ | <a id="sequelize-dynamic-query-text"></a>[`sequelize-dynamic-query-text`](docs/rules/security/sequelize-dynamic-query-text.md) | critical | Dynamic SQL text reaches Sequelize without parameter binding. |
900
+ | <a id="server-action-missing-auth"></a>[`server-action-missing-auth`](docs/rules/security/server-action-missing-auth.md) | high | An exported Next.js Server Action performs work without verifying authentication or session state. |
901
+ | <a id="ssrf-redirect-bypass"></a>[`ssrf-redirect-bypass`](docs/rules/security/ssrf-redirect-bypass.md) | high | An outbound HTTP request with a dynamic URL does not disable redirects, allowing SSRF allowlist bypasses. |
902
+ | <a id="ssrf-request-url"></a>[`ssrf-request-url`](docs/rules/security/ssrf-request-url.md) | high | Request data controls the destination of a server-side network request. |
903
+ | <a id="storage-object-public-acl"></a>[`storage-object-public-acl`](docs/rules/security/storage-object-public-acl.md) | high | A storage upload makes the object publicly readable. |
904
+ | <a id="template-autoescape-disabled"></a>[`template-autoescape-disabled`](docs/rules/security/template-autoescape-disabled.md) | medium | A template engine is configured to render values without HTML escaping. |
905
+ | <a id="template-injection"></a>[`template-injection`](docs/rules/security/template-injection.md) | critical | Request data is interpreted as template source rather than a template value. |
906
+ | <a id="tls-verification-disabled"></a>[`tls-verification-disabled`](docs/rules/security/tls-verification-disabled.md) | high | A TLS client skips certificate or server hostname verification. |
907
+ | <a id="typeorm-dynamic-query-text"></a>[`typeorm-dynamic-query-text`](docs/rules/security/typeorm-dynamic-query-text.md) | critical | A dynamic SQL fragment reaches TypeORM without parameter binding. |
908
+ | <a id="upload-client-filename"></a>[`upload-client-filename`](docs/rules/security/upload-client-filename.md) | medium | A file upload is stored under the original name supplied by the client. |
909
+ | <a id="vm-sandbox-escape"></a>[`vm-sandbox-escape`](docs/rules/security/vm-sandbox-escape.md) | critical | Node `vm` or `vm2` executes dynamic code or an untrusted context, risking sandbox escape and host RCE. |
910
+ | <a id="vue-v-html-unsanitized"></a>[`vue-v-html-unsanitized`](docs/rules/security/vue-v-html-unsanitized.md) | high | A Vue render function binds unsanitized dynamic HTML to innerHTML. |
911
+ | <a id="weak-password-hash"></a>[`weak-password-hash`](docs/rules/security/weak-password-hash.md) | high | A password is hashed with an algorithm unsuitable for password storage. |
912
+ | <a id="xml-external-entities"></a>[`xml-external-entities`](docs/rules/security/xml-external-entities.md) | medium | An XML parser allows processing of external entities. |
913
+ | <a id="zip-slip-extraction"></a>[`zip-slip-extraction`](docs/rules/security/zip-slip-extraction.md) | high | An archive entry controls an extraction path without a recognized containment check. |
909
914
 
910
915
  <!-- loadwise:rules:end -->
911
916
 
@@ -917,19 +922,19 @@ It accepts the source-check flags of `loadwise perf`, including `--format`, `--m
917
922
 
918
923
  <!-- loadwise:rules:start checker=security group=polyglot-source-checks -->
919
924
 
920
- | Rule | Impact | What it flags |
921
- | ------------------------------------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------- |
922
- | <a id="csharp-ef-from-sql-raw"></a>[`csharp-ef-from-sql-raw`](docs/rules/csharp-ef-from-sql-raw.md) | high | FromSqlRaw or ExecuteSqlRaw receives a concatenated or interpolated string, risking SQL injection. |
923
- | <a id="csharp-process-start"></a>[`csharp-process-start`](docs/rules/csharp-process-start.md) | medium | Process.Start launches an external process and risks command injection with untrusted arguments. |
924
- | <a id="go-exec-command-shell"></a>[`go-exec-command-shell`](docs/rules/go-exec-command-shell.md) | high | exec.Command invokes a shell, which risks command injection. |
925
- | <a id="go-sql-sprintf-injection"></a>[`go-sql-sprintf-injection`](docs/rules/go-sql-sprintf-injection.md) | high | SQL text formatted with fmt.Sprintf risks SQL injection. |
926
- | <a id="java-runtime-exec"></a>[`java-runtime-exec`](docs/rules/java-runtime-exec.md) | medium | Runtime.getRuntime().exec runs an OS command and risks command injection with untrusted arguments. |
927
- | <a id="java-sql-string-concat"></a>[`java-sql-string-concat`](docs/rules/java-sql-string-concat.md) | high | A SQL query built by string concatenation risks SQL injection. |
928
- | <a id="python-insecure-deserialization"></a>[`python-insecure-deserialization`](docs/rules/python-insecure-deserialization.md) | high | pickle or marshal deserialization of untrusted data can execute arbitrary code. |
929
- | <a id="python-subprocess-shell-true"></a>[`python-subprocess-shell-true`](docs/rules/python-subprocess-shell-true.md) | high | subprocess with shell=True or os.system passes input through a shell, risking command injection. |
930
- | <a id="python-unsafe-yaml-load"></a>[`python-unsafe-yaml-load`](docs/rules/python-unsafe-yaml-load.md) | high | yaml.load without SafeLoader can construct arbitrary Python objects. |
931
- | <a id="rust-command-shell"></a>[`rust-command-shell`](docs/rules/rust-command-shell.md) | high | Command::new("sh") or Command::new("bash") spawns a shell and risks command injection. |
932
- | <a id="rust-unsafe-raw-pointer-deref"></a>[`rust-unsafe-raw-pointer-deref`](docs/rules/rust-unsafe-raw-pointer-deref.md) | medium | A raw pointer dereference in an unsafe block bypasses Rust memory safety guarantees. |
925
+ | Rule | Impact | What it flags |
926
+ | --------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------- |
927
+ | <a id="csharp-ef-from-sql-raw"></a>[`csharp-ef-from-sql-raw`](docs/rules/security/csharp-ef-from-sql-raw.md) | high | FromSqlRaw or ExecuteSqlRaw receives a concatenated or interpolated string, risking SQL injection. |
928
+ | <a id="csharp-process-start"></a>[`csharp-process-start`](docs/rules/security/csharp-process-start.md) | medium | Process.Start launches an external process and risks command injection with untrusted arguments. |
929
+ | <a id="go-exec-command-shell"></a>[`go-exec-command-shell`](docs/rules/security/go-exec-command-shell.md) | high | exec.Command invokes a shell, which risks command injection. |
930
+ | <a id="go-sql-sprintf-injection"></a>[`go-sql-sprintf-injection`](docs/rules/security/go-sql-sprintf-injection.md) | high | SQL text formatted with fmt.Sprintf risks SQL injection. |
931
+ | <a id="java-runtime-exec"></a>[`java-runtime-exec`](docs/rules/security/java-runtime-exec.md) | medium | Runtime.getRuntime().exec runs an OS command and risks command injection with untrusted arguments. |
932
+ | <a id="java-sql-string-concat"></a>[`java-sql-string-concat`](docs/rules/security/java-sql-string-concat.md) | high | A SQL query built by string concatenation risks SQL injection. |
933
+ | <a id="python-insecure-deserialization"></a>[`python-insecure-deserialization`](docs/rules/security/python-insecure-deserialization.md) | high | pickle or marshal deserialization of untrusted data can execute arbitrary code. |
934
+ | <a id="python-subprocess-shell-true"></a>[`python-subprocess-shell-true`](docs/rules/security/python-subprocess-shell-true.md) | high | subprocess with shell=True or os.system passes input through a shell, risking command injection. |
935
+ | <a id="python-unsafe-yaml-load"></a>[`python-unsafe-yaml-load`](docs/rules/security/python-unsafe-yaml-load.md) | high | yaml.load without SafeLoader can construct arbitrary Python objects. |
936
+ | <a id="rust-command-shell"></a>[`rust-command-shell`](docs/rules/security/rust-command-shell.md) | high | Command::new("sh") or Command::new("bash") spawns a shell and risks command injection. |
937
+ | <a id="rust-unsafe-raw-pointer-deref"></a>[`rust-unsafe-raw-pointer-deref`](docs/rules/security/rust-unsafe-raw-pointer-deref.md) | medium | A raw pointer dereference in an unsafe block bypasses Rust memory safety guarantees. |
933
938
 
934
939
  <!-- loadwise:rules:end -->
935
940
 
@@ -939,9 +944,9 @@ It accepts the source-check flags of `loadwise perf`, including `--format`, `--m
939
944
 
940
945
  <!-- loadwise:rules:start checker=security group=dependency-checks -->
941
946
 
942
- | Rule | Impact | What it flags |
943
- | --------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------ |
944
- | <a id="dependency-known-vulnerability"></a>[`dependency-known-vulnerability`](docs/rules/dependency-known-vulnerability.md) | medium | A resolved dependency version is listed in a published vulnerability advisory. |
947
+ | Rule | Impact | What it flags |
948
+ | ------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------ |
949
+ | <a id="dependency-known-vulnerability"></a>[`dependency-known-vulnerability`](docs/rules/security/dependency-known-vulnerability.md) | medium | A resolved dependency version is listed in a published vulnerability advisory. |
945
950
 
946
951
  <!-- loadwise:rules:end -->
947
952
 
@@ -963,17 +968,21 @@ npx loadwise a11y --fix --only <id> # apply one generated fix
963
968
 
964
969
  <!-- loadwise:rules:start checker=accessibility group=rules -->
965
970
 
966
- | Rule | Impact | What it flags |
967
- | --------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
968
- | <a id="a11y-button-missing-type"></a>[`a11y-button-missing-type`](docs/rules/a11y-button-missing-type.md) | medium | A button inside a form has no type, so it submits the form even when it only meant to run a handler. |
969
- | <a id="a11y-clickable-non-interactive"></a>[`a11y-clickable-non-interactive`](docs/rules/a11y-clickable-non-interactive.md) | high | A click handler sits on a non-interactive element without a role and keyboard support, so keyboard users cannot activate it. |
970
- | <a id="a11y-html-missing-lang"></a>[`a11y-html-missing-lang`](docs/rules/a11y-html-missing-lang.md) | medium | The html element has no lang attribute, so screen readers guess the pronunciation. |
971
- | <a id="a11y-iframe-missing-title"></a>[`a11y-iframe-missing-title`](docs/rules/a11y-iframe-missing-title.md) | medium | An iframe has no title, so screen readers cannot say what it contains. |
972
- | <a id="a11y-img-missing-alt"></a>[`a11y-img-missing-alt`](docs/rules/a11y-img-missing-alt.md) | high | An image has no alt text, so screen readers announce its file name or nothing. |
973
- | <a id="a11y-invalid-aria"></a>[`a11y-invalid-aria`](docs/rules/a11y-invalid-aria.md) | high | An ARIA attribute or role is misspelled or invalid, so assistive technology ignores it. |
974
- | <a id="a11y-missing-form-label"></a>[`a11y-missing-form-label`](docs/rules/a11y-missing-form-label.md) | high | A form control has no label, so screen readers announce it without its purpose. |
975
- | <a id="a11y-positive-tabindex"></a>[`a11y-positive-tabindex`](docs/rules/a11y-positive-tabindex.md) | medium | A positive tabindex reorders keyboard focus away from the visual order. |
976
- | <a id="a11y-viewport-zoom-disabled"></a>[`a11y-viewport-zoom-disabled`](docs/rules/a11y-viewport-zoom-disabled.md) | high | The viewport meta tag disables zoom, so people with low vision cannot enlarge the page. |
971
+ | Rule | Impact | What it flags |
972
+ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
973
+ | <a id="a11y-button-missing-type"></a>[`a11y-button-missing-type`](docs/rules/accessibility/a11y-button-missing-type.md) | medium | A button associated with a form has a click handler but no explicit type, so clicking it can also submit the form. |
974
+ | <a id="a11y-clickable-non-interactive"></a>[`a11y-clickable-non-interactive`](docs/rules/accessibility/a11y-clickable-non-interactive.md) | high | A click handler sits on a non-interactive element without a role and keyboard support, so keyboard users cannot activate it. |
975
+ | <a id="a11y-heading-level-skipped"></a>[`a11y-heading-level-skipped`](docs/rules/accessibility/a11y-heading-level-skipped.md) | low | A heading jumps more than one level down, which leaves a gap in the page outline. |
976
+ | <a id="a11y-html-missing-lang"></a>[`a11y-html-missing-lang`](docs/rules/accessibility/a11y-html-missing-lang.md) | medium | The html element has no lang attribute, so screen readers guess the pronunciation. |
977
+ | <a id="a11y-iframe-missing-title"></a>[`a11y-iframe-missing-title`](docs/rules/accessibility/a11y-iframe-missing-title.md) | medium | An iframe has no title, so screen readers cannot say what it contains. |
978
+ | <a id="a11y-img-missing-alt"></a>[`a11y-img-missing-alt`](docs/rules/accessibility/a11y-img-missing-alt.md) | high | An image has no alt text, so screen readers announce its file name or nothing. |
979
+ | <a id="a11y-input-missing-autocomplete"></a>[`a11y-input-missing-autocomplete`](docs/rules/accessibility/a11y-input-missing-autocomplete.md) | low | An input for personal data has no autocomplete, so browsers cannot fill it in for people who find typing hard. |
980
+ | <a id="a11y-invalid-aria"></a>[`a11y-invalid-aria`](docs/rules/accessibility/a11y-invalid-aria.md) | high | An ARIA attribute or role is misspelled or invalid, so assistive technology ignores it. |
981
+ | <a id="a11y-link-text-not-descriptive"></a>[`a11y-link-text-not-descriptive`](docs/rules/accessibility/a11y-link-text-not-descriptive.md) | medium | A link says only "click here" or "read more", so it means nothing out of context. |
982
+ | <a id="a11y-media-autoplay"></a>[`a11y-media-autoplay`](docs/rules/accessibility/a11y-media-autoplay.md) | medium | A video or audio element plays on its own with sound, so it talks over screen readers. |
983
+ | <a id="a11y-missing-form-label"></a>[`a11y-missing-form-label`](docs/rules/accessibility/a11y-missing-form-label.md) | high | A form control has no label, so screen readers announce it without its purpose. |
984
+ | <a id="a11y-positive-tabindex"></a>[`a11y-positive-tabindex`](docs/rules/accessibility/a11y-positive-tabindex.md) | medium | A positive tabindex reorders keyboard focus away from the visual order. |
985
+ | <a id="a11y-viewport-zoom-disabled"></a>[`a11y-viewport-zoom-disabled`](docs/rules/accessibility/a11y-viewport-zoom-disabled.md) | high | The viewport meta tag disables zoom, so people with low vision cannot enlarge the page. |
977
986
 
978
987
  <!-- loadwise:rules:end -->
979
988