loadwise 0.9.0 → 0.10.0

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 (155) hide show
  1. package/README.md +88 -19
  2. package/agent/hooks/check-edited-file.mjs +146 -28
  3. package/dist/bin/github-action.js +3 -74
  4. package/dist/bin/loadwise.js +12 -12
  5. package/dist/lib/accessibility/aria-tables.js +10 -6
  6. package/dist/lib/accessibility/document-reference-rules.js +13 -3
  7. package/dist/lib/accessibility/jsx-elements.js +34 -16
  8. package/dist/lib/accessibility/native-interactive.js +51 -13
  9. package/dist/lib/accessibility/rules.js +4 -2
  10. package/dist/lib/accessibility/site-fixes/aria-typo.js +65 -0
  11. package/dist/lib/accessibility/site-fixes/html-language.js +45 -9
  12. package/dist/lib/accessibility/template-elements.js +5 -3
  13. package/dist/lib/editor/actions.js +15 -9
  14. package/dist/lib/editor/diagnostics.js +110 -107
  15. package/dist/lib/editor/finding-comparison.js +4 -25
  16. package/dist/lib/editor/hover-markdown.js +104 -0
  17. package/dist/lib/editor/inline-fix.js +50 -0
  18. package/dist/lib/editor/inline-recommendation.js +27 -0
  19. package/dist/lib/editor/language-server.js +94 -18
  20. package/dist/lib/editor/scan-session.js +2 -1
  21. package/dist/lib/editor/standalone-performance-examples.js +48 -0
  22. package/dist/lib/maintainability/analysis/analyze-source.js +2 -0
  23. package/dist/lib/maintainability/architecture/architecture.js +50 -2
  24. package/dist/lib/maintainability/cli/inputs.js +12 -5
  25. package/dist/lib/maintainability/cli/site-fix.js +3 -0
  26. package/dist/lib/maintainability/cli.js +6 -3
  27. package/dist/lib/maintainability/examples.js +48 -0
  28. package/dist/lib/maintainability/quality/modern-node-callbacks.js +188 -0
  29. package/dist/lib/maintainability/quality/modern-syntax.js +301 -0
  30. package/dist/lib/maintainability/quality/tsconfig-strict.js +307 -15
  31. package/dist/lib/maintainability/rule-ids.js +18 -0
  32. package/dist/lib/maintainability/scan-changed.js +33 -2
  33. package/dist/lib/maintainability/scan.js +10 -1
  34. package/dist/lib/maintainability/site-fixes/unused-bindings.js +15 -6
  35. package/dist/lib/maintainability/unused/module-usage-signatures.js +116 -0
  36. package/dist/lib/maintainability/unused/module-usage.js +67 -106
  37. package/dist/lib/maintainability/unused/unused-bindings.js +143 -8
  38. package/dist/lib/maintainability/unused/unused-dependencies.js +218 -0
  39. package/dist/lib/maintainability/unused/unused-modules.js +4 -0
  40. package/dist/lib/performance/analysis/missing-packages.js +3 -0
  41. package/dist/lib/performance/analysis/source-text.js +2 -2
  42. package/dist/lib/performance/analyze.js +4 -1
  43. package/dist/lib/performance/async/floating-promises.js +25 -4
  44. package/dist/lib/performance/cli/cli-output.js +9 -3
  45. package/dist/lib/performance/cli/cli-policy.js +25 -2
  46. package/dist/lib/performance/cli/cli-scan.js +25 -24
  47. package/dist/lib/performance/cli/scan-outcome.js +19 -1
  48. package/dist/lib/performance/cli/shared-security-inputs.js +27 -0
  49. package/dist/lib/performance/cli/watch.js +27 -8
  50. package/dist/lib/performance/collections/collection-lookups.js +27 -10
  51. package/dist/lib/performance/collections/collection-reduce.js +32 -2
  52. package/dist/lib/performance/collections/collections.js +28 -0
  53. package/dist/lib/performance/collections/repeated.js +25 -1
  54. package/dist/lib/performance/contracts/cli.js +22 -11
  55. package/dist/lib/performance/contracts/git-files.js +46 -1
  56. package/dist/lib/performance/datastores/pooling.js +1 -17
  57. package/dist/lib/performance/datastores/postgres.js +41 -33
  58. package/dist/lib/performance/engine/native.js +5 -1
  59. package/dist/lib/performance/frontend/angular-template-calls.js +187 -0
  60. package/dist/lib/performance/frontend/frontend-dom-perf.js +68 -8
  61. package/dist/lib/performance/frontend/frontend-perf.js +115 -171
  62. package/dist/lib/performance/frontend/frontend-render-perf.js +7 -3
  63. package/dist/lib/performance/frontend/jsx-element-perf.js +171 -0
  64. package/dist/lib/performance/frontend/next-fetch-waterfall.js +346 -29
  65. package/dist/lib/performance/frontend/rxjs-subscriptions.js +155 -0
  66. package/dist/lib/performance/frontend/seo/client-fetched-content.js +196 -0
  67. package/dist/lib/performance/frontend/seo/navigation-without-link.js +116 -0
  68. package/dist/lib/performance/frontend/seo/next-routes.js +114 -0
  69. package/dist/lib/performance/frontend/seo/route-metadata.js +158 -0
  70. package/dist/lib/performance/frontend/seo/seo-rules.js +9 -0
  71. package/dist/lib/performance/frontend/seo/sitewide-noindex.js +103 -0
  72. package/dist/lib/performance/frontend/template-tracking.js +86 -2
  73. package/dist/lib/performance/frontend/vue-options-hooks.js +108 -0
  74. package/dist/lib/performance/orm/prisma.js +1 -25
  75. package/dist/lib/performance/projects.js +3 -2
  76. package/dist/lib/performance/query-loops/service-loops.js +38 -8
  77. package/dist/lib/performance/request/json-stringify-output.js +82 -4
  78. package/dist/lib/performance/request/promise-schedulers.js +180 -0
  79. package/dist/lib/performance/request/request-handlers.js +43 -4
  80. package/dist/lib/performance/request/unbounded-promise-all.js +13 -52
  81. package/dist/lib/performance/rule-ids.js +26 -2
  82. package/dist/lib/performance/site-fix.js +1 -0
  83. package/dist/lib/reliability/react-bugs.js +9 -0
  84. package/dist/lib/reliability/react-state-aliases.js +94 -4
  85. package/dist/lib/reliability/react-state.js +24 -5
  86. package/dist/lib/security/auth-crypto/secrets.js +121 -16
  87. package/dist/lib/security/cli.js +1 -1
  88. package/dist/lib/security/credential-entropy.js +12 -0
  89. package/dist/lib/security/deps/lockfiles.js +3 -1
  90. package/dist/lib/security/examples/files.js +110 -0
  91. package/dist/lib/security/examples/request-forgery.js +1 -1
  92. package/dist/lib/security/exposure/frontend-security.js +11 -2
  93. package/dist/lib/security/exposure/prototype-pollution.js +73 -4
  94. package/dist/lib/security/files/azure-pipelines.js +69 -0
  95. package/dist/lib/security/files/bitbucket-pipelines.js +32 -0
  96. package/dist/lib/security/files/ci-platforms.js +16 -0
  97. package/dist/lib/security/files/ci-shared.js +260 -0
  98. package/dist/lib/security/files/circleci.js +81 -0
  99. package/dist/lib/security/files/dockerfile.js +188 -3
  100. package/dist/lib/security/files/github-actions.js +490 -0
  101. package/dist/lib/security/files/gitlab-ci.js +90 -0
  102. package/dist/lib/security/files/hcl.js +264 -0
  103. package/dist/lib/security/files/hosting-config.js +159 -0
  104. package/dist/lib/security/files/http-headers.js +65 -0
  105. package/dist/lib/security/files/index.js +62 -7
  106. package/dist/lib/security/files/jenkinsfile.js +482 -0
  107. package/dist/lib/security/files/json-nodes.js +67 -0
  108. package/dist/lib/security/files/nginx.js +501 -0
  109. package/dist/lib/security/files/package-scripts.js +175 -0
  110. package/dist/lib/security/files/rule-ids.js +29 -0
  111. package/dist/lib/security/files/secret-values.js +31 -5
  112. package/dist/lib/security/files/secrets.js +44 -13
  113. package/dist/lib/security/files/terraform.js +345 -0
  114. package/dist/lib/security/injection/nosql.js +2 -1
  115. package/dist/lib/security/injection/sql.js +2 -2
  116. package/dist/lib/security/lexical-declaration.js +28 -0
  117. package/dist/lib/security/pg-identifier-guards.js +90 -1
  118. package/dist/lib/security/request-forgery/member-chain.js +41 -0
  119. package/dist/lib/security/request-forgery/open-redirect.js +45 -8
  120. package/dist/lib/security/request-forgery/shared.js +18 -3
  121. package/dist/lib/security/rule-descriptions.js +29 -0
  122. package/dist/lib/security/rule-ids.js +29 -0
  123. package/dist/lib/security/taint/original-string-validation.js +229 -0
  124. package/dist/lib/security/taint/validators.js +1 -1
  125. package/dist/lib/shared/agent/review-delivery.js +3 -1
  126. package/dist/lib/shared/analysis/ast-semantics.js +17 -1
  127. package/dist/lib/shared/analysis/hot-path-graph.js +55 -19
  128. package/dist/lib/shared/analysis/next-env-config.js +232 -0
  129. package/dist/lib/shared/analysis/scan-cache-git.js +114 -0
  130. package/dist/lib/shared/analysis/scan-cache-loadwise-packages.js +54 -0
  131. package/dist/lib/shared/analysis/scan-cache-project-inputs.js +221 -0
  132. package/dist/lib/shared/analysis/scan-cache-sources.js +235 -0
  133. package/dist/lib/shared/analysis/scan-cache-storage.js +24 -0
  134. package/dist/lib/shared/analysis/scan-cache.js +158 -174
  135. package/dist/lib/shared/check-watch.js +3 -3
  136. package/dist/lib/shared/check.js +25 -4
  137. package/dist/lib/shared/config.js +1 -1
  138. package/dist/lib/shared/conventional-projects.js +40 -0
  139. package/dist/lib/shared/fix/fix-command.js +2 -0
  140. package/dist/lib/shared/fix/fix-usage.js +47 -0
  141. package/dist/lib/shared/fix/project-file-access.js +43 -20
  142. package/dist/lib/shared/fix.js +4 -35
  143. package/dist/lib/shared/formats/security-cwe.js +29 -0
  144. package/dist/lib/shared/project-root.js +1 -1
  145. package/dist/lib/shared/reporting/action-comparison.js +78 -0
  146. package/dist/lib/shared/reporting/automatic-fix-signal.js +7 -2
  147. package/dist/lib/shared/reporting/check-text.js +7 -5
  148. package/dist/lib/shared/reporting/pillars.js +28 -8
  149. package/dist/lib/shared/reporting/source-report.js +4 -4
  150. package/dist/lib/shared/system/git.js +31 -16
  151. package/dist/lib/shared/system/glob.js +146 -19
  152. package/dist/lib/shared/system/terminal-style.js +2 -2
  153. package/dist/lib/shared/workspaces.js +6 -1
  154. package/package.json +4 -1
  155. package/schema/loadwise.config.schema.json +86 -0
package/README.md CHANGED
@@ -6,7 +6,9 @@
6
6
 
7
7
  [Quick Start](#quick-start) · [Checkers](#what-it-checks) · [Fixes](#how-fixes-work) · [Editors](#editors) · [AI Agents](#ai-coding-agents) · [GitHub Action](#github-action) · [Commands](#command-reference) · [Rule Reference](#full-rule--checker-reference)
8
8
 
9
- ![Loadwise 0.9.0 finds a repeated array lookup, previews and applies a Set-based fix, then checks again with zero findings](https://raw.githubusercontent.com/IbrahimHafez1/loadwise/refs/tags/v0.9.0/docs/assets/cli-workflow.gif)
9
+ ![Loadwise reports one performance finding and zero reliability findings, previews a Set-based fix, verifies zero findings after applying it, and exports 24 findings from a larger scan to HTML](https://raw.githubusercontent.com/IbrahimHafez1/loadwise/refs/heads/main/docs/assets/cli-workflow.gif)
10
+
11
+ _Recorded with the development build on `main` using two sample projects._
10
12
 
11
13
  Loadwise is a command-line checker for TypeScript and JavaScript projects. It reports performance, reliability, maintainability, security and accessibility problems, explains each one, and previews an edit when it can generate one. It runs locally with no config file, no API key and no network upload by default.
12
14
 
@@ -26,6 +28,12 @@ npx loadwise fix --apply # apply them
26
28
 
27
29
  To pin Loadwise to the project, run `npm install --save-dev loadwise`. Use `npx loadwise check --uncommitted` to scan only your local changes. Opt-in crash reporting stays off unless you run `npx loadwise --report-crashes check`, set `LOADWISE_CRASH_REPORTS=1` or configure a valid `LOADWISE_SENTRY_DSN`.
28
30
 
31
+ ### Findings that led to upstream fixes
32
+
33
+ - When Outline removed a group from a collection, it ran two database lookups per group member. Outline now loads the collection and its memberships once and fetches users in batches of 100. [Loadwise report](https://github.com/outline/outline/issues/14902) · [Merged fix](https://github.com/outline/outline/pull/14903)
34
+ - Outline's OAuth flow called `scryptSync` on the request path, blocking the Node.js event loop. The maintainer switched the session hash to HMAC, which uses high-entropy key material. [Loadwise report](https://github.com/outline/outline/issues/14899) · [Merged fix](https://github.com/outline/outline/pull/14901)
35
+ - With Node's `--unhandled-rejections=warn` setting, Playwright's CLI could exit with status 0 and no server endpoint when the config file was missing. Playwright independently reproduced the failure and merged a fix. [Case study and reproduction](https://loadwise.mintlify.app/case-studies/playwright-launch-server) · [Merged fix](https://github.com/microsoft/playwright/pull/44451)
36
+
29
37
  ### Example
30
38
 
31
39
  This file passes `tsc` and ESLint. Each `pool.query()` can run on a different connection, so `BEGIN`, `UPDATE` and `COMMIT` may not share one transaction:
@@ -76,6 +84,63 @@ npx loadwise perf loadwise-demo.ts --fix --only FINDING_ID
76
84
 
77
85
  Replace `FINDING_ID` with the id printed after `#` by the first scan, without the `#`, then delete `loadwise-demo.ts`. The [examples guide](https://github.com/IbrahimHafez1/loadwise/blob/main/examples/README.md) has an offline exercise and a clean control for each checker, plus a Python scan. In your own application, install dependencies and generate any ORM client (`npx prisma generate`) first, and read the stderr coverage notes for skipped inputs. Start with `--min-impact high` to triage large reports.
78
86
 
87
+ ### Why use it alongside an AI reviewer
88
+
89
+ An AI reviewer reads the diff and whatever context fits in its window. An expensive pattern often spans files: the loop is in the changed file, and the query is in a helper it imports. Loadwise loads the whole project with the TypeScript compiler and follows calls between files, so it reports the loop even when the diff never shows the query. Its findings are deterministic and come with a rule ID, location and fix, so an agent or a reviewer can check them and act on them.
90
+
91
+ In a project with `pg` and `@types/pg` installed, these two files each look fine on their own.
92
+
93
+ `orders.ts`:
94
+
95
+ ```ts
96
+ import type { Pool } from 'pg';
97
+
98
+ export async function loadOrder(pool: Pool, id: string) {
99
+ const result = await pool.query('SELECT id, total FROM orders WHERE id = $1', [id]);
100
+ return result.rows[0];
101
+ }
102
+ ```
103
+
104
+ `report.ts`:
105
+
106
+ ```ts
107
+ import type { Pool } from 'pg';
108
+ import { loadOrder } from './orders.js';
109
+
110
+ export async function buildReport(pool: Pool, ids: string[]) {
111
+ const orders = [];
112
+ for (const id of ids) orders.push(await loadOrder(pool, id));
113
+ return orders;
114
+ }
115
+ ```
116
+
117
+ ```text
118
+ $ npx loadwise check --only perf
119
+ Scope: . (all files)
120
+ Checkers: perf
121
+
122
+ == Performance ==
123
+ report.ts:6:43 [service-query-in-loop #683b1ea79177] high
124
+ Why: `loadOrder()` makes a database call per item (pool.query in orders.ts:4), so the loop pays a
125
+ round trip for every item it handles. Add a batch variant that takes all ids (one batched
126
+ query) and call it once outside the loop. Keep per-item validation, error isolation, ordering
127
+ and transaction needs.
128
+ Impact: N round trips estimated -> ~1 round trip estimated; method: query count model.
129
+ ...
130
+ ```
131
+
132
+ This finding has no generated edit, because the batch query is a design choice. This loop only reads, so only the batch read applies. Replace the helper with one query, and map the rows back by id so the report keeps the input order, repeated ids and `undefined` for a missing order:
133
+
134
+ ```ts
135
+ export async function loadOrders(pool: Pool, ids: string[]) {
136
+ const result = await pool.query('SELECT id, total FROM orders WHERE id = ANY($1)', [ids]);
137
+ const ordersById = new Map(result.rows.map((row) => [String(row.id), row]));
138
+ return ids.map((id) => ordersById.get(id));
139
+ }
140
+ ```
141
+
142
+ `buildReport` then returns `loadOrders(pool, ids)`, and the same scan reports `Performance: 2 files checked, 0 findings.`
143
+
79
144
  ## What it checks
80
145
 
81
146
  Loadwise is deepest on backend and database code, and also covers React, Next.js, Vue and Angular frontends. Each checker has its own command and a docs page.
@@ -244,23 +309,23 @@ Run it where `tsconfig.json` or `jsconfig.json` lives, pass `-p path/to/config.j
244
309
 
245
310
  <!-- loadwise:rules:start checker=performance group=source-checks -->
246
311
 
247
- <a id="angular-default-change-detection"></a>[`angular-default-change-detection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-default-change-detection.md) · <a id="angular-ngfor-missing-trackby"></a>[`angular-ngfor-missing-trackby`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-ngfor-missing-trackby.md) · <a id="angular-subscribe-without-cleanup"></a>[`angular-subscribe-without-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-subscribe-without-cleanup.md) · <a id="array-repeated-find"></a>[`array-repeated-find`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-repeated-find.md) · <a id="array-repeated-membership"></a>[`array-repeated-membership`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-repeated-membership.md) · <a id="array-shift-in-fifo-drain"></a>[`array-shift-in-fifo-drain`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-shift-in-fifo-drain.md) ·
312
+ <a id="angular-default-change-detection"></a>[`angular-default-change-detection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-default-change-detection.md) · <a id="angular-ngfor-missing-trackby"></a>[`angular-ngfor-missing-trackby`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-ngfor-missing-trackby.md) · <a id="angular-subscribe-without-cleanup"></a>[`angular-subscribe-without-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-subscribe-without-cleanup.md) · <a id="angular-template-method-call"></a>[`angular-template-method-call`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/angular-template-method-call.md) · <a id="array-repeated-find"></a>[`array-repeated-find`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-repeated-find.md) · <a id="array-repeated-membership"></a>[`array-repeated-membership`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-repeated-membership.md) · <a id="array-shift-in-fifo-drain"></a>[`array-shift-in-fifo-drain`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/array-shift-in-fifo-drain.md) ·
248
313
  <a id="dom-layout-thrashing"></a>[`dom-layout-thrashing`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/dom-layout-thrashing.md) · <a id="dom-listener-without-cleanup"></a>[`dom-listener-without-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/dom-listener-without-cleanup.md) · <a id="dom-unthrottled-scroll-resize"></a>[`dom-unthrottled-scroll-resize`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/dom-unthrottled-scroll-resize.md) ·
249
314
  <a id="express-missing-compression"></a>[`express-missing-compression`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/express-missing-compression.md) · <a id="external-call-in-transaction"></a>[`external-call-in-transaction`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/external-call-in-transaction.md) ·
250
- <a id="filter-for-existence"></a>[`filter-for-existence`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/filter-for-existence.md) · <a id="frontend-barrel-heavy-import"></a>[`frontend-barrel-heavy-import`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/frontend-barrel-heavy-import.md) ·
315
+ <a id="filter-for-existence"></a>[`filter-for-existence`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/filter-for-existence.md) · <a id="frontend-barrel-heavy-import"></a>[`frontend-barrel-heavy-import`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/frontend-barrel-heavy-import.md) · <a id="frontend-navigation-without-link"></a>[`frontend-navigation-without-link`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/frontend-navigation-without-link.md) · <a id="frontend-render-blocking-script"></a>[`frontend-render-blocking-script`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/frontend-render-blocking-script.md) ·
251
316
  <a id="graphql-n-plus-one-resolver"></a>[`graphql-n-plus-one-resolver`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/graphql-n-plus-one-resolver.md) ·
252
317
  <a id="heavy-media-in-request-handler"></a>[`heavy-media-in-request-handler`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/heavy-media-in-request-handler.md) ·
253
318
  <a id="js-fixed-regexp-in-loop"></a>[`js-fixed-regexp-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/js-fixed-regexp-in-loop.md) · <a id="json-roundtrip-clone"></a>[`json-roundtrip-clone`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/json-roundtrip-clone.md) · <a id="json-stringify-in-loop"></a>[`json-stringify-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/json-stringify-in-loop.md) ·
254
319
  <a id="list-count-per-request"></a>[`list-count-per-request`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/list-count-per-request.md) · <a id="list-query-overfetch"></a>[`list-query-overfetch`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/list-query-overfetch.md) · <a id="llm-call-without-max-tokens"></a>[`llm-call-without-max-tokens`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/llm-call-without-max-tokens.md) · <a id="loop-copy-accumulator"></a>[`loop-copy-accumulator`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/loop-copy-accumulator.md) ·
255
320
  <a id="mongoose-hydrate-for-to-object"></a>[`mongoose-hydrate-for-to-object`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/mongoose-hydrate-for-to-object.md) · <a id="mongoose-missing-lean"></a>[`mongoose-missing-lean`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/mongoose-missing-lean.md) ·
256
- <a id="node-event-listener-leak"></a>[`node-event-listener-leak`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-event-listener-leak.md) · <a id="node-sync-compression-in-async"></a>[`node-sync-compression-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-compression-in-async.md) · <a id="node-sync-crypto-in-async"></a>[`node-sync-crypto-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-crypto-in-async.md) · <a id="node-sync-fs-in-async"></a>[`node-sync-fs-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-fs-in-async.md) · <a id="node-sync-process-in-async"></a>[`node-sync-process-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-process-in-async.md) · <a id="notification-send-in-loop"></a>[`notification-send-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/notification-send-in-loop.md) ·
321
+ <a id="next-client-fetched-page-content"></a>[`next-client-fetched-page-content`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/next-client-fetched-page-content.md) · <a id="next-missing-route-metadata"></a>[`next-missing-route-metadata`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/next-missing-route-metadata.md) · <a id="next-sitewide-noindex"></a>[`next-sitewide-noindex`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/next-sitewide-noindex.md) · <a id="node-event-listener-leak"></a>[`node-event-listener-leak`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-event-listener-leak.md) · <a id="node-sync-compression-in-async"></a>[`node-sync-compression-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-compression-in-async.md) · <a id="node-sync-crypto-in-async"></a>[`node-sync-crypto-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-crypto-in-async.md) · <a id="node-sync-fs-in-async"></a>[`node-sync-fs-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-fs-in-async.md) · <a id="node-sync-process-in-async"></a>[`node-sync-process-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/node-sync-process-in-async.md) · <a id="notification-send-in-loop"></a>[`notification-send-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/notification-send-in-loop.md) ·
257
322
  <a id="orm-cartesian-include"></a>[`orm-cartesian-include`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/orm-cartesian-include.md) · <a id="orm-deep-offset"></a>[`orm-deep-offset`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/orm-deep-offset.md) ·
258
323
  <a id="password-hash-pure-js"></a>[`password-hash-pure-js`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/password-hash-pure-js.md) · <a id="password-hash-sync-in-async"></a>[`password-hash-sync-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/password-hash-sync-in-async.md) · <a id="pg-count-materialization"></a>[`pg-count-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-count-materialization.md) · <a id="pg-filter-materialization"></a>[`pg-filter-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-filter-materialization.md) · <a id="pg-first-materialization"></a>[`pg-first-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-first-materialization.md) · <a id="pg-query-in-loop"></a>[`pg-query-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-query-in-loop.md) · <a id="pg-top-k-materialization"></a>[`pg-top-k-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-top-k-materialization.md) · <a id="pg-unreleased-checkout"></a>[`pg-unreleased-checkout`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pg-unreleased-checkout.md) · <a id="pool-created-per-request-or-item"></a>[`pool-created-per-request-or-item`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/pool-created-per-request-or-item.md) · <a id="prisma-count-materialization"></a>[`prisma-count-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/prisma-count-materialization.md) · <a id="prisma-filter-materialization"></a>[`prisma-filter-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/prisma-filter-materialization.md) · <a id="prisma-first-materialization"></a>[`prisma-first-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/prisma-first-materialization.md) · <a id="prisma-query-in-loop"></a>[`prisma-query-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/prisma-query-in-loop.md) · <a id="prisma-top-k-materialization"></a>[`prisma-top-k-materialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/prisma-top-k-materialization.md) ·
259
324
  <a id="queue-add-in-loop"></a>[`queue-add-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/queue-add-in-loop.md) ·
260
- <a id="react-component-defined-in-component"></a>[`react-component-defined-in-component`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-component-defined-in-component.md) · <a id="react-context-value-recreated"></a>[`react-context-value-recreated`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-context-value-recreated.md) · <a id="react-fetch-in-effect-no-abort"></a>[`react-fetch-in-effect-no-abort`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-fetch-in-effect-no-abort.md) · <a id="react-index-as-key"></a>[`react-index-as-key`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-index-as-key.md) · <a id="react-inline-object-in-jsx-prop"></a>[`react-inline-object-in-jsx-prop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-inline-object-in-jsx-prop.md) · <a id="react-missing-cleanup"></a>[`react-missing-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-missing-cleanup.md) · <a id="rebuild-lookup-in-loop"></a>[`rebuild-lookup-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/rebuild-lookup-in-loop.md) · <a id="redis-command-in-loop"></a>[`redis-command-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/redis-command-in-loop.md) · <a id="redis-keys-command"></a>[`redis-keys-command`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/redis-keys-command.md) · <a id="reduce-copy-accumulator"></a>[`reduce-copy-accumulator`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/reduce-copy-accumulator.md) ·
325
+ <a id="react-component-defined-in-component"></a>[`react-component-defined-in-component`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-component-defined-in-component.md) · <a id="react-context-value-recreated"></a>[`react-context-value-recreated`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-context-value-recreated.md) · <a id="react-fetch-in-effect-no-abort"></a>[`react-fetch-in-effect-no-abort`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-fetch-in-effect-no-abort.md) · <a id="react-index-as-key"></a>[`react-index-as-key`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-index-as-key.md) · <a id="react-inline-object-in-jsx-prop"></a>[`react-inline-object-in-jsx-prop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-inline-object-in-jsx-prop.md) · <a id="react-missing-cleanup"></a>[`react-missing-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-missing-cleanup.md) · <a id="react-unthrottled-input-fetch"></a>[`react-unthrottled-input-fetch`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/react-unthrottled-input-fetch.md) · <a id="rebuild-lookup-in-loop"></a>[`rebuild-lookup-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/rebuild-lookup-in-loop.md) · <a id="redis-command-in-loop"></a>[`redis-command-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/redis-command-in-loop.md) · <a id="redis-keys-command"></a>[`redis-keys-command`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/redis-keys-command.md) · <a id="reduce-copy-accumulator"></a>[`reduce-copy-accumulator`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/reduce-copy-accumulator.md) ·
261
326
  <a id="sequential-http-in-loop"></a>[`sequential-http-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/sequential-http-in-loop.md) · <a id="serial-awaits-in-literal"></a>[`serial-awaits-in-literal`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/serial-awaits-in-literal.md) · <a id="service-query-in-loop"></a>[`service-query-in-loop`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/service-query-in-loop.md) · <a id="session-memory-store"></a>[`session-memory-store`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/session-memory-store.md) · <a id="sql-select-star-in-query"></a>[`sql-select-star-in-query`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/sql-select-star-in-query.md) ·
262
327
  <a id="unbounded-list-query"></a>[`unbounded-list-query`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/unbounded-list-query.md) · <a id="unbounded-module-cache"></a>[`unbounded-module-cache`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/unbounded-module-cache.md) ·
263
- <a id="vue-v-for-missing-key"></a>[`vue-v-for-missing-key`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/vue-v-for-missing-key.md) · <a id="vue-watch-missing-cleanup"></a>[`vue-watch-missing-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/vue-watch-missing-cleanup.md) ·
328
+ <a id="vue-v-for-missing-key"></a>[`vue-v-for-missing-key`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/vue-v-for-missing-key.md) · <a id="vue-v-if-with-v-for"></a>[`vue-v-if-with-v-for`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/vue-v-if-with-v-for.md) · <a id="vue-watch-missing-cleanup"></a>[`vue-watch-missing-cleanup`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/vue-watch-missing-cleanup.md) ·
264
329
  <a id="whole-payload-in-memory"></a>[`whole-payload-in-memory`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/performance/whole-payload-in-memory.md)
265
330
 
266
331
  <!-- loadwise:rules:end -->
@@ -438,16 +503,20 @@ npx loadwise rel migrations # new migrations fail; baselined
438
503
 
439
504
  <!-- loadwise:rules:start checker=maintainability group=what-gets-checked -->
440
505
 
506
+ <a id="arguments-object"></a>[`arguments-object`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/arguments-object.md) ·
441
507
  <a id="data-access-boundary"></a>[`data-access-boundary`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/data-access-boundary.md) · <a id="deep-control-flow"></a>[`deep-control-flow`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/deep-control-flow.md) · <a id="dependency-cycle"></a>[`dependency-cycle`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/dependency-cycle.md) · <a id="deprecated-node-api"></a>[`deprecated-node-api`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/deprecated-node-api.md) · <a id="double-type-assertion"></a>[`double-type-assertion`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/double-type-assertion.md) · <a id="duplicate-implementation"></a>[`duplicate-implementation`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/duplicate-implementation.md) ·
442
508
  <a id="explicit-any"></a>[`explicit-any`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/explicit-any.md) ·
443
509
  <a id="file-placement"></a>[`file-placement`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/file-placement.md) · <a id="focused-test-committed"></a>[`focused-test-committed`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/focused-test-committed.md) · <a id="folder-boundary"></a>[`folder-boundary`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/folder-boundary.md) ·
444
510
  <a id="high-branch-complexity"></a>[`high-branch-complexity`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/high-branch-complexity.md) ·
445
511
  <a id="large-class"></a>[`large-class`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/large-class.md) · <a id="large-module"></a>[`large-module`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/large-module.md) · <a id="long-parameter-list"></a>[`long-parameter-list`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/long-parameter-list.md) ·
512
+ <a id="node-callback-api"></a>[`node-callback-api`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/node-callback-api.md) ·
446
513
  <a id="python-interactive-debugger"></a>[`python-interactive-debugger`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/python-interactive-debugger.md) ·
447
514
  <a id="query-mutates-state"></a>[`query-mutates-state`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/query-mutates-state.md) ·
515
+ <a id="redundant-promise-wrapper"></a>[`redundant-promise-wrapper`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/redundant-promise-wrapper.md) ·
448
516
  <a id="stray-console"></a>[`stray-console`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/stray-console.md) ·
449
- <a id="ts-suppression-without-reason"></a>[`ts-suppression-without-reason`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/ts-suppression-without-reason.md) · <a id="tsconfig-strict-disabled"></a>[`tsconfig-strict-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/tsconfig-strict-disabled.md) ·
450
- <a id="unreferenced-file"></a>[`unreferenced-file`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unreferenced-file.md) · <a id="unsafe-wide-type"></a>[`unsafe-wide-type`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unsafe-wide-type.md) · <a id="unused-export"></a>[`unused-export`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-export.md) · <a id="unused-import"></a>[`unused-import`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-import.md) · <a id="unused-local-function"></a>[`unused-local-function`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-local-function.md) · <a id="unused-local-variable"></a>[`unused-local-variable`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-local-variable.md)
517
+ <a id="then-chain-in-async"></a>[`then-chain-in-async`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/then-chain-in-async.md) · <a id="ts-suppression-without-reason"></a>[`ts-suppression-without-reason`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/ts-suppression-without-reason.md) · <a id="tsconfig-strict-disabled"></a>[`tsconfig-strict-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/tsconfig-strict-disabled.md) ·
518
+ <a id="unreferenced-file"></a>[`unreferenced-file`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unreferenced-file.md) · <a id="unsafe-wide-type"></a>[`unsafe-wide-type`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unsafe-wide-type.md) · <a id="unused-dependency"></a>[`unused-dependency`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-dependency.md) · <a id="unused-export"></a>[`unused-export`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-export.md) · <a id="unused-import"></a>[`unused-import`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-import.md) · <a id="unused-local-function"></a>[`unused-local-function`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-local-function.md) · <a id="unused-local-variable"></a>[`unused-local-variable`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/unused-local-variable.md) ·
519
+ <a id="var-declaration"></a>[`var-declaration`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/maintainability/var-declaration.md)
451
520
 
452
521
  <!-- loadwise:rules:end -->
453
522
 
@@ -488,28 +557,28 @@ It accepts the source-check flags of `loadwise perf`, including `--format`, `--m
488
557
 
489
558
  <!-- loadwise:rules:start checker=security group=rules -->
490
559
 
491
- <a id="angular-bypass-security-trust"></a>[`angular-bypass-security-trust`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/angular-bypass-security-trust.md) · <a id="auth-route-without-rate-limit"></a>[`auth-route-without-rate-limit`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/auth-route-without-rate-limit.md) ·
492
- <a id="bcrypt-low-cost"></a>[`bcrypt-low-cost`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/bcrypt-low-cost.md) ·
493
- <a id="client-env-secret-exposed"></a>[`client-env-secret-exposed`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/client-env-secret-exposed.md) · <a id="code-injection"></a>[`code-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/code-injection.md) · <a id="command-injection"></a>[`command-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/command-injection.md) · <a id="committed-secret"></a>[`committed-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/committed-secret.md) · <a id="compose-hardcoded-secret"></a>[`compose-hardcoded-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/compose-hardcoded-secret.md) · <a id="cookie-missing-security-flags"></a>[`cookie-missing-security-flags`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cookie-missing-security-flags.md) · <a id="cors-credentials-any-origin"></a>[`cors-credentials-any-origin`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cors-credentials-any-origin.md) · <a id="cors-origin-regex-unanchored"></a>[`cors-origin-regex-unanchored`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cors-origin-regex-unanchored.md) ·
494
- <a id="database-error-in-response"></a>[`database-error-in-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/database-error-in-response.md) · <a id="discarded-signature-verification-result"></a>[`discarded-signature-verification-result`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/discarded-signature-verification-result.md) · <a id="dockerfile-add-remote-url"></a>[`dockerfile-add-remote-url`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-add-remote-url.md) · <a id="dockerfile-runs-as-root"></a>[`dockerfile-runs-as-root`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-runs-as-root.md) · <a id="dockerfile-secret-in-build"></a>[`dockerfile-secret-in-build`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-secret-in-build.md) · <a id="dockerfile-unpinned-base-image"></a>[`dockerfile-unpinned-base-image`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-unpinned-base-image.md) · <a id="dom-xss-sink"></a>[`dom-xss-sink`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dom-xss-sink.md) · <a id="drizzle-scope-unverified"></a>[`drizzle-scope-unverified`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/drizzle-scope-unverified.md) · <a id="drizzle-sql-raw-dynamic"></a>[`drizzle-sql-raw-dynamic`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/drizzle-sql-raw-dynamic.md) ·
560
+ <a id="angular-bypass-security-trust"></a>[`angular-bypass-security-trust`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/angular-bypass-security-trust.md) · <a id="auth-route-without-rate-limit"></a>[`auth-route-without-rate-limit`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/auth-route-without-rate-limit.md) · <a id="azure-pipelines-script-injection"></a>[`azure-pipelines-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/azure-pipelines-script-injection.md) ·
561
+ <a id="bcrypt-low-cost"></a>[`bcrypt-low-cost`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/bcrypt-low-cost.md) · <a id="bitbucket-pipelines-script-injection"></a>[`bitbucket-pipelines-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/bitbucket-pipelines-script-injection.md) · <a id="bitbucket-pipelines-unpinned-image"></a>[`bitbucket-pipelines-unpinned-image`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/bitbucket-pipelines-unpinned-image.md) ·
562
+ <a id="circleci-script-injection"></a>[`circleci-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/circleci-script-injection.md) · <a id="circleci-unpinned-image"></a>[`circleci-unpinned-image`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/circleci-unpinned-image.md) · <a id="circleci-unpinned-orb"></a>[`circleci-unpinned-orb`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/circleci-unpinned-orb.md) · <a id="client-env-secret-exposed"></a>[`client-env-secret-exposed`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/client-env-secret-exposed.md) · <a id="code-injection"></a>[`code-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/code-injection.md) · <a id="command-injection"></a>[`command-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/command-injection.md) · <a id="committed-secret"></a>[`committed-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/committed-secret.md) · <a id="compose-hardcoded-secret"></a>[`compose-hardcoded-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/compose-hardcoded-secret.md) · <a id="config-cors-credentials-any-origin"></a>[`config-cors-credentials-any-origin`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/config-cors-credentials-any-origin.md) · <a id="config-unsafe-security-header"></a>[`config-unsafe-security-header`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/config-unsafe-security-header.md) · <a id="cookie-missing-security-flags"></a>[`cookie-missing-security-flags`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cookie-missing-security-flags.md) · <a id="cors-credentials-any-origin"></a>[`cors-credentials-any-origin`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cors-credentials-any-origin.md) · <a id="cors-origin-regex-unanchored"></a>[`cors-origin-regex-unanchored`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/cors-origin-regex-unanchored.md) ·
563
+ <a id="database-error-in-response"></a>[`database-error-in-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/database-error-in-response.md) · <a id="discarded-signature-verification-result"></a>[`discarded-signature-verification-result`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/discarded-signature-verification-result.md) · <a id="dockerfile-add-remote-url"></a>[`dockerfile-add-remote-url`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-add-remote-url.md) · <a id="dockerfile-npm-install"></a>[`dockerfile-npm-install`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-npm-install.md) · <a id="dockerfile-runs-as-root"></a>[`dockerfile-runs-as-root`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-runs-as-root.md) · <a id="dockerfile-secret-in-build"></a>[`dockerfile-secret-in-build`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-secret-in-build.md) · <a id="dockerfile-unpinned-base-image"></a>[`dockerfile-unpinned-base-image`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dockerfile-unpinned-base-image.md) · <a id="dom-xss-sink"></a>[`dom-xss-sink`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/dom-xss-sink.md) · <a id="drizzle-scope-unverified"></a>[`drizzle-scope-unverified`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/drizzle-scope-unverified.md) · <a id="drizzle-sql-raw-dynamic"></a>[`drizzle-sql-raw-dynamic`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/drizzle-sql-raw-dynamic.md) ·
495
564
  <a id="error-stack-in-response"></a>[`error-stack-in-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/error-stack-in-response.md) · <a id="escape-replace-incomplete"></a>[`escape-replace-incomplete`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/escape-replace-incomplete.md) · <a id="express-cookie-auth-missing-csrf"></a>[`express-cookie-auth-missing-csrf`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/express-cookie-auth-missing-csrf.md) · <a id="express-missing-helmet"></a>[`express-missing-helmet`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/express-missing-helmet.md) ·
496
565
  <a id="frontend-storage-secret-token"></a>[`frontend-storage-secret-token`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/frontend-storage-secret-token.md) ·
497
- <a id="graphql-batching-unbounded"></a>[`graphql-batching-unbounded`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-batching-unbounded.md) · <a id="graphql-introspection-enabled"></a>[`graphql-introspection-enabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-introspection-enabled.md) · <a id="graphql-query-depth-unbounded"></a>[`graphql-query-depth-unbounded`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-query-depth-unbounded.md) ·
498
- <a id="hardcoded-secret"></a>[`hardcoded-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/hardcoded-secret.md) ·
566
+ <a id="github-actions-pull-request-target-checkout"></a>[`github-actions-pull-request-target-checkout`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/github-actions-pull-request-target-checkout.md) · <a id="github-actions-script-injection"></a>[`github-actions-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/github-actions-script-injection.md) · <a id="github-actions-unpinned-action"></a>[`github-actions-unpinned-action`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/github-actions-unpinned-action.md) · <a id="gitlab-ci-script-injection"></a>[`gitlab-ci-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/gitlab-ci-script-injection.md) · <a id="gitlab-ci-unpinned-image"></a>[`gitlab-ci-unpinned-image`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/gitlab-ci-unpinned-image.md) · <a id="gitlab-ci-unpinned-include"></a>[`gitlab-ci-unpinned-include`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/gitlab-ci-unpinned-include.md) · <a id="graphql-batching-unbounded"></a>[`graphql-batching-unbounded`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-batching-unbounded.md) · <a id="graphql-introspection-enabled"></a>[`graphql-introspection-enabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-introspection-enabled.md) · <a id="graphql-query-depth-unbounded"></a>[`graphql-query-depth-unbounded`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/graphql-query-depth-unbounded.md) ·
567
+ <a id="hardcoded-secret"></a>[`hardcoded-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/hardcoded-secret.md) · <a id="hosting-redirect-external-wildcard"></a>[`hosting-redirect-external-wildcard`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/hosting-redirect-external-wildcard.md) ·
499
568
  <a id="insecure-cipher"></a>[`insecure-cipher`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/insecure-cipher.md) · <a id="insecure-deserialization"></a>[`insecure-deserialization`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/insecure-deserialization.md) · <a id="insecure-random-for-secret"></a>[`insecure-random-for-secret`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/insecure-random-for-secret.md) ·
500
- <a id="js-yaml-unsafe-schema"></a>[`js-yaml-unsafe-schema`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/js-yaml-unsafe-schema.md) · <a id="jsx-javascript-url"></a>[`jsx-javascript-url`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jsx-javascript-url.md) · <a id="jwt-decode-for-auth"></a>[`jwt-decode-for-auth`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-decode-for-auth.md) · <a id="jwt-none-algorithm"></a>[`jwt-none-algorithm`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-none-algorithm.md) · <a id="jwt-sign-without-expiry"></a>[`jwt-sign-without-expiry`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-sign-without-expiry.md) · <a id="jwt-verify-without-algorithms"></a>[`jwt-verify-without-algorithms`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-verify-without-algorithms.md) · <a id="jwt-weak-secret-literal"></a>[`jwt-weak-secret-literal`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-weak-secret-literal.md) ·
569
+ <a id="jenkinsfile-credential-interpolation"></a>[`jenkinsfile-credential-interpolation`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jenkinsfile-credential-interpolation.md) · <a id="jenkinsfile-script-injection"></a>[`jenkinsfile-script-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jenkinsfile-script-injection.md) · <a id="js-yaml-unsafe-schema"></a>[`js-yaml-unsafe-schema`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/js-yaml-unsafe-schema.md) · <a id="jsx-javascript-url"></a>[`jsx-javascript-url`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jsx-javascript-url.md) · <a id="jwt-decode-for-auth"></a>[`jwt-decode-for-auth`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-decode-for-auth.md) · <a id="jwt-none-algorithm"></a>[`jwt-none-algorithm`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-none-algorithm.md) · <a id="jwt-sign-without-expiry"></a>[`jwt-sign-without-expiry`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-sign-without-expiry.md) · <a id="jwt-verify-without-algorithms"></a>[`jwt-verify-without-algorithms`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-verify-without-algorithms.md) · <a id="jwt-weak-secret-literal"></a>[`jwt-weak-secret-literal`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/jwt-weak-secret-literal.md) ·
501
570
  <a id="knex-raw-dynamic-text"></a>[`knex-raw-dynamic-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/knex-raw-dynamic-text.md) · <a id="kubernetes-privileged-container"></a>[`kubernetes-privileged-container`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/kubernetes-privileged-container.md) · <a id="kysely-scope-unverified"></a>[`kysely-scope-unverified`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/kysely-scope-unverified.md) ·
502
571
  <a id="ldap-filter-injection"></a>[`ldap-filter-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/ldap-filter-injection.md) ·
503
572
  <a id="mass-assignment"></a>[`mass-assignment`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/mass-assignment.md) · <a id="mysql-dynamic-query-text"></a>[`mysql-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/mysql-dynamic-query-text.md) ·
504
- <a id="nest-validation-without-whitelist"></a>[`nest-validation-without-whitelist`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/nest-validation-without-whitelist.md) · <a id="next-image-any-remote-host"></a>[`next-image-any-remote-host`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/next-image-any-remote-host.md) · <a id="nosql-operator-injection"></a>[`nosql-operator-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/nosql-operator-injection.md) ·
573
+ <a id="nest-validation-without-whitelist"></a>[`nest-validation-without-whitelist`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/nest-validation-without-whitelist.md) · <a id="next-image-any-remote-host"></a>[`next-image-any-remote-host`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/next-image-any-remote-host.md) · <a id="nginx-proxy-pass-request-host"></a>[`nginx-proxy-pass-request-host`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/nginx-proxy-pass-request-host.md) · <a id="nosql-operator-injection"></a>[`nosql-operator-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/nosql-operator-injection.md) ·
505
574
  <a id="open-redirect"></a>[`open-redirect`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/open-redirect.md) ·
506
- <a id="password-hash-in-response"></a>[`password-hash-in-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/password-hash-in-response.md) · <a id="path-traversal"></a>[`path-traversal`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/path-traversal.md) · <a id="pg-dynamic-query-text"></a>[`pg-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/pg-dynamic-query-text.md) · <a id="plaintext-password-storage"></a>[`plaintext-password-storage`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/plaintext-password-storage.md) · <a id="postmessage-missing-origin-check"></a>[`postmessage-missing-origin-check`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/postmessage-missing-origin-check.md) · <a id="prisma-raw-unsafe-dynamic"></a>[`prisma-raw-unsafe-dynamic`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prisma-raw-unsafe-dynamic.md) · <a id="prisma-scope-unverified"></a>[`prisma-scope-unverified`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prisma-scope-unverified.md) · <a id="prototype-pollution"></a>[`prototype-pollution`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prototype-pollution.md) ·
575
+ <a id="package-script-remote-code"></a>[`package-script-remote-code`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/package-script-remote-code.md) · <a id="package-script-tls-verification-disabled"></a>[`package-script-tls-verification-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/package-script-tls-verification-disabled.md) · <a id="password-hash-in-response"></a>[`password-hash-in-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/password-hash-in-response.md) · <a id="path-traversal"></a>[`path-traversal`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/path-traversal.md) · <a id="pg-dynamic-query-text"></a>[`pg-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/pg-dynamic-query-text.md) · <a id="plaintext-password-storage"></a>[`plaintext-password-storage`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/plaintext-password-storage.md) · <a id="postmessage-missing-origin-check"></a>[`postmessage-missing-origin-check`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/postmessage-missing-origin-check.md) · <a id="prisma-raw-unsafe-dynamic"></a>[`prisma-raw-unsafe-dynamic`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prisma-raw-unsafe-dynamic.md) · <a id="prisma-scope-unverified"></a>[`prisma-scope-unverified`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prisma-scope-unverified.md) · <a id="prototype-pollution"></a>[`prototype-pollution`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/prototype-pollution.md) ·
507
576
  <a id="raw-content-disposition-filename"></a>[`raw-content-disposition-filename`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/raw-content-disposition-filename.md) · <a id="react-dangerously-set-inner-html"></a>[`react-dangerously-set-inner-html`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/react-dangerously-set-inner-html.md) · <a id="reflected-xss-response"></a>[`reflected-xss-response`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/reflected-xss-response.md) · <a id="regex-catastrophic-backtracking"></a>[`regex-catastrophic-backtracking`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/regex-catastrophic-backtracking.md) · <a id="regex-from-input"></a>[`regex-from-input`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/regex-from-input.md) · <a id="request-selected-executable"></a>[`request-selected-executable`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/request-selected-executable.md) ·
508
577
  <a id="secret-compared-non-constant-time"></a>[`secret-compared-non-constant-time`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/secret-compared-non-constant-time.md) · <a id="secret-in-log"></a>[`secret-in-log`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/secret-in-log.md) · <a id="secret-in-url-query"></a>[`secret-in-url-query`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/secret-in-url-query.md) · <a id="sequelize-dynamic-query-text"></a>[`sequelize-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/sequelize-dynamic-query-text.md) · <a id="server-action-missing-auth"></a>[`server-action-missing-auth`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/server-action-missing-auth.md) · <a id="ssrf-redirect-bypass"></a>[`ssrf-redirect-bypass`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/ssrf-redirect-bypass.md) · <a id="ssrf-request-url"></a>[`ssrf-request-url`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/ssrf-request-url.md) · <a id="storage-object-public-acl"></a>[`storage-object-public-acl`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/storage-object-public-acl.md) ·
509
- <a id="template-autoescape-disabled"></a>[`template-autoescape-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-autoescape-disabled.md) · <a id="template-injection"></a>[`template-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-injection.md) · <a id="template-raw-html-binding"></a>[`template-raw-html-binding`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-raw-html-binding.md) · <a id="tls-verification-disabled"></a>[`tls-verification-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/tls-verification-disabled.md) · <a id="trust-boundary-violation"></a>[`trust-boundary-violation`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/trust-boundary-violation.md) · <a id="typeorm-dynamic-query-text"></a>[`typeorm-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/typeorm-dynamic-query-text.md) ·
578
+ <a id="template-autoescape-disabled"></a>[`template-autoescape-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-autoescape-disabled.md) · <a id="template-injection"></a>[`template-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-injection.md) · <a id="template-raw-html-binding"></a>[`template-raw-html-binding`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/template-raw-html-binding.md) · <a id="terraform-admin-port-open-to-world"></a>[`terraform-admin-port-open-to-world`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/terraform-admin-port-open-to-world.md) · <a id="terraform-database-publicly-accessible"></a>[`terraform-database-publicly-accessible`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/terraform-database-publicly-accessible.md) · <a id="terraform-hardcoded-credential"></a>[`terraform-hardcoded-credential`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/terraform-hardcoded-credential.md) · <a id="terraform-storage-bucket-public"></a>[`terraform-storage-bucket-public`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/terraform-storage-bucket-public.md) · <a id="terraform-storage-encryption-disabled"></a>[`terraform-storage-encryption-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/terraform-storage-encryption-disabled.md) · <a id="tls-verification-disabled"></a>[`tls-verification-disabled`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/tls-verification-disabled.md) · <a id="trust-boundary-violation"></a>[`trust-boundary-violation`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/trust-boundary-violation.md) · <a id="typeorm-dynamic-query-text"></a>[`typeorm-dynamic-query-text`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/typeorm-dynamic-query-text.md) ·
510
579
  <a id="upload-client-filename"></a>[`upload-client-filename`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/upload-client-filename.md) ·
511
580
  <a id="vm-sandbox-escape"></a>[`vm-sandbox-escape`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/vm-sandbox-escape.md) · <a id="vue-v-html-unsanitized"></a>[`vue-v-html-unsanitized`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/vue-v-html-unsanitized.md) ·
512
- <a id="weak-hash"></a>[`weak-hash`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/weak-hash.md) · <a id="weak-password-hash"></a>[`weak-password-hash`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/weak-password-hash.md) · <a id="webhook-body-without-verification"></a>[`webhook-body-without-verification`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/webhook-body-without-verification.md) ·
581
+ <a id="weak-hash"></a>[`weak-hash`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/weak-hash.md) · <a id="weak-password-hash"></a>[`weak-password-hash`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/weak-password-hash.md) · <a id="web-server-directory-listing"></a>[`web-server-directory-listing`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/web-server-directory-listing.md) · <a id="web-server-legacy-tls"></a>[`web-server-legacy-tls`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/web-server-legacy-tls.md) · <a id="web-server-version-exposed"></a>[`web-server-version-exposed`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/web-server-version-exposed.md) · <a id="webhook-body-without-verification"></a>[`webhook-body-without-verification`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/webhook-body-without-verification.md) ·
513
582
  <a id="xml-external-entities"></a>[`xml-external-entities`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/xml-external-entities.md) · <a id="xpath-injection"></a>[`xpath-injection`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/xpath-injection.md) ·
514
583
  <a id="zip-slip-extraction"></a>[`zip-slip-extraction`](https://github.com/IbrahimHafez1/loadwise/blob/main/docs/rules/security/zip-slip-extraction.md)
515
584
 
@@ -1,7 +1,7 @@
1
1
  // After-edit hook for AI coding agents: runs the project's local loadwise on the files the agent just edited.
2
2
  // `node check-edited-file.mjs [claude|gemini|codex|copilot|cursor|devin|cline-cli|cline]` selects the tool's payload and response format.
3
3
  // The hook exits 0 on checker failures and emits diagnostics only when enabled.
4
- import { createHash } from 'node:crypto';
4
+ import { createHash, randomUUID } from 'node:crypto';
5
5
  import fs from 'node:fs';
6
6
  import os from 'node:os';
7
7
  import path from 'node:path';
@@ -35,8 +35,10 @@ const WINDOWS_TREE_KILL_TIMEOUT_MS = 500;
35
35
  // window for identical file content is skipped. LOADWISE_HOOK_DEDUPE_MS=0 turns it off.
36
36
  const DEFAULT_DEDUPE_WINDOW_MS = 10_000;
37
37
  const MARKER_RETENTION_MS = 60_000;
38
- // Copilot caps `additionalContext` at 10 KB.
39
- const COPILOT_CONTEXT_BYTES = 10_000;
38
+ const REPORT_RETENTION_MS = 24 * 60 * 60 * 1000;
39
+ const REPORT_NAME = /^feedback-[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}\.txt$/;
40
+ // Copilot caps `additionalContext` at 10 KB; use the same conservative budget where no limit is known.
41
+ const DEFAULT_CONTEXT_BYTES = 10_000;
40
42
  // Cline caps hook context at 50,000 characters.
41
43
  const CLINE_CONTEXT_CHARACTERS = 50_000;
42
44
  // Cline reports every tool; only tools that change files are checked.
@@ -255,7 +257,7 @@ async function runLoadwise(binary, args, cwd, { deadline, wavesRemaining, hasPen
255
257
  else if (code !== 0 && code !== 1) diagnostic('returned incomplete coverage', checker);
256
258
  else if (code === 0 && provesCleanFile(checker, report)) diagnostic('completed clean scan', checker);
257
259
  }
258
- resolve({ report, canReuseWorker });
260
+ resolve({ report, canReuseWorker, outputLimitExceeded: size > MAX_OUTPUT_BYTES });
259
261
  });
260
262
  });
261
263
  }
@@ -298,6 +300,7 @@ function formatFeedback(projectRoot, relativeFile, findings) {
298
300
 
299
301
  async function checkFindings(local, relativeFile, deadline, checks) {
300
302
  const reports = [];
303
+ const oversizedChecks = [];
301
304
  const pending = checks.entries();
302
305
  const workers = Math.min(CONCURRENT_CHECKERS, checks.length);
303
306
  let started = 0;
@@ -308,21 +311,24 @@ async function checkFindings(local, relativeFile, deadline, checks) {
308
311
  if (interrupted) break;
309
312
  const wavesRemaining = Math.ceil((checks.length - index) / workers);
310
313
  started++;
311
- const { report, canReuseWorker } = await runLoadwise(local.binary, [...args, '--json'], local.projectRoot, {
312
- deadline,
313
- wavesRemaining,
314
- hasPendingChecks,
315
- }).catch(() => {
314
+ const { report, canReuseWorker, outputLimitExceeded } = await runLoadwise(
315
+ local.binary,
316
+ [...args, '--json'],
317
+ local.projectRoot,
318
+ { deadline, wavesRemaining, hasPendingChecks },
319
+ ).catch(() => {
316
320
  diagnostic('could not start', args[0]);
317
- return { report: null, canReuseWorker: true };
321
+ return { report: null, canReuseWorker: true, outputLimitExceeded: false };
318
322
  });
319
323
  reports[index] = findingsFor(report, local.projectRoot, relativeFile, fixCommand);
324
+ if (outputLimitExceeded) oversizedChecks[index] = args[0];
320
325
  // An unconfirmed polyglot stop can leave its native scanner active.
321
326
  if (!canReuseWorker && args[1] === 'polyglot') break;
322
327
  }
323
328
  }),
324
329
  );
325
- return interrupted ? [] : reports.flat();
330
+ if (interrupted) return { findings: [], oversizedChecks: [] };
331
+ return { findings: reports.flat(), oversizedChecks: [...new Set(oversizedChecks.filter(Boolean))] };
326
332
  }
327
333
 
328
334
  function hasInlineTemplate(filename) {
@@ -385,18 +391,113 @@ function editedPath(toolInput) {
385
391
  return toolInput?.file_path ?? toolInput?.path ?? toolInput?.filePath ?? toolInput?.target_file;
386
392
  }
387
393
 
388
- const TRUNCATION_NOTE = '\n[truncated]';
394
+ const feedbackSeparator = '\n\n';
389
395
 
390
- // The result, notes included, fits in `maxBytes`.
391
- function truncateUtf8(text, maxBytes) {
392
- if (Buffer.byteLength(text) <= maxBytes) return text;
393
- const kept = Buffer.from(text).subarray(0, maxBytes - Buffer.byteLength(TRUNCATION_NOTE));
394
- return kept.toString('utf8').replace(/\uFFFD+$/, '') + TRUNCATION_NOTE;
396
+ function fitsContext(sections, characterLimit) {
397
+ const limit = characterLimit ?? DEFAULT_CONTEXT_BYTES;
398
+ let length = -feedbackSeparator.length;
399
+ for (const section of sections) {
400
+ length += feedbackSeparator.length + (characterLimit === undefined ? Buffer.byteLength(section) : section.length);
401
+ if (length > limit) return false;
402
+ }
403
+ return true;
404
+ }
405
+
406
+ function reportBase(cwd) {
407
+ const temporary = os.tmpdir();
408
+ if (!path.isAbsolute(temporary)) return;
409
+ const base = fs.realpathSync.native(temporary);
410
+ const owner = typeof process.getuid === 'function' ? process.getuid() : os.userInfo().username;
411
+ const directory = path.join(base, `loadwise-hook-reports-${String(owner).replaceAll(/[^\w.-]/g, '_')}`);
412
+ const workspace = fs.realpathSync.native(cwd);
413
+ const project = findRepositoryRoot(workspace) ?? findProjectBoundary(workspace);
414
+ const relativeToProject = path.relative(project, directory);
415
+ if (
416
+ !path.isAbsolute(relativeToProject) &&
417
+ relativeToProject !== '..' &&
418
+ !relativeToProject.startsWith('..' + path.sep)
419
+ )
420
+ return;
421
+ const info = fs.statSync(base);
422
+ if (!info.isDirectory()) return;
423
+ if (typeof process.getuid === 'function') {
424
+ if (info.uid !== process.getuid() && info.uid !== 0) return;
425
+ if (info.mode & 0o022 && !(info.mode & 0o1000)) return;
426
+ } else if (process.platform === 'win32') {
427
+ // Windows files inherit an ACL from the temporary directory, rather than honoring Unix modes.
428
+ const profile = fs.realpathSync.native(os.userInfo().homedir);
429
+ const relative = path.relative(profile, base);
430
+ if (!relative || relative === '..' || relative.startsWith('..' + path.sep) || path.isAbsolute(relative)) return;
431
+ }
432
+ return directory;
433
+ }
434
+
435
+ function privateReportDirectory(cwd, create = false) {
436
+ const directory = reportBase(cwd);
437
+ if (!directory) return;
438
+ if (create) fs.mkdirSync(directory, { recursive: true, mode: 0o700 });
439
+ const info = fs.lstatSync(directory, { throwIfNoEntry: false });
440
+ if (!info?.isDirectory()) return;
441
+ if (typeof process.getuid === 'function' && (info.uid !== process.getuid() || info.mode & 0o077)) return;
442
+ return directory;
395
443
  }
396
444
 
397
- function truncateCharacters(text, maxCharacters) {
398
- if (text.length <= maxCharacters) return text;
399
- return text.slice(0, maxCharacters - TRUNCATION_NOTE.length) + TRUNCATION_NOTE;
445
+ function removeExpiredReports(cwd) {
446
+ try {
447
+ const directory = privateReportDirectory(cwd);
448
+ if (!directory) return;
449
+ const cutoff = Date.now() - REPORT_RETENTION_MS;
450
+ for (const name of fs.readdirSync(directory)) {
451
+ if (!REPORT_NAME.test(name)) continue;
452
+ try {
453
+ const report = path.join(directory, name);
454
+ const info = fs.lstatSync(report);
455
+ if (info.isFile() && info.mtimeMs < cutoff) fs.unlinkSync(report);
456
+ } catch {
457
+ // Another hook or the user can remove a report during the sweep.
458
+ }
459
+ }
460
+ } catch {
461
+ // Disabling temporary storage must not prevent inline feedback.
462
+ }
463
+ }
464
+
465
+ function saveFullFeedback(sections, characterLimit, findingCount, incomplete, cwd) {
466
+ let report;
467
+ let createdReport = false;
468
+ try {
469
+ const directory = privateReportDirectory(cwd, true);
470
+ if (!directory) return;
471
+ report = path.join(directory, `feedback-${randomUUID()}.txt`);
472
+ const locator =
473
+ `Loadwise hook report: ${diagnosticData(report)}\nRead the entire report before reviewing the findings. It includes ${findingCount} finding(s) returned by the checks.` +
474
+ (incomplete ? ' Feedback is incomplete because a checker report exceeded the raw output limit.' : '');
475
+ if (!fitsContext([locator], characterLimit)) throw new Error('Report locator exceeds the hook context budget');
476
+ const descriptor = fs.openSync(report, 'wx', 0o600);
477
+ createdReport = true;
478
+ try {
479
+ for (const [index, section] of sections.entries()) {
480
+ if (index > 0) fs.writeFileSync(descriptor, feedbackSeparator);
481
+ fs.writeFileSync(descriptor, section);
482
+ }
483
+ } finally {
484
+ fs.closeSync(descriptor);
485
+ }
486
+ return locator;
487
+ } catch {
488
+ // A cleanup error must not hide the notice.
489
+ try {
490
+ if (createdReport) fs.unlinkSync(report);
491
+ } catch {}
492
+ }
493
+ }
494
+
495
+ function hookContext(sections, { characterLimit }, findingCount, incomplete, cwd) {
496
+ if (fitsContext(sections, characterLimit)) return sections.join(feedbackSeparator);
497
+ return (
498
+ saveFullFeedback(sections, characterLimit, findingCount, incomplete, cwd) ??
499
+ 'Loadwise feedback is incomplete: the full report could not be saved. Rerun the relevant Loadwise check for the edited files and review all findings.'
500
+ );
400
501
  }
401
502
 
402
503
  // Each agent tool sends its own hook payload and reads its own response shape. The checks and the feedback text
@@ -416,7 +517,7 @@ const adapters = {
416
517
  // https://docs.github.com/en/copilot/reference/hooks-reference (postToolUse)
417
518
  copilot: {
418
519
  editedFiles: (input) => [editedPath(parseToolInput(input?.toolArgs ?? input?.tool_input))],
419
- envelope: (feedback) => ({ additionalContext: truncateUtf8(feedback, COPILOT_CONTEXT_BYTES) }),
520
+ envelope: (feedback) => ({ additionalContext: feedback }),
420
521
  },
421
522
  // https://docs.grok.com/build/agents-window/hooks (postToolUse; its path key is undocumented)
422
523
  cursor: {
@@ -435,14 +536,16 @@ const adapters = {
435
536
  },
436
537
  // Cline CLI and SDK: https://github.com/cline/cline (sdk/examples/hooks/README.md)
437
538
  'cline-cli': {
539
+ characterLimit: CLINE_CONTEXT_CHARACTERS,
438
540
  editedFiles: (input) =>
439
541
  CLINE_EDIT_TOOL.test(String(input?.tool_result?.name))
440
542
  ? [editedPath(parseToolInput(input?.tool_result?.input))]
441
543
  : [],
442
- envelope: (feedback) => ({ context: truncateCharacters(feedback, CLINE_CONTEXT_CHARACTERS) }),
544
+ envelope: (feedback) => ({ context: feedback }),
443
545
  },
444
546
  // Cline VS Code extension: https://github.com/cline/cline (.clinerules/hooks/README.md)
445
547
  cline: {
548
+ characterLimit: CLINE_CONTEXT_CHARACTERS,
446
549
  editedFiles: (input) => {
447
550
  const call = input?.postToolUse;
448
551
  return CLINE_EDIT_TOOL.test(String(call?.tool ?? call?.toolName))
@@ -451,7 +554,7 @@ const adapters = {
451
554
  },
452
555
  envelope: (feedback) => ({
453
556
  cancel: false,
454
- contextModification: truncateCharacters(feedback, CLINE_CONTEXT_CHARACTERS),
557
+ contextModification: feedback,
455
558
  }),
456
559
  },
457
560
  // https://developers.openai.com/codex/hooks (PostToolUse)
@@ -599,21 +702,36 @@ async function main() {
599
702
  const input = JSON.parse(readStdin());
600
703
  if (await yieldsToNativeHook(mode, input)) return;
601
704
  const files = [...new Set(adapter.editedFiles(input).filter((file) => typeof file === 'string'))];
705
+ if (files.length) removeExpiredReports(input?.cwd ?? process.cwd());
602
706
  const deadline = hookDeadline();
707
+ const coverage = [];
603
708
  const feedback = [];
709
+ let findingCount = 0;
604
710
  for (const filePath of files) {
605
711
  if (interrupted) return;
606
712
  // One unreadable or vanished file must not drop the feedback for the others in a patch.
607
713
  try {
608
714
  if (!isCheckedFile(filePath) || isRepeatedEdit(filePath, input?.cwd)) continue;
609
715
  const result = await checkEditedFile(filePath, input?.cwd, deadline);
610
- if (result) feedback.push(formatFeedback(result.projectRoot, result.relativeFile, result.findings));
716
+ if (!result) continue;
717
+ if (result.oversizedChecks.length) {
718
+ const maxMiB = MAX_OUTPUT_BYTES / (1024 * 1024);
719
+ coverage.push(
720
+ `Loadwise feedback is incomplete for ${diagnosticData(result.relativeFile)}: ${result.oversizedChecks.join(', ')} exceeded the ${maxMiB} MiB checker report limit. Rerun the relevant Loadwise check and review the complete findings.`,
721
+ );
722
+ }
723
+ if (result.findings.length) {
724
+ findingCount += result.findings.length;
725
+ feedback.push(formatFeedback(result.projectRoot, result.relativeFile, result.findings));
726
+ }
611
727
  } catch {
612
728
  diagnostic('could not check the edited file');
613
729
  }
614
730
  }
615
- if (feedback.length === 0) return;
616
- const response = JSON.stringify(adapter.envelope(feedback.join('\n\n')));
731
+ const sections = [...coverage, ...feedback];
732
+ if (interrupted || sections.length === 0) return;
733
+ const context = hookContext(sections, adapter, findingCount, coverage.length > 0, input?.cwd ?? process.cwd());
734
+ const response = JSON.stringify(adapter.envelope(context));
617
735
  // Finish delivering findings before optional diagnostics can write to stderr.
618
736
  await new Promise((resolve) => process.stdout.write(response, resolve));
619
737
  }
@@ -666,8 +784,8 @@ async function checkEditedFile(filePath, cwd, deadline) {
666
784
  }
667
785
  if (isMigration) checks.push({ args: ['rel', 'migrations', safeRelativeFile] });
668
786
  if (isDockerfileEdit) checks.push({ args: ['sec', 'dockerfile', safeRelativeFile] });
669
- const findings = await checkFindings(local, relativeFile, deadline, checks);
670
- return findings.length ? { projectRoot: local.projectRoot, relativeFile, findings } : null;
787
+ const result = await checkFindings(local, relativeFile, deadline, checks);
788
+ return { projectRoot: local.projectRoot, relativeFile, ...result };
671
789
  }
672
790
 
673
791
  for (const signal of interruptionSignals) process.on(signal, interruptCheckers);