@critiq/rules 0.0.1
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 +169 -0
- package/catalog.yaml +599 -0
- package/package.json +21 -0
- package/rules/shared/security.insecure-http-transport.rule.yaml +42 -0
- package/rules/shared/security.no-command-execution-with-request-input.rule.yaml +42 -0
- package/rules/shared/security.no-hardcoded-credentials.rule.yaml +42 -0
- package/rules/shared/security.no-request-path-file-read.rule.yaml +42 -0
- package/rules/shared/security.no-sensitive-data-in-logs-and-telemetry.rule.yaml +44 -0
- package/rules/shared/security.no-sql-interpolation.rule.yaml +42 -0
- package/rules/shared/security.tls-verification-disabled.rule.yaml +42 -0
- package/rules/shared/security.unsafe-deserialization.rule.yaml +41 -0
- package/rules/shared/security.weak-hash-algorithm.rule.yaml +41 -0
- package/rules/typescript/ts.config.no-process-env-outside-config.rule.yaml +37 -0
- package/rules/typescript/ts.correctness.blocking-call-in-async-flow.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.constant-condition.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.implicit-undefined-return.rule.yaml +34 -0
- package/rules/typescript/ts.correctness.incorrect-boolean-logic.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.missing-await-on-async-call.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.missing-default-dispatch.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.missing-timeout-on-external-call.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.nested-property-access-without-check.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.off-by-one-loop-boundary.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.optional-value-without-fallback.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.possible-null-dereference.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.shared-state-race.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.unchecked-map-key-access.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.unhandled-async-error.rule.yaml +35 -0
- package/rules/typescript/ts.correctness.unreachable-statement.rule.yaml +40 -0
- package/rules/typescript/ts.logging.no-console-error.rule.yaml +34 -0
- package/rules/typescript/ts.logging.no-console-log.rule.yaml +34 -0
- package/rules/typescript/ts.next.no-server-client-boundary-leaks.rule.yaml +36 -0
- package/rules/typescript/ts.performance.inefficient-data-structure-usage.rule.yaml +35 -0
- package/rules/typescript/ts.performance.large-payload-without-streaming.rule.yaml +35 -0
- package/rules/typescript/ts.performance.missing-batch-operations.rule.yaml +35 -0
- package/rules/typescript/ts.performance.nested-loops-hot-path.rule.yaml +35 -0
- package/rules/typescript/ts.performance.repeated-expensive-computation.rule.yaml +35 -0
- package/rules/typescript/ts.performance.repeated-io-in-loop.rule.yaml +35 -0
- package/rules/typescript/ts.performance.retained-large-object.rule.yaml +35 -0
- package/rules/typescript/ts.performance.sequential-async-calls.rule.yaml +35 -0
- package/rules/typescript/ts.performance.unbounded-growth-memory-leak.rule.yaml +35 -0
- package/rules/typescript/ts.performance.unnecessary-rerenders-from-state-misuse.rule.yaml +35 -0
- package/rules/typescript/ts.quality.deep-nesting.rule.yaml +35 -0
- package/rules/typescript/ts.quality.duplicate-code-block.rule.yaml +35 -0
- package/rules/typescript/ts.quality.function-too-large-or-complex.rule.yaml +35 -0
- package/rules/typescript/ts.quality.hardcoded-configuration-values.rule.yaml +35 -0
- package/rules/typescript/ts.quality.logic-change-without-test-updates.rule.yaml +36 -0
- package/rules/typescript/ts.quality.magic-numbers-or-strings.rule.yaml +35 -0
- package/rules/typescript/ts.quality.missing-error-context.rule.yaml +35 -0
- package/rules/typescript/ts.quality.missing-tests-for-critical-logic.rule.yaml +35 -0
- package/rules/typescript/ts.quality.swallowed-error.rule.yaml +35 -0
- package/rules/typescript/ts.quality.tight-module-coupling.rule.yaml +35 -0
- package/rules/typescript/ts.random.no-math-random-in-core.rule.yaml +37 -0
- package/rules/typescript/ts.react.no-cascaded-effect-fetches.rule.yaml +37 -0
- package/rules/typescript/ts.runtime.no-debugger-statement.rule.yaml +29 -0
- package/rules/typescript/ts.security.bind-to-all-interfaces.rule.yaml +36 -0
- package/rules/typescript/ts.security.browser-token-storage.rule.yaml +37 -0
- package/rules/typescript/ts.security.dangerous-insert-html.rule.yaml +36 -0
- package/rules/typescript/ts.security.dangerously-set-inner-html.rule.yaml +38 -0
- package/rules/typescript/ts.security.datadog-browser-track-user-interactions.rule.yaml +37 -0
- package/rules/typescript/ts.security.debug-mode-enabled.rule.yaml +38 -0
- package/rules/typescript/ts.security.dynamodb-query-injection.rule.yaml +36 -0
- package/rules/typescript/ts.security.exposed-directory-listing.rule.yaml +37 -0
- package/rules/typescript/ts.security.express-cookie-missing-http-only.rule.yaml +36 -0
- package/rules/typescript/ts.security.express-default-cookie-config.rule.yaml +39 -0
- package/rules/typescript/ts.security.express-default-session-config.rule.yaml +37 -0
- package/rules/typescript/ts.security.express-insecure-cookie.rule.yaml +36 -0
- package/rules/typescript/ts.security.express-missing-helmet.rule.yaml +37 -0
- package/rules/typescript/ts.security.express-nosql-injection.rule.yaml +36 -0
- package/rules/typescript/ts.security.express-permissive-cookie-config.rule.yaml +38 -0
- package/rules/typescript/ts.security.express-reduce-fingerprint.rule.yaml +37 -0
- package/rules/typescript/ts.security.express-static-assets-after-session.rule.yaml +37 -0
- package/rules/typescript/ts.security.external-file-upload.rule.yaml +36 -0
- package/rules/typescript/ts.security.file-generation.rule.yaml +36 -0
- package/rules/typescript/ts.security.format-string-using-user-input.rule.yaml +36 -0
- package/rules/typescript/ts.security.frontend-only-authorization.rule.yaml +35 -0
- package/rules/typescript/ts.security.handlebars-no-escape.rule.yaml +38 -0
- package/rules/typescript/ts.security.hardcoded-auth-secret.rule.yaml +37 -0
- package/rules/typescript/ts.security.import-using-user-input.rule.yaml +36 -0
- package/rules/typescript/ts.security.information-leakage.rule.yaml +38 -0
- package/rules/typescript/ts.security.insecure-allow-origin.rule.yaml +36 -0
- package/rules/typescript/ts.security.insecure-auth-cookie-flags.rule.yaml +37 -0
- package/rules/typescript/ts.security.insecure-password-hash-configuration.rule.yaml +37 -0
- package/rules/typescript/ts.security.insecure-websocket-transport.rule.yaml +37 -0
- package/rules/typescript/ts.security.insufficiently-random-values.rule.yaml +36 -0
- package/rules/typescript/ts.security.jwt-not-revoked.rule.yaml +37 -0
- package/rules/typescript/ts.security.jwt-sensitive-claims.rule.yaml +37 -0
- package/rules/typescript/ts.security.manual-html-sanitization.rule.yaml +37 -0
- package/rules/typescript/ts.security.missing-authorization-before-sensitive-action.rule.yaml +35 -0
- package/rules/typescript/ts.security.missing-integrity-check.rule.yaml +36 -0
- package/rules/typescript/ts.security.missing-message-origin-check.rule.yaml +36 -0
- package/rules/typescript/ts.security.missing-ownership-validation.rule.yaml +35 -0
- package/rules/typescript/ts.security.missing-request-timeout-or-retry.rule.yaml +35 -0
- package/rules/typescript/ts.security.no-dynamic-execution.rule.yaml +34 -0
- package/rules/typescript/ts.security.no-innerhtml-assignment.rule.yaml +36 -0
- package/rules/typescript/ts.security.non-literal-fs-filename.rule.yaml +36 -0
- package/rules/typescript/ts.security.observable-timing-discrepancy.rule.yaml +37 -0
- package/rules/typescript/ts.security.open-redirect.rule.yaml +37 -0
- package/rules/typescript/ts.security.permissive-allow-origin.rule.yaml +36 -0
- package/rules/typescript/ts.security.permissive-file-permissions.rule.yaml +37 -0
- package/rules/typescript/ts.security.postmessage-wildcard-origin.rule.yaml +36 -0
- package/rules/typescript/ts.security.predictable-token-generation.rule.yaml +36 -0
- package/rules/typescript/ts.security.raw-html-using-user-input.rule.yaml +37 -0
- package/rules/typescript/ts.security.sensitive-data-egress.rule.yaml +36 -0
- package/rules/typescript/ts.security.sensitive-data-in-exception.rule.yaml +37 -0
- package/rules/typescript/ts.security.sensitive-data-written-to-file.rule.yaml +37 -0
- package/rules/typescript/ts.security.ssrf.rule.yaml +34 -0
- package/rules/typescript/ts.security.token-or-session-not-validated.rule.yaml +35 -0
- package/rules/typescript/ts.security.ui-redress.rule.yaml +37 -0
- package/rules/typescript/ts.security.unsanitized-http-response.rule.yaml +36 -0
- package/rules/typescript/ts.security.unvalidated-external-input.rule.yaml +35 -0
- package/rules/typescript/ts.security.user-controlled-sendfile.rule.yaml +36 -0
- package/rules/typescript/ts.security.user-controlled-view-render.rule.yaml +36 -0
- package/rules/typescript/ts.security.weak-cipher-or-mode.rule.yaml +35 -0
- package/rules/typescript/ts.security.weak-key-strength.rule.yaml +36 -0
- package/rules/typescript/ts.security.weak-tls-version.rule.yaml +36 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/rules-package.d.ts +3 -0
- package/src/lib/rules-package.js +16 -0
- package/src/lib/rules-package.js.map +1 -0
package/catalog.yaml
ADDED
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: RuleCatalog
|
|
3
|
+
rules:
|
|
4
|
+
- id: ts.logging.no-console-log
|
|
5
|
+
rulePath: ./rules/typescript/ts.logging.no-console-log.rule.yaml
|
|
6
|
+
presets:
|
|
7
|
+
- recommended
|
|
8
|
+
- strict
|
|
9
|
+
- id: ts.logging.no-console-error
|
|
10
|
+
rulePath: ./rules/typescript/ts.logging.no-console-error.rule.yaml
|
|
11
|
+
presets:
|
|
12
|
+
- recommended
|
|
13
|
+
- strict
|
|
14
|
+
- id: ts.runtime.no-debugger-statement
|
|
15
|
+
rulePath: ./rules/typescript/ts.runtime.no-debugger-statement.rule.yaml
|
|
16
|
+
presets:
|
|
17
|
+
- recommended
|
|
18
|
+
- strict
|
|
19
|
+
- id: ts.correctness.constant-condition
|
|
20
|
+
rulePath: ./rules/typescript/ts.correctness.constant-condition.rule.yaml
|
|
21
|
+
presets:
|
|
22
|
+
- recommended
|
|
23
|
+
- strict
|
|
24
|
+
- id: ts.correctness.missing-await-on-async-call
|
|
25
|
+
rulePath: ./rules/typescript/ts.correctness.missing-await-on-async-call.rule.yaml
|
|
26
|
+
presets:
|
|
27
|
+
- recommended
|
|
28
|
+
- strict
|
|
29
|
+
- id: ts.correctness.implicit-undefined-return
|
|
30
|
+
rulePath: ./rules/typescript/ts.correctness.implicit-undefined-return.rule.yaml
|
|
31
|
+
presets:
|
|
32
|
+
- recommended
|
|
33
|
+
- strict
|
|
34
|
+
- id: ts.correctness.unhandled-async-error
|
|
35
|
+
rulePath: ./rules/typescript/ts.correctness.unhandled-async-error.rule.yaml
|
|
36
|
+
presets:
|
|
37
|
+
- recommended
|
|
38
|
+
- strict
|
|
39
|
+
- security
|
|
40
|
+
- id: ts.correctness.incorrect-boolean-logic
|
|
41
|
+
rulePath: ./rules/typescript/ts.correctness.incorrect-boolean-logic.rule.yaml
|
|
42
|
+
presets:
|
|
43
|
+
- recommended
|
|
44
|
+
- strict
|
|
45
|
+
- id: ts.correctness.blocking-call-in-async-flow
|
|
46
|
+
rulePath: ./rules/typescript/ts.correctness.blocking-call-in-async-flow.rule.yaml
|
|
47
|
+
presets:
|
|
48
|
+
- recommended
|
|
49
|
+
- strict
|
|
50
|
+
- id: ts.correctness.missing-default-dispatch
|
|
51
|
+
rulePath: ./rules/typescript/ts.correctness.missing-default-dispatch.rule.yaml
|
|
52
|
+
presets:
|
|
53
|
+
- recommended
|
|
54
|
+
- strict
|
|
55
|
+
- id: ts.correctness.missing-timeout-on-external-call
|
|
56
|
+
rulePath: ./rules/typescript/ts.correctness.missing-timeout-on-external-call.rule.yaml
|
|
57
|
+
presets:
|
|
58
|
+
- recommended
|
|
59
|
+
- strict
|
|
60
|
+
- security
|
|
61
|
+
- id: ts.correctness.possible-null-dereference
|
|
62
|
+
rulePath: ./rules/typescript/ts.correctness.possible-null-dereference.rule.yaml
|
|
63
|
+
presets:
|
|
64
|
+
- recommended
|
|
65
|
+
- strict
|
|
66
|
+
- id: ts.correctness.nested-property-access-without-check
|
|
67
|
+
rulePath: ./rules/typescript/ts.correctness.nested-property-access-without-check.rule.yaml
|
|
68
|
+
presets:
|
|
69
|
+
- recommended
|
|
70
|
+
- strict
|
|
71
|
+
- id: ts.correctness.unchecked-map-key-access
|
|
72
|
+
rulePath: ./rules/typescript/ts.correctness.unchecked-map-key-access.rule.yaml
|
|
73
|
+
presets:
|
|
74
|
+
- recommended
|
|
75
|
+
- strict
|
|
76
|
+
- id: ts.correctness.optional-value-without-fallback
|
|
77
|
+
rulePath: ./rules/typescript/ts.correctness.optional-value-without-fallback.rule.yaml
|
|
78
|
+
presets:
|
|
79
|
+
- recommended
|
|
80
|
+
- strict
|
|
81
|
+
- id: ts.correctness.off-by-one-loop-boundary
|
|
82
|
+
rulePath: ./rules/typescript/ts.correctness.off-by-one-loop-boundary.rule.yaml
|
|
83
|
+
presets:
|
|
84
|
+
- recommended
|
|
85
|
+
- strict
|
|
86
|
+
- id: ts.correctness.shared-state-race
|
|
87
|
+
rulePath: ./rules/typescript/ts.correctness.shared-state-race.rule.yaml
|
|
88
|
+
presets:
|
|
89
|
+
- experimental
|
|
90
|
+
- id: ts.correctness.unreachable-statement
|
|
91
|
+
rulePath: ./rules/typescript/ts.correctness.unreachable-statement.rule.yaml
|
|
92
|
+
presets:
|
|
93
|
+
- recommended
|
|
94
|
+
- strict
|
|
95
|
+
- id: ts.quality.swallowed-error
|
|
96
|
+
rulePath: ./rules/typescript/ts.quality.swallowed-error.rule.yaml
|
|
97
|
+
presets:
|
|
98
|
+
- recommended
|
|
99
|
+
- strict
|
|
100
|
+
- id: ts.quality.function-too-large-or-complex
|
|
101
|
+
rulePath: ./rules/typescript/ts.quality.function-too-large-or-complex.rule.yaml
|
|
102
|
+
presets:
|
|
103
|
+
- strict
|
|
104
|
+
- id: ts.quality.duplicate-code-block
|
|
105
|
+
rulePath: ./rules/typescript/ts.quality.duplicate-code-block.rule.yaml
|
|
106
|
+
presets:
|
|
107
|
+
- strict
|
|
108
|
+
- id: ts.quality.deep-nesting
|
|
109
|
+
rulePath: ./rules/typescript/ts.quality.deep-nesting.rule.yaml
|
|
110
|
+
presets:
|
|
111
|
+
- strict
|
|
112
|
+
- id: ts.quality.missing-error-context
|
|
113
|
+
rulePath: ./rules/typescript/ts.quality.missing-error-context.rule.yaml
|
|
114
|
+
presets:
|
|
115
|
+
- strict
|
|
116
|
+
- id: ts.quality.tight-module-coupling
|
|
117
|
+
rulePath: ./rules/typescript/ts.quality.tight-module-coupling.rule.yaml
|
|
118
|
+
presets:
|
|
119
|
+
- strict
|
|
120
|
+
- id: ts.quality.hardcoded-configuration-values
|
|
121
|
+
rulePath: ./rules/typescript/ts.quality.hardcoded-configuration-values.rule.yaml
|
|
122
|
+
presets:
|
|
123
|
+
- recommended
|
|
124
|
+
- strict
|
|
125
|
+
- id: ts.quality.magic-numbers-or-strings
|
|
126
|
+
rulePath: ./rules/typescript/ts.quality.magic-numbers-or-strings.rule.yaml
|
|
127
|
+
presets:
|
|
128
|
+
- strict
|
|
129
|
+
- id: ts.quality.missing-tests-for-critical-logic
|
|
130
|
+
rulePath: ./rules/typescript/ts.quality.missing-tests-for-critical-logic.rule.yaml
|
|
131
|
+
presets:
|
|
132
|
+
- strict
|
|
133
|
+
- id: ts.quality.logic-change-without-test-updates
|
|
134
|
+
rulePath: ./rules/typescript/ts.quality.logic-change-without-test-updates.rule.yaml
|
|
135
|
+
presets:
|
|
136
|
+
- strict
|
|
137
|
+
- id: ts.config.no-process-env-outside-config
|
|
138
|
+
rulePath: ./rules/typescript/ts.config.no-process-env-outside-config.rule.yaml
|
|
139
|
+
presets:
|
|
140
|
+
- strict
|
|
141
|
+
- id: ts.random.no-math-random-in-core
|
|
142
|
+
rulePath: ./rules/typescript/ts.random.no-math-random-in-core.rule.yaml
|
|
143
|
+
presets:
|
|
144
|
+
- strict
|
|
145
|
+
- id: ts.performance.sequential-async-calls
|
|
146
|
+
rulePath: ./rules/typescript/ts.performance.sequential-async-calls.rule.yaml
|
|
147
|
+
presets:
|
|
148
|
+
- recommended
|
|
149
|
+
- strict
|
|
150
|
+
- id: ts.performance.repeated-io-in-loop
|
|
151
|
+
rulePath: ./rules/typescript/ts.performance.repeated-io-in-loop.rule.yaml
|
|
152
|
+
presets:
|
|
153
|
+
- recommended
|
|
154
|
+
- strict
|
|
155
|
+
- id: ts.performance.repeated-expensive-computation
|
|
156
|
+
rulePath: ./rules/typescript/ts.performance.repeated-expensive-computation.rule.yaml
|
|
157
|
+
presets:
|
|
158
|
+
- recommended
|
|
159
|
+
- strict
|
|
160
|
+
- id: ts.performance.inefficient-data-structure-usage
|
|
161
|
+
rulePath: ./rules/typescript/ts.performance.inefficient-data-structure-usage.rule.yaml
|
|
162
|
+
presets:
|
|
163
|
+
- recommended
|
|
164
|
+
- strict
|
|
165
|
+
- id: ts.performance.nested-loops-hot-path
|
|
166
|
+
rulePath: ./rules/typescript/ts.performance.nested-loops-hot-path.rule.yaml
|
|
167
|
+
presets:
|
|
168
|
+
- strict
|
|
169
|
+
- id: ts.performance.missing-batch-operations
|
|
170
|
+
rulePath: ./rules/typescript/ts.performance.missing-batch-operations.rule.yaml
|
|
171
|
+
presets:
|
|
172
|
+
- strict
|
|
173
|
+
- id: ts.performance.large-payload-without-streaming
|
|
174
|
+
rulePath: ./rules/typescript/ts.performance.large-payload-without-streaming.rule.yaml
|
|
175
|
+
presets:
|
|
176
|
+
- strict
|
|
177
|
+
- id: ts.performance.unbounded-growth-memory-leak
|
|
178
|
+
rulePath: ./rules/typescript/ts.performance.unbounded-growth-memory-leak.rule.yaml
|
|
179
|
+
presets:
|
|
180
|
+
- strict
|
|
181
|
+
- id: ts.performance.retained-large-object
|
|
182
|
+
rulePath: ./rules/typescript/ts.performance.retained-large-object.rule.yaml
|
|
183
|
+
presets:
|
|
184
|
+
- experimental
|
|
185
|
+
- id: ts.performance.unnecessary-rerenders-from-state-misuse
|
|
186
|
+
rulePath: ./rules/typescript/ts.performance.unnecessary-rerenders-from-state-misuse.rule.yaml
|
|
187
|
+
presets:
|
|
188
|
+
- experimental
|
|
189
|
+
- id: ts.react.no-cascaded-effect-fetches
|
|
190
|
+
rulePath: ./rules/typescript/ts.react.no-cascaded-effect-fetches.rule.yaml
|
|
191
|
+
presets:
|
|
192
|
+
- strict
|
|
193
|
+
- id: ts.next.no-server-client-boundary-leaks
|
|
194
|
+
rulePath: ./rules/typescript/ts.next.no-server-client-boundary-leaks.rule.yaml
|
|
195
|
+
presets:
|
|
196
|
+
- strict
|
|
197
|
+
- id: security.no-sql-interpolation
|
|
198
|
+
rulePath: ./rules/shared/security.no-sql-interpolation.rule.yaml
|
|
199
|
+
presets:
|
|
200
|
+
- recommended
|
|
201
|
+
- strict
|
|
202
|
+
- security
|
|
203
|
+
- id: ts.security.no-dynamic-execution
|
|
204
|
+
rulePath: ./rules/typescript/ts.security.no-dynamic-execution.rule.yaml
|
|
205
|
+
presets:
|
|
206
|
+
- recommended
|
|
207
|
+
- strict
|
|
208
|
+
- security
|
|
209
|
+
- id: security.no-request-path-file-read
|
|
210
|
+
rulePath: ./rules/shared/security.no-request-path-file-read.rule.yaml
|
|
211
|
+
presets:
|
|
212
|
+
- recommended
|
|
213
|
+
- strict
|
|
214
|
+
- security
|
|
215
|
+
- id: security.no-command-execution-with-request-input
|
|
216
|
+
rulePath: ./rules/shared/security.no-command-execution-with-request-input.rule.yaml
|
|
217
|
+
presets:
|
|
218
|
+
- recommended
|
|
219
|
+
- strict
|
|
220
|
+
- security
|
|
221
|
+
- id: ts.security.dangerous-insert-html
|
|
222
|
+
rulePath: ./rules/typescript/ts.security.dangerous-insert-html.rule.yaml
|
|
223
|
+
presets:
|
|
224
|
+
- recommended
|
|
225
|
+
- strict
|
|
226
|
+
- security
|
|
227
|
+
- id: ts.security.dangerously-set-inner-html
|
|
228
|
+
rulePath: ./rules/typescript/ts.security.dangerously-set-inner-html.rule.yaml
|
|
229
|
+
presets:
|
|
230
|
+
- recommended
|
|
231
|
+
- strict
|
|
232
|
+
- security
|
|
233
|
+
- id: ts.security.no-innerhtml-assignment
|
|
234
|
+
rulePath: ./rules/typescript/ts.security.no-innerhtml-assignment.rule.yaml
|
|
235
|
+
presets:
|
|
236
|
+
- recommended
|
|
237
|
+
- strict
|
|
238
|
+
- security
|
|
239
|
+
- id: security.no-hardcoded-credentials
|
|
240
|
+
rulePath: ./rules/shared/security.no-hardcoded-credentials.rule.yaml
|
|
241
|
+
presets:
|
|
242
|
+
- recommended
|
|
243
|
+
- strict
|
|
244
|
+
- security
|
|
245
|
+
- id: ts.security.missing-authorization-before-sensitive-action
|
|
246
|
+
rulePath: ./rules/typescript/ts.security.missing-authorization-before-sensitive-action.rule.yaml
|
|
247
|
+
presets:
|
|
248
|
+
- strict
|
|
249
|
+
- security
|
|
250
|
+
- id: ts.security.missing-ownership-validation
|
|
251
|
+
rulePath: ./rules/typescript/ts.security.missing-ownership-validation.rule.yaml
|
|
252
|
+
presets:
|
|
253
|
+
- strict
|
|
254
|
+
- security
|
|
255
|
+
- id: ts.security.frontend-only-authorization
|
|
256
|
+
rulePath: ./rules/typescript/ts.security.frontend-only-authorization.rule.yaml
|
|
257
|
+
presets:
|
|
258
|
+
- experimental
|
|
259
|
+
- id: ts.security.token-or-session-not-validated
|
|
260
|
+
rulePath: ./rules/typescript/ts.security.token-or-session-not-validated.rule.yaml
|
|
261
|
+
presets:
|
|
262
|
+
- recommended
|
|
263
|
+
- strict
|
|
264
|
+
- security
|
|
265
|
+
- id: ts.security.insecure-auth-cookie-flags
|
|
266
|
+
rulePath: ./rules/typescript/ts.security.insecure-auth-cookie-flags.rule.yaml
|
|
267
|
+
presets:
|
|
268
|
+
- recommended
|
|
269
|
+
- strict
|
|
270
|
+
- security
|
|
271
|
+
- id: ts.security.jwt-sensitive-claims
|
|
272
|
+
rulePath: ./rules/typescript/ts.security.jwt-sensitive-claims.rule.yaml
|
|
273
|
+
presets:
|
|
274
|
+
- recommended
|
|
275
|
+
- strict
|
|
276
|
+
- security
|
|
277
|
+
- id: ts.security.browser-token-storage
|
|
278
|
+
rulePath: ./rules/typescript/ts.security.browser-token-storage.rule.yaml
|
|
279
|
+
presets:
|
|
280
|
+
- recommended
|
|
281
|
+
- strict
|
|
282
|
+
- security
|
|
283
|
+
- id: security.tls-verification-disabled
|
|
284
|
+
rulePath: ./rules/shared/security.tls-verification-disabled.rule.yaml
|
|
285
|
+
presets:
|
|
286
|
+
- recommended
|
|
287
|
+
- strict
|
|
288
|
+
- security
|
|
289
|
+
- id: security.insecure-http-transport
|
|
290
|
+
rulePath: ./rules/shared/security.insecure-http-transport.rule.yaml
|
|
291
|
+
presets:
|
|
292
|
+
- recommended
|
|
293
|
+
- strict
|
|
294
|
+
- security
|
|
295
|
+
- id: ts.security.weak-tls-version
|
|
296
|
+
rulePath: ./rules/typescript/ts.security.weak-tls-version.rule.yaml
|
|
297
|
+
presets:
|
|
298
|
+
- recommended
|
|
299
|
+
- strict
|
|
300
|
+
- security
|
|
301
|
+
- id: ts.security.open-redirect
|
|
302
|
+
rulePath: ./rules/typescript/ts.security.open-redirect.rule.yaml
|
|
303
|
+
presets:
|
|
304
|
+
- recommended
|
|
305
|
+
- strict
|
|
306
|
+
- security
|
|
307
|
+
- id: ts.security.sensitive-data-egress
|
|
308
|
+
rulePath: ./rules/typescript/ts.security.sensitive-data-egress.rule.yaml
|
|
309
|
+
presets:
|
|
310
|
+
- strict
|
|
311
|
+
- security
|
|
312
|
+
- id: security.no-sensitive-data-in-logs-and-telemetry
|
|
313
|
+
rulePath: ./rules/shared/security.no-sensitive-data-in-logs-and-telemetry.rule.yaml
|
|
314
|
+
presets:
|
|
315
|
+
- strict
|
|
316
|
+
- security
|
|
317
|
+
- id: ts.security.ssrf
|
|
318
|
+
rulePath: ./rules/typescript/ts.security.ssrf.rule.yaml
|
|
319
|
+
presets:
|
|
320
|
+
- recommended
|
|
321
|
+
- strict
|
|
322
|
+
- security
|
|
323
|
+
- id: ts.security.bind-to-all-interfaces
|
|
324
|
+
rulePath: ./rules/typescript/ts.security.bind-to-all-interfaces.rule.yaml
|
|
325
|
+
presets:
|
|
326
|
+
- recommended
|
|
327
|
+
- strict
|
|
328
|
+
- security
|
|
329
|
+
- id: security.weak-hash-algorithm
|
|
330
|
+
rulePath: ./rules/shared/security.weak-hash-algorithm.rule.yaml
|
|
331
|
+
presets:
|
|
332
|
+
- recommended
|
|
333
|
+
- strict
|
|
334
|
+
- security
|
|
335
|
+
- id: ts.security.weak-cipher-or-mode
|
|
336
|
+
rulePath: ./rules/typescript/ts.security.weak-cipher-or-mode.rule.yaml
|
|
337
|
+
presets:
|
|
338
|
+
- recommended
|
|
339
|
+
- strict
|
|
340
|
+
- security
|
|
341
|
+
- id: ts.security.predictable-token-generation
|
|
342
|
+
rulePath: ./rules/typescript/ts.security.predictable-token-generation.rule.yaml
|
|
343
|
+
presets:
|
|
344
|
+
- recommended
|
|
345
|
+
- strict
|
|
346
|
+
- security
|
|
347
|
+
- id: ts.security.insufficiently-random-values
|
|
348
|
+
rulePath: ./rules/typescript/ts.security.insufficiently-random-values.rule.yaml
|
|
349
|
+
presets:
|
|
350
|
+
- recommended
|
|
351
|
+
- strict
|
|
352
|
+
- security
|
|
353
|
+
- id: ts.security.weak-key-strength
|
|
354
|
+
rulePath: ./rules/typescript/ts.security.weak-key-strength.rule.yaml
|
|
355
|
+
presets:
|
|
356
|
+
- recommended
|
|
357
|
+
- strict
|
|
358
|
+
- security
|
|
359
|
+
- id: ts.security.missing-integrity-check
|
|
360
|
+
rulePath: ./rules/typescript/ts.security.missing-integrity-check.rule.yaml
|
|
361
|
+
presets:
|
|
362
|
+
- recommended
|
|
363
|
+
- strict
|
|
364
|
+
- security
|
|
365
|
+
- id: ts.security.unvalidated-external-input
|
|
366
|
+
rulePath: ./rules/typescript/ts.security.unvalidated-external-input.rule.yaml
|
|
367
|
+
presets:
|
|
368
|
+
- strict
|
|
369
|
+
- security
|
|
370
|
+
- id: security.unsafe-deserialization
|
|
371
|
+
rulePath: ./rules/shared/security.unsafe-deserialization.rule.yaml
|
|
372
|
+
presets:
|
|
373
|
+
- recommended
|
|
374
|
+
- strict
|
|
375
|
+
- security
|
|
376
|
+
- id: ts.security.missing-request-timeout-or-retry
|
|
377
|
+
rulePath: ./rules/typescript/ts.security.missing-request-timeout-or-retry.rule.yaml
|
|
378
|
+
presets:
|
|
379
|
+
- strict
|
|
380
|
+
- security
|
|
381
|
+
- id: ts.security.datadog-browser-track-user-interactions
|
|
382
|
+
rulePath: ./rules/typescript/ts.security.datadog-browser-track-user-interactions.rule.yaml
|
|
383
|
+
presets:
|
|
384
|
+
- strict
|
|
385
|
+
- security
|
|
386
|
+
- id: ts.security.dynamodb-query-injection
|
|
387
|
+
rulePath: ./rules/typescript/ts.security.dynamodb-query-injection.rule.yaml
|
|
388
|
+
presets:
|
|
389
|
+
- recommended
|
|
390
|
+
- strict
|
|
391
|
+
- security
|
|
392
|
+
- id: ts.security.hardcoded-auth-secret
|
|
393
|
+
rulePath: ./rules/typescript/ts.security.hardcoded-auth-secret.rule.yaml
|
|
394
|
+
presets:
|
|
395
|
+
- recommended
|
|
396
|
+
- strict
|
|
397
|
+
- security
|
|
398
|
+
- id: ts.security.import-using-user-input
|
|
399
|
+
rulePath: ./rules/typescript/ts.security.import-using-user-input.rule.yaml
|
|
400
|
+
presets:
|
|
401
|
+
- recommended
|
|
402
|
+
- strict
|
|
403
|
+
- security
|
|
404
|
+
- id: ts.security.insecure-allow-origin
|
|
405
|
+
rulePath: ./rules/typescript/ts.security.insecure-allow-origin.rule.yaml
|
|
406
|
+
presets:
|
|
407
|
+
- recommended
|
|
408
|
+
- strict
|
|
409
|
+
- security
|
|
410
|
+
- id: ts.security.permissive-allow-origin
|
|
411
|
+
rulePath: ./rules/typescript/ts.security.permissive-allow-origin.rule.yaml
|
|
412
|
+
presets:
|
|
413
|
+
- recommended
|
|
414
|
+
- strict
|
|
415
|
+
- security
|
|
416
|
+
- id: ts.security.express-insecure-cookie
|
|
417
|
+
rulePath: ./rules/typescript/ts.security.express-insecure-cookie.rule.yaml
|
|
418
|
+
presets:
|
|
419
|
+
- recommended
|
|
420
|
+
- strict
|
|
421
|
+
- security
|
|
422
|
+
- id: ts.security.express-cookie-missing-http-only
|
|
423
|
+
rulePath: ./rules/typescript/ts.security.express-cookie-missing-http-only.rule.yaml
|
|
424
|
+
presets:
|
|
425
|
+
- recommended
|
|
426
|
+
- strict
|
|
427
|
+
- security
|
|
428
|
+
- id: ts.security.insecure-password-hash-configuration
|
|
429
|
+
rulePath: ./rules/typescript/ts.security.insecure-password-hash-configuration.rule.yaml
|
|
430
|
+
presets:
|
|
431
|
+
- recommended
|
|
432
|
+
- strict
|
|
433
|
+
- security
|
|
434
|
+
- id: ts.security.insecure-websocket-transport
|
|
435
|
+
rulePath: ./rules/typescript/ts.security.insecure-websocket-transport.rule.yaml
|
|
436
|
+
presets:
|
|
437
|
+
- recommended
|
|
438
|
+
- strict
|
|
439
|
+
- security
|
|
440
|
+
- id: ts.security.jwt-not-revoked
|
|
441
|
+
rulePath: ./rules/typescript/ts.security.jwt-not-revoked.rule.yaml
|
|
442
|
+
presets:
|
|
443
|
+
- recommended
|
|
444
|
+
- strict
|
|
445
|
+
- security
|
|
446
|
+
- id: ts.security.handlebars-no-escape
|
|
447
|
+
rulePath: ./rules/typescript/ts.security.handlebars-no-escape.rule.yaml
|
|
448
|
+
presets:
|
|
449
|
+
- recommended
|
|
450
|
+
- strict
|
|
451
|
+
- security
|
|
452
|
+
- id: ts.security.manual-html-sanitization
|
|
453
|
+
rulePath: ./rules/typescript/ts.security.manual-html-sanitization.rule.yaml
|
|
454
|
+
presets:
|
|
455
|
+
- strict
|
|
456
|
+
- security
|
|
457
|
+
- id: ts.security.missing-message-origin-check
|
|
458
|
+
rulePath: ./rules/typescript/ts.security.missing-message-origin-check.rule.yaml
|
|
459
|
+
presets:
|
|
460
|
+
- recommended
|
|
461
|
+
- strict
|
|
462
|
+
- security
|
|
463
|
+
- id: ts.security.express-nosql-injection
|
|
464
|
+
rulePath: ./rules/typescript/ts.security.express-nosql-injection.rule.yaml
|
|
465
|
+
presets:
|
|
466
|
+
- recommended
|
|
467
|
+
- strict
|
|
468
|
+
- security
|
|
469
|
+
- id: ts.security.observable-timing-discrepancy
|
|
470
|
+
rulePath: ./rules/typescript/ts.security.observable-timing-discrepancy.rule.yaml
|
|
471
|
+
presets:
|
|
472
|
+
- recommended
|
|
473
|
+
- strict
|
|
474
|
+
- security
|
|
475
|
+
- id: ts.security.external-file-upload
|
|
476
|
+
rulePath: ./rules/typescript/ts.security.external-file-upload.rule.yaml
|
|
477
|
+
presets:
|
|
478
|
+
- recommended
|
|
479
|
+
- strict
|
|
480
|
+
- security
|
|
481
|
+
- id: ts.security.file-generation
|
|
482
|
+
rulePath: ./rules/typescript/ts.security.file-generation.rule.yaml
|
|
483
|
+
presets:
|
|
484
|
+
- recommended
|
|
485
|
+
- strict
|
|
486
|
+
- security
|
|
487
|
+
- id: ts.security.non-literal-fs-filename
|
|
488
|
+
rulePath: ./rules/typescript/ts.security.non-literal-fs-filename.rule.yaml
|
|
489
|
+
presets:
|
|
490
|
+
- recommended
|
|
491
|
+
- strict
|
|
492
|
+
- security
|
|
493
|
+
- id: ts.security.permissive-file-permissions
|
|
494
|
+
rulePath: ./rules/typescript/ts.security.permissive-file-permissions.rule.yaml
|
|
495
|
+
presets:
|
|
496
|
+
- recommended
|
|
497
|
+
- strict
|
|
498
|
+
- security
|
|
499
|
+
- id: ts.security.postmessage-wildcard-origin
|
|
500
|
+
rulePath: ./rules/typescript/ts.security.postmessage-wildcard-origin.rule.yaml
|
|
501
|
+
presets:
|
|
502
|
+
- recommended
|
|
503
|
+
- strict
|
|
504
|
+
- security
|
|
505
|
+
- id: ts.security.raw-html-using-user-input
|
|
506
|
+
rulePath: ./rules/typescript/ts.security.raw-html-using-user-input.rule.yaml
|
|
507
|
+
presets:
|
|
508
|
+
- recommended
|
|
509
|
+
- strict
|
|
510
|
+
- security
|
|
511
|
+
- id: ts.security.sensitive-data-in-exception
|
|
512
|
+
rulePath: ./rules/typescript/ts.security.sensitive-data-in-exception.rule.yaml
|
|
513
|
+
presets:
|
|
514
|
+
- recommended
|
|
515
|
+
- strict
|
|
516
|
+
- security
|
|
517
|
+
- id: ts.security.sensitive-data-written-to-file
|
|
518
|
+
rulePath: ./rules/typescript/ts.security.sensitive-data-written-to-file.rule.yaml
|
|
519
|
+
presets:
|
|
520
|
+
- recommended
|
|
521
|
+
- strict
|
|
522
|
+
- security
|
|
523
|
+
- id: ts.security.information-leakage
|
|
524
|
+
rulePath: ./rules/typescript/ts.security.information-leakage.rule.yaml
|
|
525
|
+
presets:
|
|
526
|
+
- recommended
|
|
527
|
+
- strict
|
|
528
|
+
- security
|
|
529
|
+
- id: ts.security.ui-redress
|
|
530
|
+
rulePath: ./rules/typescript/ts.security.ui-redress.rule.yaml
|
|
531
|
+
presets:
|
|
532
|
+
- recommended
|
|
533
|
+
- strict
|
|
534
|
+
- security
|
|
535
|
+
- id: ts.security.format-string-using-user-input
|
|
536
|
+
rulePath: ./rules/typescript/ts.security.format-string-using-user-input.rule.yaml
|
|
537
|
+
presets:
|
|
538
|
+
- recommended
|
|
539
|
+
- strict
|
|
540
|
+
- security
|
|
541
|
+
- id: ts.security.user-controlled-sendfile
|
|
542
|
+
rulePath: ./rules/typescript/ts.security.user-controlled-sendfile.rule.yaml
|
|
543
|
+
presets:
|
|
544
|
+
- recommended
|
|
545
|
+
- strict
|
|
546
|
+
- security
|
|
547
|
+
- id: ts.security.user-controlled-view-render
|
|
548
|
+
rulePath: ./rules/typescript/ts.security.user-controlled-view-render.rule.yaml
|
|
549
|
+
presets:
|
|
550
|
+
- strict
|
|
551
|
+
- security
|
|
552
|
+
- id: ts.security.exposed-directory-listing
|
|
553
|
+
rulePath: ./rules/typescript/ts.security.exposed-directory-listing.rule.yaml
|
|
554
|
+
presets:
|
|
555
|
+
- recommended
|
|
556
|
+
- strict
|
|
557
|
+
- security
|
|
558
|
+
- id: ts.security.express-default-session-config
|
|
559
|
+
rulePath: ./rules/typescript/ts.security.express-default-session-config.rule.yaml
|
|
560
|
+
presets:
|
|
561
|
+
- strict
|
|
562
|
+
- security
|
|
563
|
+
- id: ts.security.express-default-cookie-config
|
|
564
|
+
rulePath: ./rules/typescript/ts.security.express-default-cookie-config.rule.yaml
|
|
565
|
+
presets:
|
|
566
|
+
- strict
|
|
567
|
+
- security
|
|
568
|
+
- id: ts.security.express-permissive-cookie-config
|
|
569
|
+
rulePath: ./rules/typescript/ts.security.express-permissive-cookie-config.rule.yaml
|
|
570
|
+
presets:
|
|
571
|
+
- strict
|
|
572
|
+
- security
|
|
573
|
+
- id: ts.security.express-static-assets-after-session
|
|
574
|
+
rulePath: ./rules/typescript/ts.security.express-static-assets-after-session.rule.yaml
|
|
575
|
+
presets:
|
|
576
|
+
- strict
|
|
577
|
+
- security
|
|
578
|
+
- id: ts.security.express-missing-helmet
|
|
579
|
+
rulePath: ./rules/typescript/ts.security.express-missing-helmet.rule.yaml
|
|
580
|
+
presets:
|
|
581
|
+
- strict
|
|
582
|
+
- security
|
|
583
|
+
- id: ts.security.express-reduce-fingerprint
|
|
584
|
+
rulePath: ./rules/typescript/ts.security.express-reduce-fingerprint.rule.yaml
|
|
585
|
+
presets:
|
|
586
|
+
- strict
|
|
587
|
+
- security
|
|
588
|
+
- id: ts.security.debug-mode-enabled
|
|
589
|
+
rulePath: ./rules/typescript/ts.security.debug-mode-enabled.rule.yaml
|
|
590
|
+
presets:
|
|
591
|
+
- recommended
|
|
592
|
+
- strict
|
|
593
|
+
- security
|
|
594
|
+
- id: ts.security.unsanitized-http-response
|
|
595
|
+
rulePath: ./rules/typescript/ts.security.unsanitized-http-response.rule.yaml
|
|
596
|
+
presets:
|
|
597
|
+
- recommended
|
|
598
|
+
- strict
|
|
599
|
+
- security
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@critiq/rules",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Public OSS Critiq rule catalog with catalog metadata, shipped rule YAML files, and preset membership.",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "./src/index.js",
|
|
8
|
+
"types": "./src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.d.ts",
|
|
12
|
+
"default": "./src/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"tslib": "^2.3.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: security.insecure-http-transport
|
|
5
|
+
title: Insecure HTTP transport
|
|
6
|
+
summary: Outbound transport should not use plain HTTP for sensitive requests.
|
|
7
|
+
rationale: Plain HTTP exposes traffic to interception and tampering.
|
|
8
|
+
tags:
|
|
9
|
+
- security
|
|
10
|
+
- transport
|
|
11
|
+
- network
|
|
12
|
+
- rules-catalog
|
|
13
|
+
stability: stable
|
|
14
|
+
appliesTo: block
|
|
15
|
+
scope:
|
|
16
|
+
languages:
|
|
17
|
+
- typescript
|
|
18
|
+
- javascript
|
|
19
|
+
- go
|
|
20
|
+
- python
|
|
21
|
+
- java
|
|
22
|
+
- php
|
|
23
|
+
- ruby
|
|
24
|
+
- rust
|
|
25
|
+
match:
|
|
26
|
+
fact:
|
|
27
|
+
kind: security.insecure-http-transport
|
|
28
|
+
bind: issue
|
|
29
|
+
emit:
|
|
30
|
+
finding:
|
|
31
|
+
category: security.transport
|
|
32
|
+
severity: high
|
|
33
|
+
confidence: 0.9
|
|
34
|
+
tags:
|
|
35
|
+
- security
|
|
36
|
+
- transport
|
|
37
|
+
- network
|
|
38
|
+
message:
|
|
39
|
+
title: Avoid plain HTTP transport in `${captures.issue.text}`
|
|
40
|
+
summary: "`${captures.issue.text}` sends an outbound request over plain HTTP."
|
|
41
|
+
remediation:
|
|
42
|
+
summary: Use HTTPS or a trusted local-development exception for non-production endpoints.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
apiVersion: critiq.dev/v1alpha1
|
|
2
|
+
kind: Rule
|
|
3
|
+
metadata:
|
|
4
|
+
id: security.no-command-execution-with-request-input
|
|
5
|
+
title: Command execution using untrusted input
|
|
6
|
+
summary: Process execution helpers must not receive request-controlled executables or shell-interpreted arguments.
|
|
7
|
+
rationale: Request-controlled process execution can become remote code execution when attackers choose the binary or influence shell parsing.
|
|
8
|
+
tags:
|
|
9
|
+
- security
|
|
10
|
+
- injection
|
|
11
|
+
- command-execution
|
|
12
|
+
- rules-catalog
|
|
13
|
+
stability: stable
|
|
14
|
+
appliesTo: block
|
|
15
|
+
scope:
|
|
16
|
+
languages:
|
|
17
|
+
- typescript
|
|
18
|
+
- javascript
|
|
19
|
+
- go
|
|
20
|
+
- python
|
|
21
|
+
- java
|
|
22
|
+
- php
|
|
23
|
+
- ruby
|
|
24
|
+
- rust
|
|
25
|
+
match:
|
|
26
|
+
fact:
|
|
27
|
+
kind: security.command-execution-with-request-input
|
|
28
|
+
bind: execCall
|
|
29
|
+
emit:
|
|
30
|
+
finding:
|
|
31
|
+
category: security.injection
|
|
32
|
+
severity: critical
|
|
33
|
+
confidence: 0.9
|
|
34
|
+
tags:
|
|
35
|
+
- security
|
|
36
|
+
- injection
|
|
37
|
+
- command-execution
|
|
38
|
+
message:
|
|
39
|
+
title: Avoid request-controlled command execution in `${captures.execCall.text}`
|
|
40
|
+
summary: "`${captures.execCall.text}` executes a process using request-controlled command data."
|
|
41
|
+
remediation:
|
|
42
|
+
summary: Dispatch only allowlisted binaries, keep shell mode disabled, and validate or constrain subcommands before execution.
|