loadwise 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -15
- package/dist/bin/loadwise.js +12 -24
- package/dist/lib/accessibility/analyze.js +5 -3
- package/dist/lib/accessibility/angular-inline.js +9 -11
- package/dist/lib/accessibility/angular-literal.js +39 -0
- package/dist/lib/accessibility/form-context.js +36 -0
- package/dist/lib/accessibility/frame-head.js +92 -0
- package/dist/lib/accessibility/frame-viewport.js +149 -0
- package/dist/lib/accessibility/jsx-elements.js +13 -3
- package/dist/lib/accessibility/markup-files.js +7 -2
- package/dist/lib/accessibility/rule-ids.js +3 -0
- package/dist/lib/accessibility/rules.js +128 -41
- package/dist/lib/accessibility/site-fixes/buttons.js +5 -1
- package/dist/lib/accessibility/template-attributes.js +5 -3
- package/dist/lib/accessibility/template-elements.js +25 -6
- package/dist/lib/accessibility/template-file.js +40 -25
- package/dist/lib/editor/accessibility-examples.js +6 -1
- package/dist/lib/editor/actions.js +46 -7
- package/dist/lib/editor/apply-fix.js +69 -4
- package/dist/lib/editor/configured-setup.js +5 -3
- package/dist/lib/editor/diagnostics.js +206 -17
- package/dist/lib/editor/dismissals.js +85 -26
- package/dist/lib/editor/editor-document.js +5 -2
- package/dist/lib/editor/editor-launcher.js +7 -2
- package/dist/lib/editor/language-server.js +64 -25
- package/dist/lib/editor/native-setup.js +3 -2
- package/dist/lib/editor/perf-watch.js +8 -6
- package/dist/lib/editor/reliability-examples.js +15 -0
- package/dist/lib/editor/scan-session.js +29 -8
- package/dist/lib/editor/server-commands.js +36 -9
- package/dist/lib/editor/setup-server.js +1 -1
- package/dist/lib/editor/setup-vim.js +6 -4
- package/dist/lib/editor/workspace-files.js +61 -7
- package/dist/lib/editor/workspace-paths.js +41 -1
- package/dist/lib/maintainability/analysis/analyze-source.js +1 -1
- package/dist/lib/maintainability/architecture/architecture.js +4 -4
- package/dist/lib/maintainability/cli/changed-lines.js +20 -2
- package/dist/lib/maintainability/cli/inputs.js +9 -1
- package/dist/lib/maintainability/cli.js +4 -0
- package/dist/lib/maintainability/entry-points/entry-points.js +44 -15
- package/dist/lib/maintainability/entry-points/html-entry-points.js +5 -1
- package/dist/lib/maintainability/quality/functions.js +9 -6
- package/dist/lib/maintainability/quality/limits.js +19 -0
- package/dist/lib/maintainability/quality/size-limits.js +8 -2
- package/dist/lib/maintainability/quality/stray-console.js +62 -1
- package/dist/lib/maintainability/quality/tsconfig-strict.js +2 -0
- package/dist/lib/maintainability/scan-changed.js +4 -1
- package/dist/lib/maintainability/scan-worker.js +6 -2
- package/dist/lib/maintainability/scan.js +21 -8
- package/dist/lib/maintainability/unused/module-usage.js +43 -21
- package/dist/lib/maintainability/unused/unused-modules.js +5 -10
- package/dist/lib/performance/analysis/source-inputs.js +7 -2
- package/dist/lib/performance/analysis/source-options.js +7 -6
- package/dist/lib/performance/analyze.js +16 -3
- package/dist/lib/performance/cli/cli-output.js +1 -0
- package/dist/lib/performance/cli/cli-scan.js +21 -2
- package/dist/lib/performance/cli.js +8 -3
- package/dist/lib/performance/collections/memory-growth.js +55 -12
- package/dist/lib/performance/contracts/openapi.js +13 -4
- package/dist/lib/performance/datastores/pg-integrity.js +61 -22
- package/dist/lib/performance/datastores/pg-session-release.js +114 -0
- package/dist/lib/performance/datastores/pg-session-sql.js +144 -0
- package/dist/lib/performance/datastores/pooling.js +56 -2
- package/dist/lib/performance/datastores/redis.js +94 -18
- package/dist/lib/performance/datastores/session-store.js +2 -1
- package/dist/lib/performance/db/checks.js +19 -8
- package/dist/lib/performance/db/gateway.js +3 -1
- package/dist/lib/performance/db/plan-estimates.js +4 -4
- package/dist/lib/performance/engine/native.js +11 -7
- package/dist/lib/performance/evidence/plans.js +7 -5
- package/dist/lib/performance/evidence/traces.js +21 -1
- package/dist/lib/performance/frontend/angular-teardown.js +96 -0
- package/dist/lib/performance/frontend/effect-cleanup.js +148 -0
- package/dist/lib/performance/frontend/frontend-dom-perf.js +14 -2
- package/dist/lib/performance/frontend/frontend-helpers.js +1 -9
- package/dist/lib/performance/frontend/frontend-perf.js +72 -57
- package/dist/lib/performance/migrations/extract-code-sql.js +16 -4
- package/dist/lib/performance/migrations/extract-code.js +13 -5
- package/dist/lib/performance/migrations/extract-sql.js +82 -38
- package/dist/lib/performance/migrations/operations.js +56 -13
- package/dist/lib/performance/migrations/postgres-lock-timeout.js +52 -0
- package/dist/lib/performance/migrations/postgres-registry.js +127 -26
- package/dist/lib/performance/migrations/postgres-settings.js +78 -0
- package/dist/lib/performance/migrations/rules-postgres-add-column.js +3 -3
- package/dist/lib/performance/migrations/rules-postgres-shared.js +9 -0
- package/dist/lib/performance/migrations/rules-postgres.js +88 -39
- package/dist/lib/performance/orm/offset-pagination.js +6 -4
- package/dist/lib/performance/orm/prisma-aggregates.js +69 -18
- package/dist/lib/performance/orm/unbounded-list-chain.js +29 -0
- package/dist/lib/performance/orm/unbounded-list-queries.js +18 -13
- package/dist/lib/performance/polyglot.js +111 -14
- package/dist/lib/performance/projects.js +3 -3
- package/dist/lib/performance/query-loops/sequential-loops.js +1 -0
- package/dist/lib/performance/request/backend-mastery.js +151 -42
- package/dist/lib/performance/request/mongoose-lean.js +175 -10
- package/dist/lib/performance/request/phase5-rules.js +74 -13
- package/dist/lib/performance/request/sql-select-star.js +150 -0
- package/dist/lib/performance/request/unbounded-promise-all.js +54 -29
- package/dist/lib/performance/request/upload-limits.js +5 -1
- package/dist/lib/performance/site-fix.js +4 -4
- package/dist/lib/performance/site-fixes/backend-mastery-fixes.js +298 -16
- package/dist/lib/performance/site-fixes/frontend-fixes.js +350 -10
- package/dist/lib/performance/site-fixes/migration-context.js +8 -1
- package/dist/lib/performance/site-fixes/migration-lock-rules.js +66 -30
- package/dist/lib/performance/site-fixes/prisma-aggregates.js +29 -9
- package/dist/lib/performance/site-fixes/small-rewrites.js +168 -10
- package/dist/lib/performance/site-fixes/sync-calls.js +14 -12
- package/dist/lib/performance/site-fixes/upload-limits.js +13 -7
- package/dist/lib/performance/sql/mysql-tokens.js +38 -12
- package/dist/lib/reliability/boundary-access.js +114 -57
- package/dist/lib/reliability/react-bugs.js +18 -4
- package/dist/lib/reliability/resource-leak-intervals.js +258 -0
- package/dist/lib/reliability/resource-leaks.js +209 -195
- package/dist/lib/reliability/rule-ids.js +10 -1
- package/dist/lib/reliability/site-fixes/resource-leaks.js +16 -1
- package/dist/lib/reliability/swallowed-errors.js +107 -21
- package/dist/lib/reliability/test-cleanup-after-await.js +92 -18
- package/dist/lib/reliability/walk.js +3 -2
- package/dist/lib/security/auth-crypto/hashing.js +24 -8
- package/dist/lib/security/auth-crypto/jwt.js +21 -6
- package/dist/lib/security/auth-crypto/secrets.js +44 -1
- package/dist/lib/security/auth-crypto/shared.js +3 -1
- package/dist/lib/security/auth-crypto/signing-algorithm.js +79 -0
- package/dist/lib/security/auth-crypto/transport-and-ciphers.js +85 -1
- package/dist/lib/security/cli.js +6 -2
- package/dist/lib/security/cookie-credentials.js +115 -0
- package/dist/lib/security/cookie-csrf.js +241 -0
- package/dist/lib/security/deps/advisory.js +50 -109
- package/dist/lib/security/deps/cli.js +1 -1
- package/dist/lib/security/deps/cvss-score.js +14 -0
- package/dist/lib/security/deps/fixed-version.js +97 -0
- package/dist/lib/security/deps/lockfiles.js +135 -74
- package/dist/lib/security/deps/osv.js +11 -3
- package/dist/lib/security/deps/scan.js +47 -20
- package/dist/lib/security/deps/yarn-lock.js +158 -0
- package/dist/lib/security/examples/injection.cjs +4 -0
- package/dist/lib/security/exposure/cookies.js +17 -2
- package/dist/lib/security/exposure/cors-origin-regex.js +2 -3
- package/dist/lib/security/exposure/frontend-security.js +21 -14
- package/dist/lib/security/exposure/jsx-url.js +18 -33
- package/dist/lib/security/exposure/logging.js +49 -10
- package/dist/lib/security/exposure/prototype-pollution.js +126 -56
- package/dist/lib/security/exposure/react-html.js +26 -0
- package/dist/lib/security/exposure/reflected-xss.js +34 -5
- package/dist/lib/security/files/compose.js +126 -1
- package/dist/lib/security/files/dockerfile.js +62 -4
- package/dist/lib/security/files/index.js +1 -1
- package/dist/lib/security/injection/command.js +46 -18
- package/dist/lib/security/injection/index.js +2 -0
- package/dist/lib/security/injection/ldap.js +86 -0
- package/dist/lib/security/injection/nosql.js +28 -4
- package/dist/lib/security/injection/redos.js +1 -1
- package/dist/lib/security/injection/rule-ids.js +1 -0
- package/dist/lib/security/injection/shared.js +5 -1
- package/dist/lib/security/injection/sql.js +28 -13
- package/dist/lib/security/lexical-declaration.js +113 -0
- package/dist/lib/security/pg-dynamic-query.js +28 -1
- package/dist/lib/security/pg-identifier-guards.js +107 -3
- package/dist/lib/security/phase5-rules.js +26 -135
- package/dist/lib/security/polyglot.js +2 -2
- package/dist/lib/security/redirect-settings.js +98 -0
- package/dist/lib/security/request-forgery/open-redirect.js +18 -5
- package/dist/lib/security/request-forgery/path-traversal.js +84 -6
- package/dist/lib/security/request-forgery/shared.js +1 -7
- package/dist/lib/security/request-forgery/ssrf.js +176 -14
- package/dist/lib/security/rule-descriptions.js +5 -1
- package/dist/lib/security/rule-ids.js +7 -0
- package/dist/lib/security/site-fixes/auth-crypto.js +5 -78
- package/dist/lib/security/site-fixes/exposure.js +21 -3
- package/dist/lib/security/site-fixes/files.js +11 -13
- package/dist/lib/security/site-fixes/frontend-security-fixes.js +2 -2
- package/dist/lib/security/site-fixes/injection.js +17 -4
- package/dist/lib/security/site-fixes/jwt.js +1 -20
- package/dist/lib/security/site-fixes/request-forgery.js +37 -29
- package/dist/lib/security/taint/binding-inputs.js +236 -0
- package/dist/lib/security/taint/filename-guard.js +45 -45
- package/dist/lib/security/taint/guards.js +14 -8
- package/dist/lib/security/taint/index.js +126 -154
- package/dist/lib/security/taint/propagate.js +43 -9
- package/dist/lib/security/taint/record-writes.js +161 -0
- package/dist/lib/security/taint/resolution-cache.js +13 -7
- package/dist/lib/security/taint/sanitizers.js +89 -5
- package/dist/lib/security/taint/trace-nodes.js +61 -0
- package/dist/lib/security/taint/validators.js +89 -9
- package/dist/lib/shared/agent/agent-init.js +2 -1
- package/dist/lib/shared/agent/agent-verify.js +4 -1
- package/dist/lib/shared/agent/git-hook.js +17 -6
- package/dist/lib/shared/agent/review-mcp.js +8 -2
- package/dist/lib/shared/analysis/ast-semantics.js +2 -2
- package/dist/lib/shared/analysis/scan-cache.js +96 -12
- package/dist/lib/shared/cli-dispatch.js +17 -0
- package/dist/lib/shared/config.js +27 -10
- package/dist/lib/shared/explain.js +1 -1
- package/dist/lib/shared/fix/fix-convergence.js +5 -3
- package/dist/lib/shared/fix/fix-imports.js +4 -171
- package/dist/lib/shared/fix/fix-presentation-comments.js +23 -9
- package/dist/lib/shared/fix/fix-presentation.js +5 -3
- package/dist/lib/shared/fix/fix-safety.js +7 -1
- package/dist/lib/shared/fix/fix-typecheck.js +8 -4
- package/dist/lib/shared/fix/import-text-edits.js +148 -0
- package/dist/lib/shared/fix.js +31 -7
- package/dist/lib/shared/formats/finding-location.js +4 -1
- package/dist/lib/shared/formats/github.js +3 -3
- package/dist/lib/shared/formats/sarif.js +9 -3
- package/dist/lib/shared/report-fp.js +6 -2
- package/dist/lib/shared/reporting/baseline.js +7 -5
- package/dist/lib/shared/reporting/pillars.js +9 -3
- package/dist/lib/shared/reporting/source-report.js +1 -0
- package/dist/lib/shared/system/glob.js +34 -8
- package/dist/lib/shared/system/sentry.js +26 -7
- package/dist/lib/shared/workspaces.js +15 -3
- package/package.json +5 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/hooks/check-edited-file.mjs +27 -5
- package/polyglot/performance/rules/csharp.yml +34 -5
- package/polyglot/performance/rules/java.yml +24 -1
- package/polyglot/performance/rules/python.yml +74 -2
- package/polyglot/performance/sgconfig.yml +1 -0
- package/polyglot/reliability/rules/csharp.yml +12 -6
- package/polyglot/reliability/rules/go.yml +86 -6
- package/polyglot/reliability/rules/java.yml +22 -1
- package/polyglot/reliability/sgconfig.yml +1 -0
- package/polyglot/security/rules/go.yml +100 -22
- package/polyglot/security/rules/python.yml +74 -6
- package/polyglot/security/rules/rust.yml +65 -0
- package/polyglot/security/sgconfig.yml +1 -0
- package/schema/loadwise.config.schema.json +554 -76
- /package/polyglot/{performance/rules → shared-rules}/input.yml +0 -0
|
@@ -15,17 +15,36 @@ rule:
|
|
|
15
15
|
id: python-unsafe-yaml-load
|
|
16
16
|
language: Python
|
|
17
17
|
severity: warning
|
|
18
|
-
message: yaml.load without SafeLoader can construct arbitrary Python objects. Use yaml.safe_load or pass Loader=yaml.SafeLoader.
|
|
18
|
+
message: yaml.load or yaml.load_all without SafeLoader can construct arbitrary Python objects. Use yaml.safe_load / yaml.safe_load_all or pass Loader=yaml.SafeLoader.
|
|
19
19
|
rule:
|
|
20
20
|
any:
|
|
21
21
|
- pattern: yaml.unsafe_load($$$ARGS)
|
|
22
|
+
- pattern: yaml.unsafe_load_all($$$ARGS)
|
|
22
23
|
- all:
|
|
23
|
-
-
|
|
24
|
+
- any:
|
|
25
|
+
- pattern: yaml.load($$$ARGS)
|
|
26
|
+
- pattern: yaml.load_all($$$ARGS)
|
|
24
27
|
- not:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
any:
|
|
29
|
+
- has:
|
|
30
|
+
stopBy: end
|
|
31
|
+
kind: keyword_argument
|
|
32
|
+
regex: 'SafeLoader'
|
|
33
|
+
- has:
|
|
34
|
+
kind: argument_list
|
|
35
|
+
has:
|
|
36
|
+
any:
|
|
37
|
+
- kind: attribute
|
|
38
|
+
regex: '^yaml\.C?SafeLoader$'
|
|
39
|
+
- kind: identifier
|
|
40
|
+
regex: '^C?SafeLoader$'
|
|
41
|
+
- kind: parenthesized_expression
|
|
42
|
+
has:
|
|
43
|
+
any:
|
|
44
|
+
- kind: attribute
|
|
45
|
+
regex: '^yaml\.C?SafeLoader$'
|
|
46
|
+
- kind: identifier
|
|
47
|
+
regex: '^C?SafeLoader$'
|
|
29
48
|
|
|
30
49
|
---
|
|
31
50
|
id: python-subprocess-shell-true
|
|
@@ -46,3 +65,52 @@ rule:
|
|
|
46
65
|
stopBy: end
|
|
47
66
|
kind: keyword_argument
|
|
48
67
|
regex: '^shell\s*=\s*True$'
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
id: python-requests-tls-verify-disabled
|
|
71
|
+
language: Python
|
|
72
|
+
severity: warning
|
|
73
|
+
message: Disabling TLS certificate verification with verify=False exposes requests to man-in-the-middle attacks. Keep verify=True or pass an explicit CA bundle path.
|
|
74
|
+
ignores:
|
|
75
|
+
- '**/test_*.py'
|
|
76
|
+
- '**/*_test.py'
|
|
77
|
+
- '**/tests/**'
|
|
78
|
+
- '**/test/**'
|
|
79
|
+
rule:
|
|
80
|
+
all:
|
|
81
|
+
- any:
|
|
82
|
+
- pattern: requests.get($$$ARGS)
|
|
83
|
+
- pattern: requests.post($$$ARGS)
|
|
84
|
+
- pattern: requests.put($$$ARGS)
|
|
85
|
+
- pattern: requests.patch($$$ARGS)
|
|
86
|
+
- pattern: requests.delete($$$ARGS)
|
|
87
|
+
- pattern: requests.head($$$ARGS)
|
|
88
|
+
- pattern: requests.options($$$ARGS)
|
|
89
|
+
- pattern: requests.request($$$ARGS)
|
|
90
|
+
- has:
|
|
91
|
+
stopBy: neighbor
|
|
92
|
+
kind: argument_list
|
|
93
|
+
has:
|
|
94
|
+
stopBy: neighbor
|
|
95
|
+
kind: keyword_argument
|
|
96
|
+
regex: '^verify\s*=\s*False$'
|
|
97
|
+
- inside:
|
|
98
|
+
kind: module
|
|
99
|
+
stopBy: end
|
|
100
|
+
has:
|
|
101
|
+
stopBy: end
|
|
102
|
+
any:
|
|
103
|
+
- kind: import_statement
|
|
104
|
+
regex: '\brequests\b'
|
|
105
|
+
- kind: aliased_import
|
|
106
|
+
regex: '\bas\s+requests$'
|
|
107
|
+
- not:
|
|
108
|
+
inside:
|
|
109
|
+
any:
|
|
110
|
+
- kind: block
|
|
111
|
+
- kind: module
|
|
112
|
+
stopBy: end
|
|
113
|
+
has:
|
|
114
|
+
stopBy: neighbor
|
|
115
|
+
kind: expression_statement
|
|
116
|
+
regex: '^requests\s*='
|
|
@@ -21,3 +21,68 @@ rule:
|
|
|
21
21
|
- inside:
|
|
22
22
|
kind: unsafe_block
|
|
23
23
|
stopBy: end
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
id: rust-reqwest-danger-accept-invalid-certs
|
|
27
|
+
language: Rust
|
|
28
|
+
severity: warning
|
|
29
|
+
message: Calling danger_accept_invalid_certs(true) on a reqwest client disables TLS certificate verification. Keep certificate verification enabled or configure an explicit root certificate.
|
|
30
|
+
ignores:
|
|
31
|
+
- '**/*_test.rs'
|
|
32
|
+
- '**/tests/**'
|
|
33
|
+
- '**/test/**'
|
|
34
|
+
rule:
|
|
35
|
+
all:
|
|
36
|
+
- pattern: $BUILDER.danger_accept_invalid_certs(true)
|
|
37
|
+
- has:
|
|
38
|
+
stopBy: end
|
|
39
|
+
any:
|
|
40
|
+
- pattern: Client::builder()
|
|
41
|
+
- pattern: ClientBuilder::new()
|
|
42
|
+
- pattern: reqwest::Client::builder()
|
|
43
|
+
- pattern: reqwest::ClientBuilder::new()
|
|
44
|
+
- inside:
|
|
45
|
+
kind: source_file
|
|
46
|
+
stopBy: end
|
|
47
|
+
has:
|
|
48
|
+
stopBy: end
|
|
49
|
+
kind: use_declaration
|
|
50
|
+
regex: '\breqwest\b'
|
|
51
|
+
- not:
|
|
52
|
+
inside:
|
|
53
|
+
any:
|
|
54
|
+
- kind: mod_item
|
|
55
|
+
follows:
|
|
56
|
+
stopBy:
|
|
57
|
+
not:
|
|
58
|
+
any:
|
|
59
|
+
- kind: attribute_item
|
|
60
|
+
- kind: line_comment
|
|
61
|
+
- kind: block_comment
|
|
62
|
+
kind: attribute_item
|
|
63
|
+
regex: 'cfg\s*\(\s*test\s*\)'
|
|
64
|
+
- kind: function_item
|
|
65
|
+
follows:
|
|
66
|
+
stopBy:
|
|
67
|
+
not:
|
|
68
|
+
any:
|
|
69
|
+
- kind: attribute_item
|
|
70
|
+
- kind: line_comment
|
|
71
|
+
- kind: block_comment
|
|
72
|
+
kind: attribute_item
|
|
73
|
+
regex: 'cfg\s*\(\s*test\s*\)'
|
|
74
|
+
- kind: function_item
|
|
75
|
+
follows:
|
|
76
|
+
stopBy:
|
|
77
|
+
not:
|
|
78
|
+
any:
|
|
79
|
+
- kind: attribute_item
|
|
80
|
+
- kind: line_comment
|
|
81
|
+
- kind: block_comment
|
|
82
|
+
kind: attribute_item
|
|
83
|
+
regex: '^#\[\s*(?:tokio::)?test\s*(?:\(.*\))?\s*\]$'
|
|
84
|
+
- kind: source_file
|
|
85
|
+
has:
|
|
86
|
+
kind: inner_attribute_item
|
|
87
|
+
regex: 'cfg\s*\(\s*test\s*\)'
|
|
88
|
+
stopBy: end
|