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.
- package/README.md +378 -369
- package/dist/bin/loadwise.js +104 -0
- package/dist/lib/accessibility/analyze.js +26 -0
- package/dist/lib/accessibility/angular-inline.js +43 -0
- package/dist/lib/accessibility/cli.js +11 -0
- package/dist/lib/accessibility/frontend-detect.js +99 -0
- package/dist/lib/accessibility/jsx-elements.js +196 -0
- package/dist/lib/accessibility/markup-files.js +41 -0
- package/dist/lib/accessibility/markup.js +34 -0
- package/dist/lib/accessibility/rule-ids.js +51 -0
- package/dist/lib/accessibility/rules.js +492 -0
- package/dist/lib/accessibility/template-attributes.js +148 -0
- package/dist/lib/accessibility/template-elements.js +451 -0
- package/dist/lib/accessibility/template-file.js +183 -0
- package/dist/lib/editor/accessibility-examples.js +112 -0
- package/dist/lib/editor/diagnostics.js +365 -0
- package/dist/lib/editor/dismissals.js +111 -0
- package/dist/lib/editor/language-server.js +437 -0
- package/dist/lib/editor/reliability-examples.js +151 -0
- package/dist/lib/editor/scan-session.js +334 -0
- package/dist/lib/editor/server-commands.js +232 -0
- package/dist/lib/editor/workspace-paths.js +22 -0
- package/dist/lib/maintainability/analysis/analyze-source.js +92 -0
- package/dist/lib/maintainability/analysis/snapshot-context.js +64 -0
- package/dist/lib/maintainability/analysis/source-facts.js +39 -0
- package/dist/lib/maintainability/analysis/walk.js +17 -0
- package/dist/lib/maintainability/architecture/architecture-nest.js +103 -0
- package/dist/lib/maintainability/architecture/architecture.js +482 -0
- package/dist/lib/maintainability/cli/apply-fix.js +85 -0
- package/dist/lib/maintainability/cli/changed-lines.js +135 -0
- package/dist/lib/maintainability/cli/changed-output.js +22 -0
- package/dist/lib/maintainability/cli/finding-ids.js +39 -0
- package/dist/lib/maintainability/cli/fix-cli.js +209 -0
- package/dist/lib/maintainability/cli/fix-text.js +11 -0
- package/dist/lib/maintainability/cli/git-inventory.js +116 -0
- package/dist/lib/maintainability/cli/inputs.js +234 -0
- package/dist/lib/maintainability/cli/review-directive.js +91 -0
- package/dist/lib/maintainability/cli/site-fix.js +221 -0
- package/dist/lib/maintainability/cli.js +411 -0
- package/dist/lib/maintainability/entry-points/config-entry-points.js +86 -0
- package/dist/lib/maintainability/entry-points/entry-points.js +603 -0
- package/dist/lib/maintainability/polyglot.js +174 -0
- package/dist/lib/maintainability/project.js +116 -0
- package/dist/lib/maintainability/quality/deprecated-apis.js +170 -0
- package/dist/lib/maintainability/quality/duplicates.js +326 -0
- package/dist/lib/maintainability/quality/functions.js +315 -0
- package/dist/lib/maintainability/quality/size-limits.js +95 -0
- package/dist/lib/maintainability/quality/stray-console.js +354 -0
- package/dist/lib/maintainability/quality/tsconfig-strict.js +74 -0
- package/dist/lib/maintainability/quality/type-safety-hygiene.js +562 -0
- package/dist/lib/maintainability/rule-ids.js +82 -0
- package/dist/lib/maintainability/scan-changed.js +72 -0
- package/dist/lib/maintainability/scan-worker.js +38 -0
- package/dist/lib/maintainability/scan.js +246 -0
- package/dist/lib/maintainability/site-fixes/branches.js +425 -0
- package/dist/lib/maintainability/site-fixes/control-flow.js +67 -0
- package/dist/lib/maintainability/site-fixes/deprecated-apis.js +230 -0
- package/dist/lib/maintainability/site-fixes/duplicate-arrows.js +345 -0
- package/dist/lib/maintainability/site-fixes/duplicate-edits.js +393 -0
- package/dist/lib/maintainability/site-fixes/duplicate-methods.js +414 -0
- package/dist/lib/maintainability/site-fixes/duplicate-module-style.js +90 -0
- package/dist/lib/maintainability/site-fixes/duplicates.js +126 -0
- package/dist/lib/maintainability/site-fixes/extract-block-measure.js +131 -0
- package/dist/lib/maintainability/site-fixes/extract-block.js +38 -0
- package/dist/lib/maintainability/site-fixes/parameters.js +460 -0
- package/dist/lib/maintainability/site-fixes/stray-console.js +21 -0
- package/dist/lib/maintainability/site-fixes/unused-bindings.js +180 -0
- package/dist/lib/maintainability/unused/ancestor-aliases.js +35 -0
- package/dist/lib/maintainability/unused/module-usage-dynamic.js +175 -0
- package/dist/lib/maintainability/unused/module-usage.js +574 -0
- package/dist/lib/maintainability/unused/unused-bindings.js +182 -0
- package/dist/lib/performance/analysis/call-syntax.js +27 -0
- package/dist/lib/performance/analysis/function-kinds.js +9 -0
- package/dist/lib/performance/analysis/missing-packages.js +116 -0
- package/dist/lib/performance/analysis/package-types.js +57 -0
- package/dist/lib/performance/analysis/review-context.js +422 -0
- package/dist/lib/performance/analysis/schema-tooling.js +191 -0
- package/dist/lib/performance/analysis/scope-evidence.js +137 -0
- package/dist/lib/performance/analysis/source-inputs.js +83 -0
- package/dist/lib/performance/analysis/source-options.js +103 -0
- package/dist/lib/performance/analysis/source-pillars.js +23 -0
- package/dist/lib/performance/analysis/source-text.js +59 -0
- package/dist/lib/performance/analysis/unscanned-javascript.js +76 -0
- package/dist/lib/performance/analyze.js +257 -0
- package/dist/lib/performance/async/async-errors.js +190 -0
- package/dist/lib/performance/async/await-before-early-exit.js +176 -0
- package/dist/lib/performance/async/awaits.js +70 -0
- package/dist/lib/performance/async/discarded-error-result.js +46 -0
- package/dist/lib/performance/async/floating-promises.js +261 -0
- package/dist/lib/performance/async/json-input-origin.js +250 -0
- package/dist/lib/performance/async/literal-awaits.js +190 -0
- package/dist/lib/performance/async/promise-return-escapes-catch.js +96 -0
- package/dist/lib/performance/async/retry-backoff.js +132 -0
- package/dist/lib/performance/async/return-in-finally.js +12 -0
- package/dist/lib/performance/async/return-newline.js +54 -0
- package/dist/lib/performance/async/stream-errors.js +493 -0
- package/dist/lib/performance/cli/changed-lines.js +141 -0
- package/dist/lib/performance/cli/cli-output.js +176 -0
- package/dist/lib/performance/cli/cli-policy.js +110 -0
- package/dist/lib/performance/cli/cli-scan.js +444 -0
- package/dist/lib/performance/cli/editor-signal.js +57 -0
- package/dist/lib/performance/cli/finding-ids.js +102 -0
- package/dist/lib/performance/cli/finding-text.js +117 -0
- package/dist/lib/performance/cli/fix-cli.js +216 -0
- package/dist/lib/performance/cli/scan-outcome.js +29 -0
- package/dist/lib/performance/cli/watch.js +99 -0
- package/dist/lib/performance/cli.js +101 -0
- package/dist/lib/performance/collections/collection-bindings.js +283 -0
- package/dist/lib/performance/collections/collection-bounds.js +247 -0
- package/dist/lib/performance/collections/collection-copy.js +169 -0
- package/dist/lib/performance/collections/collection-lookups.js +432 -0
- package/dist/lib/performance/collections/collection-reduce.js +340 -0
- package/dist/lib/performance/collections/collections.js +25 -0
- package/dist/lib/performance/collections/json-clone.js +92 -0
- package/dist/lib/performance/collections/json-parse-context.js +99 -0
- package/dist/lib/performance/collections/list-counts.js +321 -0
- package/dist/lib/performance/collections/list-overfetch.js +214 -0
- package/dist/lib/performance/collections/memory-growth.js +514 -0
- package/dist/lib/performance/collections/repeated.js +200 -0
- package/dist/lib/performance/collections/sort-extreme.js +142 -0
- package/dist/lib/performance/collections/workbook-decodes.js +147 -0
- package/dist/lib/performance/contracts/cli.js +231 -0
- package/dist/lib/performance/contracts/dto.js +244 -0
- package/dist/lib/performance/contracts/openapi.js +363 -0
- package/dist/lib/performance/datastores/pg-fragments.js +300 -0
- package/dist/lib/performance/datastores/pg-integrity.js +115 -0
- package/dist/lib/performance/datastores/pooling.js +193 -0
- package/dist/lib/performance/datastores/postgres.js +200 -0
- package/dist/lib/performance/datastores/redis-client.js +19 -0
- package/dist/lib/performance/datastores/redis-keys.js +78 -0
- package/dist/lib/performance/datastores/redis.js +188 -0
- package/dist/lib/performance/datastores/session-store.js +86 -0
- package/dist/lib/performance/db/cli.js +470 -0
- package/dist/lib/performance/db/redact.js +126 -0
- package/dist/lib/performance/engine/native-checker.js +319 -0
- package/dist/lib/performance/engine/native-runtime.js +25 -0
- package/dist/lib/performance/engine/native-syntax.js +136 -0
- package/dist/lib/performance/engine/native-workspaces.js +31 -0
- package/dist/lib/performance/engine/native.js +382 -0
- package/dist/lib/performance/frontend/frontend-dom-perf.js +310 -0
- package/dist/lib/performance/frontend/frontend-helpers.js +93 -0
- package/dist/lib/performance/frontend/frontend-perf.js +479 -0
- package/dist/lib/performance/frontend/frontend-render-perf.js +375 -0
- package/dist/lib/performance/index-rules/index-rules-foreign-keys.js +81 -0
- package/dist/lib/performance/index-rules/index-rules-order.js +152 -0
- package/dist/lib/performance/index-rules/index-rules-pattern.js +137 -0
- package/dist/lib/performance/index-rules/index-rules-table.js +286 -0
- package/dist/lib/performance/index-rules/index-rules.js +107 -0
- package/dist/lib/performance/index-rules/redundant-indexes.js +403 -0
- package/dist/lib/performance/migrations/cli.js +204 -0
- package/dist/lib/performance/models/index.js +284 -0
- package/dist/lib/performance/orm/cartesian-includes.js +364 -0
- package/dist/lib/performance/orm/drizzle-write-preflight.js +195 -0
- package/dist/lib/performance/orm/drizzle.js +288 -0
- package/dist/lib/performance/orm/filter-existence.js +149 -0
- package/dist/lib/performance/orm/find-then-create.js +281 -0
- package/dist/lib/performance/orm/last-insert-id.js +120 -0
- package/dist/lib/performance/orm/mongoose-patterns.js +245 -0
- package/dist/lib/performance/orm/offset-pagination.js +166 -0
- package/dist/lib/performance/orm/orm-owners.js +145 -0
- package/dist/lib/performance/orm/orm-queries.js +496 -0
- package/dist/lib/performance/orm/page-counts.js +262 -0
- package/dist/lib/performance/orm/prisma-aggregates.js +125 -0
- package/dist/lib/performance/orm/prisma-integrity.js +239 -0
- package/dist/lib/performance/orm/prisma.js +307 -0
- package/dist/lib/performance/orm/typeorm-projection.js +261 -0
- package/dist/lib/performance/orm/typeorm-transaction-loops.js +143 -0
- package/dist/lib/performance/orm/typeorm-unused-count.js +36 -0
- package/dist/lib/performance/orm/typeorm-updates.js +268 -0
- package/dist/lib/performance/orm/unbounded-list-queries.js +598 -0
- package/dist/lib/performance/polyglot.js +215 -0
- package/dist/lib/performance/projects.js +483 -0
- package/dist/lib/performance/query-loops/dependent-writes.js +228 -0
- package/dist/lib/performance/query-loops/guard-queries.js +356 -0
- package/dist/lib/performance/query-loops/notification-loops.js +176 -0
- package/dist/lib/performance/query-loops/parallel-reads.js +139 -0
- package/dist/lib/performance/query-loops/query-loop-batch.js +188 -0
- package/dist/lib/performance/query-loops/query-loop-bounds.js +219 -0
- package/dist/lib/performance/query-loops/query-loop-exits.js +180 -0
- package/dist/lib/performance/query-loops/query-loop-helpers.js +42 -0
- package/dist/lib/performance/query-loops/query-loop-memo.js +81 -0
- package/dist/lib/performance/query-loops/query-loop-pagination.js +130 -0
- package/dist/lib/performance/query-loops/query-loops.js +29 -0
- package/dist/lib/performance/query-loops/query-results.js +179 -0
- package/dist/lib/performance/query-loops/queue-loops.js +87 -0
- package/dist/lib/performance/query-loops/sequential-loops.js +557 -0
- package/dist/lib/performance/query-loops/service-call-resolution.js +54 -0
- package/dist/lib/performance/query-loops/service-loop-collections.js +263 -0
- package/dist/lib/performance/query-loops/service-loops.js +416 -0
- package/dist/lib/performance/query-loops/transaction-io.js +428 -0
- package/dist/lib/performance/request/axios-timeout-defaults.js +538 -0
- package/dist/lib/performance/request/backend-mastery.js +444 -0
- package/dist/lib/performance/request/http-options-writes.js +204 -0
- package/dist/lib/performance/request/http-timeouts.js +499 -0
- package/dist/lib/performance/request/llm-max-tokens.js +53 -0
- package/dist/lib/performance/request/mongoose-lean.js +149 -0
- package/dist/lib/performance/request/node-event-listener-leak.js +160 -0
- package/dist/lib/performance/request/node-fs-context.js +397 -0
- package/dist/lib/performance/request/node-fs.js +452 -0
- package/dist/lib/performance/request/password-hashing.js +218 -0
- package/dist/lib/performance/request/phase5-ast.js +144 -0
- package/dist/lib/performance/request/phase5-rules.js +317 -0
- package/dist/lib/performance/request/pure-js-hashing.js +97 -0
- package/dist/lib/performance/request/request-handlers.js +429 -0
- package/dist/lib/performance/request/request-heavy-work.js +135 -0
- package/dist/lib/performance/request/request-inputs.js +303 -0
- package/dist/lib/performance/request/unbounded-promise-all.js +426 -0
- package/dist/lib/performance/request/upload-limits.js +145 -0
- package/dist/lib/performance/rule-ids.js +371 -0
- package/dist/lib/performance/schema/drizzle-schema.js +278 -0
- package/dist/lib/performance/schema/mongoose-schema.js +189 -0
- package/dist/lib/performance/schema/prisma-owners.js +118 -0
- package/dist/lib/performance/schema/prisma-schema.js +472 -0
- package/dist/lib/performance/schema/query-site-support.js +60 -0
- package/dist/lib/performance/schema/query-sites-drizzle.js +220 -0
- package/dist/lib/performance/schema/query-sites-mongoose.js +140 -0
- package/dist/lib/performance/schema/query-sites-prisma.js +173 -0
- package/dist/lib/performance/schema/query-sites-sequelize.js +133 -0
- package/dist/lib/performance/schema/query-sites-typeorm.js +180 -0
- package/dist/lib/performance/schema/raw-sql-sites.js +284 -0
- package/dist/lib/performance/schema/sequelize-schema.js +322 -0
- package/dist/lib/performance/schema/ts-helpers.js +130 -0
- package/dist/lib/performance/schema/typeorm-schema.js +262 -0
- package/dist/lib/performance/site-fix.js +271 -0
- package/dist/lib/performance/site-fixes/await-before-early-exit.js +121 -0
- package/dist/lib/performance/site-fixes/delete-preflight.js +99 -0
- package/dist/lib/performance/site-fixes/error-handling.js +115 -0
- package/dist/lib/performance/site-fixes/helpers.js +200 -0
- package/dist/lib/performance/site-fixes/http-timeouts.js +96 -0
- package/dist/lib/performance/site-fixes/json-parse.js +114 -0
- package/dist/lib/performance/site-fixes/last-insert-id.js +230 -0
- package/dist/lib/performance/site-fixes/list-queries.js +164 -0
- package/dist/lib/performance/site-fixes/literal-awaits.js +430 -0
- package/dist/lib/performance/site-fixes/page-counts.js +88 -0
- package/dist/lib/performance/site-fixes/prisma-aggregates.js +455 -0
- package/dist/lib/performance/site-fixes/promise-catch.js +174 -0
- package/dist/lib/performance/site-fixes/query-shapes.js +573 -0
- package/dist/lib/performance/site-fixes/scope-names.js +30 -0
- package/dist/lib/performance/site-fixes/service-loop-ast.js +84 -0
- package/dist/lib/performance/site-fixes/service-loop-callee.js +57 -0
- package/dist/lib/performance/site-fixes/small-rewrites.js +210 -0
- package/dist/lib/performance/site-fixes/typeorm-updates.js +277 -0
- package/dist/lib/performance/site-fixes/typeorm.js +239 -0
- package/dist/lib/performance/site-fixes/upload-limits.js +91 -0
- package/dist/lib/performance/site-fixes/workbook-decodes.js +254 -0
- package/dist/lib/reliability/analyze.js +47 -0
- package/dist/lib/reliability/boundary-access.js +521 -0
- package/dist/lib/reliability/callback-completion.js +649 -0
- package/dist/lib/reliability/callback-loop-overrides.js +63 -0
- package/dist/lib/reliability/child-process.js +528 -0
- package/dist/lib/reliability/cli.js +20 -0
- package/dist/lib/reliability/crlf-line-split.js +593 -0
- package/dist/lib/reliability/error-values.js +242 -0
- package/dist/lib/reliability/parse-failure-files.js +292 -0
- package/dist/lib/reliability/parse-failure-flow.js +196 -0
- package/dist/lib/reliability/parse-failure-paths.js +405 -0
- package/dist/lib/reliability/parse-failure-reset.js +482 -0
- package/dist/lib/reliability/pool-timeout.js +54 -0
- package/dist/lib/reliability/react-bugs.js +401 -0
- package/dist/lib/reliability/react-effect-bindings.js +107 -0
- package/dist/lib/reliability/react-state-aliases.js +313 -0
- package/dist/lib/reliability/react-state-initial.js +201 -0
- package/dist/lib/reliability/react-state-order.js +176 -0
- package/dist/lib/reliability/react-state-paths.js +86 -0
- package/dist/lib/reliability/react-state-setter.js +398 -0
- package/dist/lib/reliability/react-state-walker.js +654 -0
- package/dist/lib/reliability/react-state.js +49 -0
- package/dist/lib/reliability/resource-leaks.js +523 -0
- package/dist/lib/reliability/rule-ids.js +276 -0
- package/dist/lib/reliability/site-fixes/boundary-access.js +140 -0
- package/dist/lib/reliability/site-fixes/suspicious-logic.js +116 -0
- package/dist/lib/reliability/source-helpers.js +38 -0
- package/dist/lib/reliability/sql-insert-terminator.js +106 -0
- package/dist/lib/reliability/standalone-sources.js +93 -0
- package/dist/lib/reliability/suspicious-logic.js +423 -0
- package/dist/lib/reliability/swallowed-errors.js +371 -0
- package/dist/lib/reliability/switch-exhaustive.js +425 -0
- package/dist/lib/reliability/switch-fallthrough.js +152 -0
- package/dist/lib/reliability/test-cleanup-after-await.js +326 -0
- package/dist/lib/reliability/uncaught-exception.js +402 -0
- package/dist/lib/reliability/walk.js +16 -0
- package/dist/lib/security/analyze.js +129 -0
- package/dist/lib/security/auth-crypto/comparison.js +97 -0
- package/dist/lib/security/auth-crypto/hashing.js +302 -0
- package/dist/lib/security/auth-crypto/index.js +33 -0
- package/dist/lib/security/auth-crypto/jwt.js +522 -0
- package/dist/lib/security/auth-crypto/plaintext-password.js +171 -0
- package/dist/lib/security/auth-crypto/random.js +151 -0
- package/dist/lib/security/auth-crypto/rate-limits.js +328 -0
- package/dist/lib/security/auth-crypto/secrets.js +331 -0
- package/dist/lib/security/auth-crypto/shared.js +105 -0
- package/dist/lib/security/auth-crypto/transport-and-ciphers.js +386 -0
- package/dist/lib/security/bindings.js +286 -0
- package/dist/lib/security/cli.js +304 -0
- package/dist/lib/security/declarations.js +25 -0
- package/dist/lib/security/deps/cli.js +75 -0
- package/dist/lib/security/deps/lockfiles.js +310 -0
- package/dist/lib/security/deps/osv.js +217 -0
- package/dist/lib/security/deps/scan.js +69 -0
- package/dist/lib/security/examples/injection.cjs +58 -0
- package/dist/lib/security/exposure/backend-security-mastery.js +84 -0
- package/dist/lib/security/exposure/client-env.js +121 -0
- package/dist/lib/security/exposure/cookies.js +173 -0
- package/dist/lib/security/exposure/cors-origin-regex.js +177 -0
- package/dist/lib/security/exposure/cors.js +217 -0
- package/dist/lib/security/exposure/error-responses.js +453 -0
- package/dist/lib/security/exposure/frontend-security.js +583 -0
- package/dist/lib/security/exposure/graphql.js +131 -0
- package/dist/lib/security/exposure/jsx-url.js +336 -0
- package/dist/lib/security/exposure/literals.js +186 -0
- package/dist/lib/security/exposure/logging.js +168 -0
- package/dist/lib/security/exposure/mass-assignment.js +165 -0
- package/dist/lib/security/exposure/next-image-config.js +34 -0
- package/dist/lib/security/exposure/package-manifest.js +72 -0
- package/dist/lib/security/exposure/password-response.js +315 -0
- package/dist/lib/security/exposure/prototype-pollution.js +291 -0
- package/dist/lib/security/exposure/reflected-xss.js +57 -0
- package/dist/lib/security/exposure/storage-acl.js +87 -0
- package/dist/lib/security/exposure/template-autoescape.js +39 -0
- package/dist/lib/security/exposure/url-secrets.js +164 -0
- package/dist/lib/security/exposure/validation-pipe.js +36 -0
- package/dist/lib/security/exposure/xml.js +28 -0
- package/dist/lib/security/file-context.js +94 -0
- package/dist/lib/security/files/project-files.js +103 -0
- package/dist/lib/security/files/review-directive.js +30 -0
- package/dist/lib/security/files/secrets.js +123 -0
- package/dist/lib/security/injection/code.js +145 -0
- package/dist/lib/security/injection/command.js +180 -0
- package/dist/lib/security/injection/escape-replace.js +330 -0
- package/dist/lib/security/injection/index.js +23 -0
- package/dist/lib/security/injection/nosql.js +353 -0
- package/dist/lib/security/injection/redos.js +453 -0
- package/dist/lib/security/injection/regex.js +67 -0
- package/dist/lib/security/injection/rule-ids.js +18 -0
- package/dist/lib/security/injection/shared.js +137 -0
- package/dist/lib/security/injection/sql.js +513 -0
- package/dist/lib/security/pg-dynamic-query.js +30 -0
- package/dist/lib/security/pg-identifier-guards.js +155 -0
- package/dist/lib/security/phase5-rules.js +539 -0
- package/dist/lib/security/polyglot.js +8 -0
- package/dist/lib/security/request-forgery/open-redirect-query.js +338 -0
- package/dist/lib/security/request-forgery/open-redirect.js +371 -0
- package/dist/lib/security/request-forgery/path-traversal.js +103 -0
- package/dist/lib/security/request-forgery/shared.js +359 -0
- package/dist/lib/security/request-forgery/ssrf.js +133 -0
- package/dist/lib/security/request-forgery/upload-filename.js +75 -0
- package/dist/lib/security/request-forgery/zip-slip.js +42 -0
- package/dist/lib/security/rule-descriptions.js +89 -0
- package/dist/lib/security/rule-ids.js +150 -0
- package/dist/lib/security/scope/drizzle-policy.js +197 -0
- package/dist/lib/security/scope/query-policy.js +156 -0
- package/dist/lib/security/site-fixes/auth-crypto.js +224 -0
- package/dist/lib/security/site-fixes/injection.js +119 -0
- package/dist/lib/security/site-fixes/jwt.js +89 -0
- package/dist/lib/security/taint/archive-sources.js +127 -0
- package/dist/lib/security/taint/filename-guard.js +112 -0
- package/dist/lib/security/taint/guards.js +346 -0
- package/dist/lib/security/taint/index.js +615 -0
- package/dist/lib/security/taint/propagate.js +120 -0
- package/dist/lib/security/taint/resolution-cache.js +105 -0
- package/dist/lib/security/taint/sanitizers.js +71 -0
- package/dist/lib/security/taint/sources.js +360 -0
- package/dist/lib/security/taint/summaries.js +219 -0
- package/dist/lib/security/taint/url-parts.js +273 -0
- package/dist/lib/security/taint/validators.js +420 -0
- package/dist/lib/security/vm-module-members.js +52 -0
- package/dist/lib/shared/agent/agent-init.js +236 -0
- package/dist/lib/shared/agent/agent-verify.js +239 -0
- package/dist/lib/shared/agent/git-hook.js +153 -0
- package/dist/lib/shared/agent/pending-review.js +119 -0
- package/dist/lib/shared/agent/review-mcp.js +262 -0
- package/dist/lib/shared/analysis/ast-semantics.js +453 -0
- package/dist/lib/shared/analysis/caller-name-inventory.js +21 -0
- package/dist/lib/shared/analysis/declaration-path.js +87 -0
- package/dist/lib/shared/analysis/execution-context.js +397 -0
- package/dist/lib/shared/analysis/function-summaries.js +571 -0
- package/dist/lib/shared/analysis/function-syntax.js +86 -0
- package/dist/lib/shared/analysis/hot-path-graph.js +268 -0
- package/dist/lib/shared/analysis/scan-cache.js +351 -0
- package/dist/lib/shared/check.js +272 -0
- package/dist/lib/shared/config-root-files.js +28 -0
- package/dist/lib/shared/config.js +286 -0
- package/dist/lib/shared/fix/fix-command.js +23 -0
- package/dist/lib/shared/fix/fix-convergence.js +545 -0
- package/dist/lib/shared/fix/fix-handoff.js +57 -0
- package/dist/lib/shared/fix/fix-history.js +305 -0
- package/dist/lib/shared/fix/fix-hunks.js +117 -0
- package/dist/lib/shared/fix/fix-presentation-comments.js +254 -0
- package/dist/lib/shared/fix/fix-presentation-style.js +230 -0
- package/dist/lib/shared/fix/fix-presentation.js +177 -0
- package/dist/lib/shared/fix/fix-rationales.js +152 -0
- package/dist/lib/shared/fix/fix-recipes.js +101 -0
- package/dist/lib/shared/fix/fix-typecheck.js +222 -0
- package/dist/lib/shared/fix/project-file-access.js +172 -0
- package/dist/lib/shared/fix.js +258 -0
- package/dist/lib/shared/formats/finding-location.js +35 -0
- package/dist/lib/shared/formats/sarif.js +91 -0
- package/dist/lib/shared/package-root.js +18 -0
- package/dist/lib/shared/reporting/baseline-lines.js +127 -0
- package/dist/lib/shared/reporting/baseline.js +239 -0
- package/dist/lib/shared/reporting/coverage-notes.js +35 -0
- package/dist/lib/shared/reporting/flow-skips.js +87 -0
- package/dist/lib/shared/reporting/impact-levels.js +49 -0
- package/dist/lib/shared/reporting/pillar-rules.js +6 -0
- package/dist/lib/shared/reporting/pillars.js +377 -0
- package/dist/lib/shared/reporting/rule-docs.js +21 -0
- package/dist/lib/shared/reporting/source-report.js +157 -0
- package/dist/lib/shared/system/atomic-write.js +77 -0
- package/dist/lib/shared/system/terminal-safe.js +16 -0
- package/dist/lib/shared/types/typescript-outer-expression.js +1 -0
- package/dist/lib/shared/workspaces.js +434 -0
- package/dist/polyglot/maintainability/rules.js +159 -0
- package/package.json +36 -28
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/hooks/check-edited-file.mjs +151 -0
- package/plugin/hooks/hooks.json +1 -1
- package/schema/loadwise.config.schema.json +16 -0
- package/bin/loadwise.js +0 -102
- package/lib/accessibility/analyze.js +0 -26
- package/lib/accessibility/angular-inline.js +0 -43
- package/lib/accessibility/cli.js +0 -11
- package/lib/accessibility/frontend-detect.js +0 -99
- package/lib/accessibility/jsx-elements.js +0 -110
- package/lib/accessibility/markup-files.js +0 -41
- package/lib/accessibility/markup.js +0 -24
- package/lib/accessibility/rule-ids.js +0 -39
- package/lib/accessibility/rules.js +0 -293
- package/lib/accessibility/template-attributes.js +0 -137
- package/lib/accessibility/template-elements.js +0 -434
- package/lib/accessibility/template-file.js +0 -183
- package/lib/editor/accessibility-examples.js +0 -89
- package/lib/editor/diagnostics.js +0 -365
- package/lib/editor/dismissals.js +0 -111
- package/lib/editor/language-server.js +0 -437
- package/lib/editor/reliability-examples.js +0 -136
- package/lib/editor/scan-session.js +0 -334
- package/lib/editor/server-commands.js +0 -232
- package/lib/editor/workspace-paths.js +0 -22
- package/lib/maintainability/analyze-source.js +0 -95
- package/lib/maintainability/ancestor-aliases.js +0 -35
- package/lib/maintainability/apply-fix.js +0 -85
- package/lib/maintainability/architecture-nest.js +0 -103
- package/lib/maintainability/architecture.js +0 -482
- package/lib/maintainability/changed-lines.js +0 -135
- package/lib/maintainability/changed-output.js +0 -21
- package/lib/maintainability/cli.js +0 -410
- package/lib/maintainability/config-entry-points.js +0 -86
- package/lib/maintainability/deprecated-apis.js +0 -170
- package/lib/maintainability/duplicates.js +0 -326
- package/lib/maintainability/entry-points.js +0 -603
- package/lib/maintainability/finding-ids.js +0 -46
- package/lib/maintainability/fix-cli.js +0 -235
- package/lib/maintainability/fix-text.js +0 -11
- package/lib/maintainability/functions.js +0 -315
- package/lib/maintainability/inputs.js +0 -231
- package/lib/maintainability/module-usage-dynamic.js +0 -175
- package/lib/maintainability/module-usage.js +0 -574
- package/lib/maintainability/polyglot.js +0 -173
- package/lib/maintainability/project.js +0 -116
- package/lib/maintainability/review-directive.js +0 -91
- package/lib/maintainability/rule-ids.js +0 -82
- package/lib/maintainability/scan-changed.js +0 -70
- package/lib/maintainability/scan-worker.js +0 -38
- package/lib/maintainability/scan.js +0 -242
- package/lib/maintainability/site-fix.js +0 -221
- package/lib/maintainability/site-fixes/branches.js +0 -418
- package/lib/maintainability/site-fixes/control-flow.js +0 -67
- package/lib/maintainability/site-fixes/deprecated-apis.js +0 -67
- package/lib/maintainability/site-fixes/duplicate-arrows.js +0 -343
- package/lib/maintainability/site-fixes/duplicate-edits.js +0 -396
- package/lib/maintainability/site-fixes/duplicate-methods.js +0 -407
- package/lib/maintainability/site-fixes/duplicates.js +0 -125
- package/lib/maintainability/site-fixes/extract-block-measure.js +0 -131
- package/lib/maintainability/site-fixes/extract-block.js +0 -38
- package/lib/maintainability/site-fixes/parameters.js +0 -460
- package/lib/maintainability/site-fixes/stray-console.js +0 -21
- package/lib/maintainability/site-fixes/unused-bindings.js +0 -158
- package/lib/maintainability/size-limits.js +0 -94
- package/lib/maintainability/snapshot-context.js +0 -63
- package/lib/maintainability/source-facts.js +0 -39
- package/lib/maintainability/stray-console.js +0 -352
- package/lib/maintainability/tsconfig-strict.js +0 -69
- package/lib/maintainability/type-safety-hygiene.js +0 -204
- package/lib/maintainability/unused-bindings.js +0 -182
- package/lib/maintainability/walk.js +0 -17
- package/lib/performance/analyze.js +0 -253
- package/lib/performance/async-errors.js +0 -190
- package/lib/performance/await-before-early-exit.js +0 -176
- package/lib/performance/awaits.js +0 -70
- package/lib/performance/backend-mastery.js +0 -444
- package/lib/performance/call-syntax.js +0 -27
- package/lib/performance/cartesian-includes.js +0 -364
- package/lib/performance/changed-lines.js +0 -141
- package/lib/performance/cli-output.js +0 -175
- package/lib/performance/cli-policy.js +0 -87
- package/lib/performance/cli-scan.js +0 -421
- package/lib/performance/cli.js +0 -101
- package/lib/performance/collection-bindings.js +0 -283
- package/lib/performance/collection-bounds.js +0 -247
- package/lib/performance/collection-copy.js +0 -169
- package/lib/performance/collection-lookups.js +0 -432
- package/lib/performance/collection-reduce.js +0 -340
- package/lib/performance/collections.js +0 -25
- package/lib/performance/contracts/cli.js +0 -230
- package/lib/performance/contracts/dto.js +0 -244
- package/lib/performance/contracts/openapi.js +0 -363
- package/lib/performance/db/cli.js +0 -469
- package/lib/performance/db/redact.js +0 -126
- package/lib/performance/dependent-writes.js +0 -228
- package/lib/performance/discarded-error-result.js +0 -46
- package/lib/performance/drizzle-write-preflight.js +0 -195
- package/lib/performance/drizzle.js +0 -288
- package/lib/performance/editor-signal.js +0 -57
- package/lib/performance/filter-existence.js +0 -149
- package/lib/performance/find-then-create.js +0 -281
- package/lib/performance/finding-ids.js +0 -48
- package/lib/performance/finding-text.js +0 -117
- package/lib/performance/fix-cli.js +0 -200
- package/lib/performance/floating-promises.js +0 -248
- package/lib/performance/frontend-dom-perf.js +0 -310
- package/lib/performance/frontend-helpers.js +0 -93
- package/lib/performance/frontend-perf.js +0 -479
- package/lib/performance/frontend-render-perf.js +0 -200
- package/lib/performance/function-kinds.js +0 -9
- package/lib/performance/guard-queries.js +0 -356
- package/lib/performance/http-timeouts.js +0 -492
- package/lib/performance/index-rules-foreign-keys.js +0 -81
- package/lib/performance/index-rules-order.js +0 -152
- package/lib/performance/index-rules-pattern.js +0 -137
- package/lib/performance/index-rules-table.js +0 -288
- package/lib/performance/index-rules.js +0 -107
- package/lib/performance/json-clone.js +0 -28
- package/lib/performance/json-parse-context.js +0 -99
- package/lib/performance/last-insert-id.js +0 -120
- package/lib/performance/list-counts.js +0 -321
- package/lib/performance/list-overfetch.js +0 -216
- package/lib/performance/literal-awaits.js +0 -190
- package/lib/performance/llm-max-tokens.js +0 -56
- package/lib/performance/memory-growth.js +0 -516
- package/lib/performance/migrations/cli.js +0 -203
- package/lib/performance/missing-packages.js +0 -116
- package/lib/performance/models/index.js +0 -284
- package/lib/performance/mongoose-patterns.js +0 -245
- package/lib/performance/native-checker.js +0 -312
- package/lib/performance/native-runtime.js +0 -24
- package/lib/performance/native-syntax.js +0 -132
- package/lib/performance/native-workspaces.js +0 -31
- package/lib/performance/native.js +0 -362
- package/lib/performance/node-fs-context.js +0 -390
- package/lib/performance/node-fs.js +0 -452
- package/lib/performance/notification-loops.js +0 -176
- package/lib/performance/offset-pagination.js +0 -166
- package/lib/performance/orm-owners.js +0 -145
- package/lib/performance/orm-queries.js +0 -496
- package/lib/performance/package-types.js +0 -57
- package/lib/performance/page-counts.js +0 -262
- package/lib/performance/parallel-reads.js +0 -139
- package/lib/performance/password-hashing.js +0 -218
- package/lib/performance/pg-fragments.js +0 -300
- package/lib/performance/pg-integrity.js +0 -115
- package/lib/performance/phase5-rules.js +0 -539
- package/lib/performance/polyglot.js +0 -214
- package/lib/performance/pooling.js +0 -215
- package/lib/performance/postgres.js +0 -182
- package/lib/performance/prisma-aggregates.js +0 -125
- package/lib/performance/prisma-integrity.js +0 -239
- package/lib/performance/prisma.js +0 -399
- package/lib/performance/projects.js +0 -452
- package/lib/performance/promise-return-escapes-catch.js +0 -96
- package/lib/performance/pure-js-hashing.js +0 -96
- package/lib/performance/query-loop-batch.js +0 -188
- package/lib/performance/query-loop-bounds.js +0 -219
- package/lib/performance/query-loop-exits.js +0 -171
- package/lib/performance/query-loop-helpers.js +0 -42
- package/lib/performance/query-loop-memo.js +0 -81
- package/lib/performance/query-loop-pagination.js +0 -130
- package/lib/performance/query-loops.js +0 -29
- package/lib/performance/query-results.js +0 -179
- package/lib/performance/queue-loops.js +0 -87
- package/lib/performance/redis-client.js +0 -19
- package/lib/performance/redis-keys.js +0 -78
- package/lib/performance/redis.js +0 -188
- package/lib/performance/redundant-indexes.js +0 -403
- package/lib/performance/repeated.js +0 -200
- package/lib/performance/request-handlers.js +0 -429
- package/lib/performance/request-heavy-work.js +0 -135
- package/lib/performance/request-inputs.js +0 -303
- package/lib/performance/retry-backoff.js +0 -132
- package/lib/performance/return-in-finally.js +0 -12
- package/lib/performance/return-newline.js +0 -54
- package/lib/performance/review-context.js +0 -434
- package/lib/performance/rule-ids.js +0 -371
- package/lib/performance/scan-outcome.js +0 -37
- package/lib/performance/schema/drizzle-schema.js +0 -278
- package/lib/performance/schema/mongoose-schema.js +0 -189
- package/lib/performance/schema/prisma-schema.js +0 -472
- package/lib/performance/schema/query-site-support.js +0 -61
- package/lib/performance/schema/query-sites-drizzle.js +0 -220
- package/lib/performance/schema/query-sites-mongoose.js +0 -140
- package/lib/performance/schema/query-sites-prisma.js +0 -201
- package/lib/performance/schema/query-sites-sequelize.js +0 -133
- package/lib/performance/schema/query-sites-typeorm.js +0 -180
- package/lib/performance/schema/raw-sql-sites.js +0 -284
- package/lib/performance/schema/sequelize-schema.js +0 -322
- package/lib/performance/schema/ts-helpers.js +0 -130
- package/lib/performance/schema/typeorm-schema.js +0 -262
- package/lib/performance/schema-tooling.js +0 -193
- package/lib/performance/scope-evidence.js +0 -137
- package/lib/performance/sequential-loops.js +0 -557
- package/lib/performance/service-call-resolution.js +0 -54
- package/lib/performance/service-loop-collections.js +0 -263
- package/lib/performance/service-loops.js +0 -416
- package/lib/performance/session-store.js +0 -86
- package/lib/performance/site-fix.js +0 -271
- package/lib/performance/site-fixes/await-before-early-exit.js +0 -121
- package/lib/performance/site-fixes/delete-preflight.js +0 -99
- package/lib/performance/site-fixes/error-handling.js +0 -99
- package/lib/performance/site-fixes/helpers.js +0 -200
- package/lib/performance/site-fixes/http-timeouts.js +0 -56
- package/lib/performance/site-fixes/json-parse.js +0 -114
- package/lib/performance/site-fixes/last-insert-id.js +0 -230
- package/lib/performance/site-fixes/list-queries.js +0 -164
- package/lib/performance/site-fixes/literal-awaits.js +0 -431
- package/lib/performance/site-fixes/page-counts.js +0 -88
- package/lib/performance/site-fixes/prisma-aggregates.js +0 -455
- package/lib/performance/site-fixes/promise-catch.js +0 -147
- package/lib/performance/site-fixes/query-shapes.js +0 -573
- package/lib/performance/site-fixes/scope-names.js +0 -30
- package/lib/performance/site-fixes/service-loop-ast.js +0 -85
- package/lib/performance/site-fixes/service-loop-callee.js +0 -57
- package/lib/performance/site-fixes/small-rewrites.js +0 -210
- package/lib/performance/site-fixes/typeorm-updates.js +0 -277
- package/lib/performance/site-fixes/typeorm.js +0 -239
- package/lib/performance/site-fixes/upload-limits.js +0 -74
- package/lib/performance/site-fixes/workbook-decodes.js +0 -254
- package/lib/performance/sort-extreme.js +0 -142
- package/lib/performance/source-inputs.js +0 -83
- package/lib/performance/source-options.js +0 -103
- package/lib/performance/source-pillars.js +0 -23
- package/lib/performance/source-text.js +0 -59
- package/lib/performance/stream-errors.js +0 -650
- package/lib/performance/transaction-io.js +0 -427
- package/lib/performance/typeorm-projection.js +0 -261
- package/lib/performance/typeorm-transaction-loops.js +0 -143
- package/lib/performance/typeorm-unused-count.js +0 -36
- package/lib/performance/typeorm-updates.js +0 -268
- package/lib/performance/unbounded-list-queries.js +0 -600
- package/lib/performance/unscanned-javascript.js +0 -76
- package/lib/performance/upload-limits.js +0 -68
- package/lib/performance/watch.js +0 -99
- package/lib/performance/workbook-decodes.js +0 -147
- package/lib/reliability/analyze.js +0 -41
- package/lib/reliability/boundary-access.js +0 -521
- package/lib/reliability/child-process.js +0 -106
- package/lib/reliability/cli.js +0 -20
- package/lib/reliability/error-values.js +0 -177
- package/lib/reliability/pool-timeout.js +0 -79
- package/lib/reliability/react-bugs.js +0 -602
- package/lib/reliability/resource-leaks.js +0 -523
- package/lib/reliability/rule-ids.js +0 -267
- package/lib/reliability/site-fixes/boundary-access.js +0 -80
- package/lib/reliability/site-fixes/suspicious-logic.js +0 -115
- package/lib/reliability/source-helpers.js +0 -32
- package/lib/reliability/sql-insert-terminator.js +0 -106
- package/lib/reliability/standalone-sources.js +0 -54
- package/lib/reliability/suspicious-logic.js +0 -364
- package/lib/reliability/swallowed-errors.js +0 -321
- package/lib/reliability/switch-exhaustive.js +0 -284
- package/lib/reliability/uncaught-exception.js +0 -223
- package/lib/reliability/walk.js +0 -16
- package/lib/security/analyze.js +0 -129
- package/lib/security/auth-crypto/comparison.js +0 -97
- package/lib/security/auth-crypto/hashing.js +0 -302
- package/lib/security/auth-crypto/index.js +0 -32
- package/lib/security/auth-crypto/jwt.js +0 -468
- package/lib/security/auth-crypto/plaintext-password.js +0 -171
- package/lib/security/auth-crypto/random.js +0 -124
- package/lib/security/auth-crypto/rate-limits.js +0 -326
- package/lib/security/auth-crypto/secrets.js +0 -331
- package/lib/security/auth-crypto/shared.js +0 -105
- package/lib/security/auth-crypto/transport-and-ciphers.js +0 -217
- package/lib/security/bindings.js +0 -286
- package/lib/security/cli.js +0 -294
- package/lib/security/declarations.js +0 -25
- package/lib/security/deps/cli.js +0 -75
- package/lib/security/deps/lockfiles.js +0 -310
- package/lib/security/deps/osv.js +0 -217
- package/lib/security/deps/scan.js +0 -69
- package/lib/security/examples/injection.cjs +0 -54
- package/lib/security/exposure/backend-security-mastery.js +0 -80
- package/lib/security/exposure/client-env.js +0 -113
- package/lib/security/exposure/cookies.js +0 -173
- package/lib/security/exposure/cors-origin-regex.js +0 -177
- package/lib/security/exposure/cors.js +0 -217
- package/lib/security/exposure/error-responses.js +0 -437
- package/lib/security/exposure/frontend-security.js +0 -549
- package/lib/security/exposure/graphql.js +0 -131
- package/lib/security/exposure/jsx-url.js +0 -267
- package/lib/security/exposure/literals.js +0 -133
- package/lib/security/exposure/logging.js +0 -168
- package/lib/security/exposure/mass-assignment.js +0 -165
- package/lib/security/exposure/next-image-config.js +0 -34
- package/lib/security/exposure/package-manifest.js +0 -45
- package/lib/security/exposure/password-response.js +0 -315
- package/lib/security/exposure/prototype-pollution.js +0 -291
- package/lib/security/exposure/reflected-xss.js +0 -57
- package/lib/security/exposure/storage-acl.js +0 -87
- package/lib/security/exposure/template-autoescape.js +0 -39
- package/lib/security/exposure/url-secrets.js +0 -164
- package/lib/security/exposure/validation-pipe.js +0 -36
- package/lib/security/exposure/xml.js +0 -28
- package/lib/security/file-context.js +0 -82
- package/lib/security/files/project-files.js +0 -103
- package/lib/security/files/review-directive.js +0 -30
- package/lib/security/files/secrets.js +0 -121
- package/lib/security/injection/code.js +0 -122
- package/lib/security/injection/command.js +0 -180
- package/lib/security/injection/index.js +0 -13
- package/lib/security/injection/nosql.js +0 -353
- package/lib/security/injection/redos.js +0 -453
- package/lib/security/injection/regex.js +0 -67
- package/lib/security/injection/rule-ids.js +0 -17
- package/lib/security/injection/shared.js +0 -137
- package/lib/security/injection/sql.js +0 -513
- package/lib/security/pg-dynamic-query.js +0 -30
- package/lib/security/pg-identifier-guards.js +0 -155
- package/lib/security/phase5-rules.js +0 -515
- package/lib/security/polyglot.js +0 -8
- package/lib/security/request-forgery/open-redirect.js +0 -336
- package/lib/security/request-forgery/path-traversal.js +0 -103
- package/lib/security/request-forgery/shared.js +0 -355
- package/lib/security/request-forgery/ssrf.js +0 -133
- package/lib/security/request-forgery/upload-filename.js +0 -75
- package/lib/security/request-forgery/zip-slip.js +0 -42
- package/lib/security/rule-descriptions.js +0 -88
- package/lib/security/rule-ids.js +0 -149
- package/lib/security/scope/drizzle-policy.js +0 -197
- package/lib/security/scope/query-policy.js +0 -156
- package/lib/security/site-fixes/auth-crypto.js +0 -223
- package/lib/security/site-fixes/injection.js +0 -119
- package/lib/security/site-fixes/jwt.js +0 -89
- package/lib/security/taint/archive-sources.js +0 -127
- package/lib/security/taint/filename-guard.js +0 -112
- package/lib/security/taint/guards.js +0 -348
- package/lib/security/taint/index.js +0 -670
- package/lib/security/taint/propagate.js +0 -120
- package/lib/security/taint/sanitizers.js +0 -71
- package/lib/security/taint/sources.js +0 -360
- package/lib/security/taint/summaries.js +0 -219
- package/lib/security/taint/url-parts.js +0 -273
- package/lib/security/taint/validators.js +0 -420
- package/lib/shared/agent-init.js +0 -235
- package/lib/shared/agent-verify.js +0 -239
- package/lib/shared/atomic-write.js +0 -52
- package/lib/shared/baseline.js +0 -237
- package/lib/shared/check.js +0 -257
- package/lib/shared/config.js +0 -286
- package/lib/shared/coverage-notes.js +0 -27
- package/lib/shared/execution-context.js +0 -278
- package/lib/shared/fix-command.js +0 -23
- package/lib/shared/fix-convergence.js +0 -389
- package/lib/shared/fix-handoff.js +0 -57
- package/lib/shared/fix-history.js +0 -303
- package/lib/shared/fix-hunks.js +0 -108
- package/lib/shared/fix-presentation-comments.js +0 -253
- package/lib/shared/fix-presentation-style.js +0 -230
- package/lib/shared/fix-presentation.js +0 -177
- package/lib/shared/fix-rationales.js +0 -151
- package/lib/shared/fix-recipes.js +0 -101
- package/lib/shared/fix-typecheck.js +0 -188
- package/lib/shared/fix.js +0 -257
- package/lib/shared/formats/finding-location.js +0 -35
- package/lib/shared/formats/sarif.js +0 -91
- package/lib/shared/function-summaries.js +0 -571
- package/lib/shared/function-syntax.js +0 -86
- package/lib/shared/git-hook.js +0 -153
- package/lib/shared/hot-path-graph.js +0 -268
- package/lib/shared/impact-levels.js +0 -49
- package/lib/shared/pending-review.js +0 -117
- package/lib/shared/pillar-rules.js +0 -6
- package/lib/shared/pillars.js +0 -384
- package/lib/shared/review-mcp.js +0 -262
- package/lib/shared/rule-docs.js +0 -12
- package/lib/shared/scan-cache.js +0 -233
- package/lib/shared/source-report.js +0 -156
- package/lib/shared/workspaces.js +0 -321
- package/plugin/hooks/check-edited-file.js +0 -142
- package/polyglot/maintainability/rules.js +0 -159
- /package/{bin → dist/bin}/github-action.js +0 -0
- /package/{lib → dist/lib}/accessibility/aria-tables.js +0 -0
- /package/{lib → dist/lib}/accessibility/site-fixes/buttons.js +0 -0
- /package/{lib → dist/lib}/accessibility/usage.js +0 -0
- /package/{lib → dist/lib}/editor/actions.js +0 -0
- /package/{lib → dist/lib}/editor/apply-fix.js +0 -0
- /package/{lib → dist/lib}/editor/control-flow-comparison.js +0 -0
- /package/{lib → dist/lib}/editor/editor-document.js +0 -0
- /package/{lib → dist/lib}/editor/finding-comparison.js +0 -0
- /package/{lib → dist/lib}/editor/fix-edits.js +0 -0
- /package/{lib → dist/lib}/editor/maintainability-examples.js +0 -0
- /package/{lib → dist/lib}/editor/perf-site-comparison.js +0 -0
- /package/{lib → dist/lib}/editor/perf-watch.js +0 -0
- /package/{lib → dist/lib}/editor/performance-examples.js +0 -0
- /package/{lib → dist/lib}/editor/security-examples.js +0 -0
- /package/{lib → dist/lib}/editor/source-example.js +0 -0
- /package/{lib → dist/lib}/editor/standalone-performance-examples.js +0 -0
- /package/{lib → dist/lib}/editor/types/comparison.js +0 -0
- /package/{lib → dist/lib}/editor/types/dismissal.js +0 -0
- /package/{lib → dist/lib}/editor/types/fix-example.js +0 -0
- /package/{lib → dist/lib}/editor/types/source-document.js +0 -0
- /package/{lib → dist/lib}/editor/workspace-files.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/analysis}/advisory-context.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/analysis}/checklist-context.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/analysis}/source-exclusions.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/analysis}/traversal-context.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/architecture}/data-access.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/architecture}/graph.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/architecture}/layout.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/cli}/branch-advice.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/entry-points}/docker-entry-points.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/entry-points}/html-entry-points.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/entry-points}/mocha-entry-points.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/entry-points}/runtime-directories.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/entry-points}/workflow-entry-points.js +0 -0
- /package/{lib → dist/lib}/maintainability/examples.js +0 -0
- /package/{lib → dist/lib}/maintainability/polyglot-duplicates.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/quality}/child-buffer.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/quality}/limits.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/quality}/modifiers.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/boolean-returns.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/cycles.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/duplicate-bindings.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/exports.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-ast.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-edits.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-flow.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-naming.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/extract-block-narrowing.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/helpers.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/if-rewrites.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/isolated-program.js +0 -0
- /package/{lib → dist/lib}/maintainability/site-fixes/large-module.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/changed-lines.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/created-module.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/duplicate-sites.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/duplicates.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/entry-points.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/extract-block.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/extraction-drafts.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/finding-comparison.js +0 -0
- /package/{lib → dist/lib}/maintainability/types/fix-files.js +0 -0
- /package/{lib/maintainability/types/module-graph.js → dist/lib/maintainability/types/git-entry-source.js} +0 -0
- /package/{lib/maintainability/types/module-resolver.js → dist/lib/maintainability/types/module-graph.js} +0 -0
- /package/{lib/maintainability/types/module-usage.js → dist/lib/maintainability/types/module-resolver.js} +0 -0
- /package/{lib/maintainability/types/policy.js → dist/lib/maintainability/types/module-usage.js} +0 -0
- /package/{lib/maintainability/types/polyglot-scan.js → dist/lib/maintainability/types/policy.js} +0 -0
- /package/{lib/maintainability/types/scan-report.js → dist/lib/maintainability/types/polyglot-scan.js} +0 -0
- /package/{lib/maintainability/types/scan-worker.js → dist/lib/maintainability/types/scan-report.js} +0 -0
- /package/{lib/maintainability/types/site-fix-edits.js → dist/lib/maintainability/types/scan-worker.js} +0 -0
- /package/{lib/maintainability/types/site-fix-loader.js → dist/lib/maintainability/types/site-fix-edits.js} +0 -0
- /package/{lib/maintainability/types/site-fix-nodes.js → dist/lib/maintainability/types/site-fix-loader.js} +0 -0
- /package/{lib/maintainability/types/source-analysis.js → dist/lib/maintainability/types/site-fix-nodes.js} +0 -0
- /package/{lib/maintainability/types/source-facts.js → dist/lib/maintainability/types/source-analysis.js} +0 -0
- /package/{lib/maintainability/types/typescript-jsdoc-internals.js → dist/lib/maintainability/types/source-facts.js} +0 -0
- /package/{lib/maintainability/types/typescript-site-fix-internals.js → dist/lib/maintainability/types/typescript-jsdoc-internals.js} +0 -0
- /package/{lib/performance/cli-types.js → dist/lib/maintainability/types/typescript-site-fix-internals.js} +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/unused}/operator-references.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/unused}/unused-modules.js +0 -0
- /package/{lib/maintainability → dist/lib/maintainability/unused}/verified-private-types.js +0 -0
- /package/{lib/performance → dist/lib/performance/cli}/cli-arguments.js +0 -0
- /package/{lib/performance/migrations/extract-code-types.js → dist/lib/performance/cli/cli-types.js} +0 -0
- /package/{lib/performance → dist/lib/performance/cli}/emit-options.js +0 -0
- /package/{lib/performance → dist/lib/performance/cli}/impact.js +0 -0
- /package/{lib → dist/lib}/performance/contracts/git-files.js +0 -0
- /package/{lib → dist/lib}/performance/contracts/graphql.js +0 -0
- /package/{lib → dist/lib}/performance/db/checks.js +0 -0
- /package/{lib → dist/lib}/performance/db/cli-format.js +0 -0
- /package/{lib → dist/lib}/performance/db/cli-mysql.js +0 -0
- /package/{lib → dist/lib}/performance/db/drivers.js +0 -0
- /package/{lib → dist/lib}/performance/db/gateway.js +0 -0
- /package/{lib → dist/lib}/performance/db/hypopg.js +0 -0
- /package/{lib → dist/lib}/performance/db/measure.js +0 -0
- /package/{lib → dist/lib}/performance/db/mongo.js +0 -0
- /package/{lib → dist/lib}/performance/db/mysql-catalog.js +0 -0
- /package/{lib → dist/lib}/performance/db/pg-catalog.js +0 -0
- /package/{lib → dist/lib}/performance/db/plan-estimates.js +0 -0
- /package/{lib → dist/lib}/performance/db/snapshot.js +0 -0
- /package/{lib/performance → dist/lib/performance/engine}/compiler.js +0 -0
- /package/{lib/performance → dist/lib/performance/engine}/reference-checks.js +0 -0
- /package/{lib/performance → dist/lib/performance/evidence}/cache-reads.js +0 -0
- /package/{lib/performance → dist/lib/performance/evidence}/plans.js +0 -0
- /package/{lib/performance → dist/lib/performance/evidence}/span-timing.js +0 -0
- /package/{lib/performance → dist/lib/performance/evidence}/traces.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/discover.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/enforce.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/extract-code-builders.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/extract-code-discovery.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/extract-code-sql.js +0 -0
- /package/{lib/performance/site-fixes/types/module-binding.js → dist/lib/performance/migrations/extract-code-types.js} +0 -0
- /package/{lib → dist/lib}/performance/migrations/extract-code.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/extract-sql.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/operations.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/postgres-registry.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/rules-mysql.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/rules-postgres-add-column.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/rules-postgres-shared.js +0 -0
- /package/{lib → dist/lib}/performance/migrations/rules-postgres.js +0 -0
- /package/{lib/performance → dist/lib/performance/query-loops}/parallel-reads-policy.js +0 -0
- /package/{lib/performance → dist/lib/performance/query-loops}/query-policy.js +0 -0
- /package/{lib/performance → dist/lib/performance/query-loops}/service-loop-operations.js +0 -0
- /package/{lib → dist/lib}/performance/schema/context.js +0 -0
- /package/{lib → dist/lib}/performance/schema/model.js +0 -0
- /package/{lib → dist/lib}/performance/schema/project-indexes-events.js +0 -0
- /package/{lib → dist/lib}/performance/schema/project-indexes.js +0 -0
- /package/{lib → dist/lib}/performance/schema/query-sites.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/backend-mastery-fixes.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/batch-loops.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-copy.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-existence.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-find.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-helpers.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-lookup-declarations.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-lookups.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collection-membership.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/collections.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/database.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/drizzle-index.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/frontend-fixes.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/guard-queries.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/hoisting.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/indexes.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/integrity-drizzle.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/integrity-wrap.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/integrity.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/method-calls.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/migration-column-rules.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/migration-context.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/migration-lock-rules.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/migration-placement.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/migrations.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/pure-js-hashing.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-collections.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-lookups.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-materialization.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-names.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-nodes.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-pg-redis.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-prisma.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-sites.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loop-typeorm.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/query-loops.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/queue-loops.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/redis-keys.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-concurrent.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-imports.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-read-batch.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-siblings.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-signature.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-sites.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loop-write-batch.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/service-loops.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/streams.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/sync-calls.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/sync-imports.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/transaction-escape.js +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/transaction-io.js +0 -0
- /package/{lib/performance/types/batch-plan.js → dist/lib/performance/site-fixes/types/module-binding.js} +0 -0
- /package/{lib → dist/lib}/performance/site-fixes/writes.js +0 -0
- /package/{lib → dist/lib}/performance/sql/locations.js +0 -0
- /package/{lib → dist/lib}/performance/sql/mysql-tokens.js +0 -0
- /package/{lib → dist/lib}/performance/sql/pg-parser.js +0 -0
- /package/{lib → dist/lib}/performance/types/ast-grep-match.js +0 -0
- /package/{lib/performance/types/batched-fix-input.js → dist/lib/performance/types/batch-plan.js} +0 -0
- /package/{lib/performance/types/call-site.js → dist/lib/performance/types/batched-fix-input.js} +0 -0
- /package/{lib/performance/types/callee-helper.js → dist/lib/performance/types/call-site.js} +0 -0
- /package/{lib/performance/types/client-family.js → dist/lib/performance/types/callee-helper.js} +0 -0
- /package/{lib/performance/types/collections.js → dist/lib/performance/types/client-family.js} +0 -0
- /package/{lib/performance/types/db-cli.js → dist/lib/performance/types/collections.js} +0 -0
- /package/{lib → dist/lib}/performance/types/contract-findings.js +0 -0
- /package/{lib/performance/types/db-connection.js → dist/lib/performance/types/db-cli.js} +0 -0
- /package/{lib/performance/types/db-plan-findings.js → dist/lib/performance/types/db-connection.js} +0 -0
- /package/{lib → dist/lib}/performance/types/db-model.js +0 -0
- /package/{lib/performance/types/db-snapshot.js → dist/lib/performance/types/db-plan-findings.js} +0 -0
- /package/{lib → dist/lib}/performance/types/db-plan.js +0 -0
- /package/{lib/performance/types/decorator-call.js → dist/lib/performance/types/db-snapshot.js} +0 -0
- /package/{lib → dist/lib}/performance/types/declaration-link.js +0 -0
- /package/{lib/performance/types/drizzle-query.js → dist/lib/performance/types/decorator-call.js} +0 -0
- /package/{lib/performance/types/helper-function.js → dist/lib/performance/types/drizzle-query.js} +0 -0
- /package/{lib → dist/lib}/performance/types/find-lookup-facts.js +0 -0
- /package/{lib/performance/types/hoist-anchor.js → dist/lib/performance/types/helper-function.js} +0 -0
- /package/{lib/performance/types/http-call.js → dist/lib/performance/types/hoist-anchor.js} +0 -0
- /package/{lib/performance/types/lookup-construction.js → dist/lib/performance/types/http-call.js} +0 -0
- /package/{lib/performance/types/lookup-placement.js → dist/lib/performance/types/lookup-construction.js} +0 -0
- /package/{lib/performance/types/loop-key-site.js → dist/lib/performance/types/lookup-placement.js} +0 -0
- /package/{lib/performance/types/loop-lookup.js → dist/lib/performance/types/loop-key-site.js} +0 -0
- /package/{lib/performance/types/method-call.js → dist/lib/performance/types/loop-lookup.js} +0 -0
- /package/{lib/performance/types/migration-extraction.js → dist/lib/performance/types/method-call.js} +0 -0
- /package/{lib/performance/types/migration-files.js → dist/lib/performance/types/migration-extraction.js} +0 -0
- /package/{lib/performance/types/migration-operations.js → dist/lib/performance/types/migration-files.js} +0 -0
- /package/{lib/performance/types/migrations.js → dist/lib/performance/types/migration-operations.js} +0 -0
- /package/{lib/performance/types/native-modules.js → dist/lib/performance/types/migrations.js} +0 -0
- /package/{lib → dist/lib}/performance/types/model-fallback.js +0 -0
- /package/{lib → dist/lib}/performance/types/mysql-statements.js +0 -0
- /package/{lib/performance/types/native-typescript.js → dist/lib/performance/types/native-modules.js} +0 -0
- /package/{lib/performance/types/otlp-attributes.js → dist/lib/performance/types/native-typescript.js} +0 -0
- /package/{lib/performance/types/otlp-trace.js → dist/lib/performance/types/otlp-attributes.js} +0 -0
- /package/{lib/performance/types/page-count-pair.js → dist/lib/performance/types/otlp-trace.js} +0 -0
- /package/{lib/performance/types/parallel-reads.js → dist/lib/performance/types/page-count-pair.js} +0 -0
- /package/{lib/performance/types/performance-policy.js → dist/lib/performance/types/parallel-reads.js} +0 -0
- /package/{lib/performance/types/pg-statements.js → dist/lib/performance/types/performance-policy.js} +0 -0
- /package/{lib/performance/types/plain-property.js → dist/lib/performance/types/pg-statements.js} +0 -0
- /package/{lib/performance/types/postgres-registry.js → dist/lib/performance/types/plain-property.js} +0 -0
- /package/{lib/performance/types/prisma-schema.js → dist/lib/performance/types/postgres-registry.js} +0 -0
- /package/{lib/performance/types/program-scan.js → dist/lib/performance/types/prisma-schema.js} +0 -0
- /package/{lib/performance/types/project-indexes.js → dist/lib/performance/types/program-scan.js} +0 -0
- /package/{lib/performance/types/query-loops.js → dist/lib/performance/types/project-indexes.js} +0 -0
- /package/{lib/performance/types/query-site.js → dist/lib/performance/types/query-loops.js} +0 -0
- /package/{lib/performance/types/repeat-owner.js → dist/lib/performance/types/query-site.js} +0 -0
- /package/{lib → dist/lib}/performance/types/related-location.js +0 -0
- /package/{lib/performance/types/request-handler.js → dist/lib/performance/types/repeat-owner.js} +0 -0
- /package/{lib/performance/types/request-input.js → dist/lib/performance/types/request-handler.js} +0 -0
- /package/{lib/performance/types/sibling-declaration.js → dist/lib/performance/types/request-input.js} +0 -0
- /package/{lib → dist/lib}/performance/types/schema-model.js +0 -0
- /package/{lib/performance/types/source-analyzer.js → dist/lib/performance/types/sibling-declaration.js} +0 -0
- /package/{lib/performance/types/source-check-values.js → dist/lib/performance/types/source-analyzer.js} +0 -0
- /package/{lib/performance/types/source-command.js → dist/lib/performance/types/source-check-values.js} +0 -0
- /package/{lib/performance/types/source-scan-values.js → dist/lib/performance/types/source-command.js} +0 -0
- /package/{lib → dist/lib}/performance/types/source-position.js +0 -0
- /package/{lib/performance/types/typeorm-save-shape.js → dist/lib/performance/types/source-scan-values.js} +0 -0
- /package/{lib → dist/lib}/performance/types/statement-range.js +0 -0
- /package/{lib/performance/types/typescript-binder.js → dist/lib/performance/types/typeorm-save-shape.js} +0 -0
- /package/{lib/performance/types/typescript-token-lookup.js → dist/lib/performance/types/typescript-binder.js} +0 -0
- /package/{lib/performance/types/typescript-token-position.js → dist/lib/performance/types/typescript-token-lookup.js} +0 -0
- /package/{lib/security/types/condition-guards.js → dist/lib/performance/types/typescript-token-position.js} +0 -0
- /package/{lib → dist/lib}/reliability/site-fixes/resource-leaks.js +0 -0
- /package/{lib/security/types/file-finding.js → dist/lib/reliability/types/parse-failure.js} +0 -0
- /package/{lib → dist/lib}/reliability/usage.js +0 -0
- /package/{lib → dist/lib}/security/auth-crypto/rule-ids.js +0 -0
- /package/{lib → dist/lib}/security/deps/advisory.js +0 -0
- /package/{lib → dist/lib}/security/deps/rule-ids.js +0 -0
- /package/{lib → dist/lib}/security/examples/auth-crypto.cjs +0 -0
- /package/{lib → dist/lib}/security/examples/deps.cjs +0 -0
- /package/{lib → dist/lib}/security/examples/exposure.cjs +0 -0
- /package/{lib → dist/lib}/security/examples/files.cjs +0 -0
- /package/{lib → dist/lib}/security/examples/moved.cjs +0 -0
- /package/{lib → dist/lib}/security/examples/request-forgery.cjs +0 -0
- /package/{lib → dist/lib}/security/exposure/index.js +0 -0
- /package/{lib → dist/lib}/security/exposure/react-version.js +0 -0
- /package/{lib → dist/lib}/security/exposure/report.js +0 -0
- /package/{lib → dist/lib}/security/exposure/rule-ids.js +0 -0
- /package/{lib → dist/lib}/security/files/compose.js +0 -0
- /package/{lib → dist/lib}/security/files/dockerfile.js +0 -0
- /package/{lib → dist/lib}/security/files/index.js +0 -0
- /package/{lib → dist/lib}/security/files/rule-ids.js +0 -0
- /package/{lib → dist/lib}/security/files/secret-values.js +0 -0
- /package/{lib → dist/lib}/security/injection/regex-pattern.js +0 -0
- /package/{lib → dist/lib}/security/request-forgery/index.js +0 -0
- /package/{lib → dist/lib}/security/request-forgery/rule-ids.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/backend-security-fixes.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/error-responses.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/exposure.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/files.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/frontend-security-fixes.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/list-edits.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/request-forgery.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/secret-comparison.js +0 -0
- /package/{lib → dist/lib}/security/site-fixes/template-autoescape.js +0 -0
- /package/{lib/security/types/inspectable-type.js → dist/lib/security/types/condition-guards.js} +0 -0
- /package/{lib/security/types/lockfile.js → dist/lib/security/types/file-finding.js} +0 -0
- /package/{lib/security/types/osv-vulnerability.js → dist/lib/security/types/inspectable-type.js} +0 -0
- /package/{lib/security/types/project-files.js → dist/lib/security/types/lockfile.js} +0 -0
- /package/{lib/security/types/propagation.js → dist/lib/security/types/osv-vulnerability.js} +0 -0
- /package/{lib/security/types/rule-example.js → dist/lib/security/types/project-files.js} +0 -0
- /package/{lib/security/types/schema-call.js → dist/lib/security/types/propagation.js} +0 -0
- /package/{lib/security/types/security-check.js → dist/lib/security/types/rule-example.js} +0 -0
- /package/{lib/shared/types.js → dist/lib/security/types/schema-call.js} +0 -0
- /package/{lib/shared/types/baseline.js → dist/lib/security/types/security-check.js} +0 -0
- /package/{lib/shared → dist/lib/shared/agent}/agent-session.js +0 -0
- /package/{lib/shared → dist/lib/shared/agent}/managed-blocks.js +0 -0
- /package/{lib/shared → dist/lib/shared/agent}/notify-editor.js +0 -0
- /package/{lib/shared → dist/lib/shared/agent}/review-delivery.js +0 -0
- /package/{lib/shared → dist/lib/shared/agent}/review-request.js +0 -0
- /package/{lib/shared → dist/lib/shared/analysis}/hot-path.js +0 -0
- /package/{lib/shared → dist/lib/shared/analysis}/polyglot-compatibility.js +0 -0
- /package/{lib → dist/lib}/shared/explain.js +0 -0
- /package/{lib/shared → dist/lib/shared/fix}/fix-imports.js +0 -0
- /package/{lib/shared → dist/lib/shared/fix}/fix-presentation-prettier.js +0 -0
- /package/{lib/shared → dist/lib/shared/fix}/fix-presentation-rows.js +0 -0
- /package/{lib/shared → dist/lib/shared/fix}/fix-safety.js +0 -0
- /package/{lib/shared → dist/lib/shared/fix}/fix-terminal.js +0 -0
- /package/{lib → dist/lib}/shared/formats/contract-rules.js +0 -0
- /package/{lib → dist/lib}/shared/formats/github.js +0 -0
- /package/{lib → dist/lib}/shared/formats/index.js +0 -0
- /package/{lib → dist/lib}/shared/project-root.js +0 -0
- /package/{lib/shared → dist/lib/shared/reporting}/baseline-flags.js +0 -0
- /package/{lib/shared → dist/lib/shared/reporting}/reason-groups.js +0 -0
- /package/{lib → dist/lib}/shared/rule-registry.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/build-output.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/error-code.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/git-paths.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/glob.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/heap-limit.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/is-record.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/real-target.js +0 -0
- /package/{lib/shared → dist/lib/shared/system}/shell-argument.js +0 -0
- /package/{lib/shared/types/cli-finding.js → dist/lib/shared/types/baseline.js} +0 -0
- /package/{lib/shared/types/fix-hunks.js → dist/lib/shared/types/checker-run.js} +0 -0
- /package/{lib/shared/types/fix-presentation.js → dist/lib/shared/types/fix-hunks.js} +0 -0
- /package/{lib/shared/types/fix-run.js → dist/lib/shared/types/fix-presentation.js} +0 -0
- /package/{lib/shared/types/function-summaries.js → dist/lib/shared/types/fix-run.js} +0 -0
- /package/{lib/shared/types/managed-blocks.js → dist/lib/shared/types/function-summaries.js} +0 -0
- /package/{lib/shared/types/pillar-name.js → dist/lib/shared/types/managed-blocks.js} +0 -0
- /package/{lib/shared/types/report-formats.js → dist/lib/shared/types/pillar-name.js} +0 -0
- /package/{lib/shared/types/review-event.js → dist/lib/shared/types/report-formats.js} +0 -0
- /package/{lib/shared/types/review-history.js → dist/lib/shared/types/review-event.js} +0 -0
- /package/{lib/shared/types/settings.js → dist/lib/shared/types/review-history.js} +0 -0
- /package/{lib/shared/types/source-report.js → dist/lib/shared/types/settings.js} +0 -0
- /package/{lib/shared/types/typescript-assignment-target.js → dist/lib/shared/types/source-report.js} +0 -0
- /package/{lib/shared/types/typescript-internals.js → dist/lib/shared/types/typescript-assignment-target.js} +0 -0
- /package/{lib/shared/types/typescript-module-resolution.js → dist/lib/shared/types/typescript-internals.js} +0 -0
- /package/{lib/shared/types/typescript-outer-expression.js → dist/lib/shared/types/typescript-module-resolution.js} +0 -0
- /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
|
[](https://www.npmjs.com/package/loadwise) [](https://github.com/IbrahimHafez1/loadwise/actions/workflows/check.yml) [](https://scorecard.dev/viewer/?uri=github.com/IbrahimHafez1/loadwise) [](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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`
|
|
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 = { '
|
|
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 = "
|
|
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
|
|
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": ["
|
|
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
|
-
. ("
|
|
333
|
+
. ("node" "/absolute/path/to/loadwise.js" "lsp" "--stdio"))))
|
|
333
334
|
```
|
|
334
335
|
|
|
335
|
-
**VS Code and VSCodium**:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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="
|
|
641
|
-
| <a id="csharp-
|
|
642
|
-
| <a id="
|
|
643
|
-
| <a id="
|
|
644
|
-
| <a id="drizzle-write
|
|
645
|
-
| <a id="
|
|
646
|
-
| <a id="error-
|
|
647
|
-
| <a id="
|
|
648
|
-
| <a id="
|
|
649
|
-
| <a id="
|
|
650
|
-
| <a id="
|
|
651
|
-
| <a id="go-error-
|
|
652
|
-
| <a id="
|
|
653
|
-
| <a id="
|
|
654
|
-
| <a id="
|
|
655
|
-
| <a id="
|
|
656
|
-
| <a id="
|
|
657
|
-
| <a id="
|
|
658
|
-
| <a id="
|
|
659
|
-
| <a id="
|
|
660
|
-
| <a id="
|
|
661
|
-
| <a id="
|
|
662
|
-
| <a id="
|
|
663
|
-
| <a id="
|
|
664
|
-
| <a id="
|
|
665
|
-
| <a id="
|
|
666
|
-
| <a id="prisma-
|
|
667
|
-
| <a id="
|
|
668
|
-
| <a id="
|
|
669
|
-
| <a id="
|
|
670
|
-
| <a id="
|
|
671
|
-
| <a id="
|
|
672
|
-
| <a id="
|
|
673
|
-
| <a id="react-
|
|
674
|
-
| <a id="react-state-
|
|
675
|
-
| <a id="
|
|
676
|
-
| <a id="
|
|
677
|
-
| <a id="
|
|
678
|
-
| <a id="
|
|
679
|
-
| <a id="
|
|
680
|
-
| <a id="
|
|
681
|
-
| <a id="
|
|
682
|
-
| <a id="
|
|
683
|
-
| <a id="
|
|
684
|
-
| <a id="
|
|
685
|
-
| <a id="
|
|
686
|
-
| <a id="
|
|
687
|
-
| <a id="
|
|
688
|
-
| <a id="
|
|
689
|
-
| <a id="
|
|
690
|
-
| <a id="
|
|
691
|
-
| <a id="
|
|
692
|
-
| <a id="
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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="
|
|
858
|
-
| <a id="express-missing-
|
|
859
|
-
| <a id="
|
|
860
|
-
| <a id="
|
|
861
|
-
| <a id="graphql-
|
|
862
|
-
| <a id="graphql-
|
|
863
|
-
| <a id="
|
|
864
|
-
| <a id="
|
|
865
|
-
| <a id="insecure-
|
|
866
|
-
| <a id="
|
|
867
|
-
| <a id="
|
|
868
|
-
| <a id="jwt-
|
|
869
|
-
| <a id="jwt-
|
|
870
|
-
| <a id="jwt-
|
|
871
|
-
| <a id="jwt-
|
|
872
|
-
| <a id="
|
|
873
|
-
| <a id="
|
|
874
|
-
| <a id="
|
|
875
|
-
| <a id="
|
|
876
|
-
| <a id="
|
|
877
|
-
| <a id="
|
|
878
|
-
| <a id="
|
|
879
|
-
| <a id="
|
|
880
|
-
| <a id="
|
|
881
|
-
| <a id="
|
|
882
|
-
| <a id="
|
|
883
|
-
| <a id="
|
|
884
|
-
| <a id="
|
|
885
|
-
| <a id="prisma-
|
|
886
|
-
| <a id="
|
|
887
|
-
| <a id="
|
|
888
|
-
| <a id="
|
|
889
|
-
| <a id="
|
|
890
|
-
| <a id="regex-
|
|
891
|
-
| <a id="
|
|
892
|
-
| <a id="secret-
|
|
893
|
-
| <a id="secret-in-
|
|
894
|
-
| <a id="
|
|
895
|
-
| <a id="
|
|
896
|
-
| <a id="
|
|
897
|
-
| <a id="ssrf-
|
|
898
|
-
| <a id="
|
|
899
|
-
| <a id="
|
|
900
|
-
| <a id="template-
|
|
901
|
-
| <a id="
|
|
902
|
-
| <a id="
|
|
903
|
-
| <a id="
|
|
904
|
-
| <a id="
|
|
905
|
-
| <a id="
|
|
906
|
-
| <a id="
|
|
907
|
-
| <a id="
|
|
908
|
-
| <a id="
|
|
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
|
|
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
|
|
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
|
|
967
|
-
|
|
|
968
|
-
| <a id="a11y-button-missing-type"></a>[`a11y-button-missing-type`](docs/rules/a11y-button-missing-type.md)
|
|
969
|
-
| <a id="a11y-clickable-non-interactive"></a>[`a11y-clickable-non-interactive`](docs/rules/a11y-clickable-non-interactive.md)
|
|
970
|
-
| <a id="a11y-
|
|
971
|
-
| <a id="a11y-
|
|
972
|
-
| <a id="a11y-
|
|
973
|
-
| <a id="a11y-
|
|
974
|
-
| <a id="a11y-missing-
|
|
975
|
-
| <a id="a11y-
|
|
976
|
-
| <a id="a11y-
|
|
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
|
|