@lunora/advisor 1.0.0-alpha.16 → 1.0.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.d.mts +1860 -1
  2. package/dist/index.d.ts +1860 -1
  3. package/dist/index.mjs +95 -5
  4. package/dist/packem_shared/actionFetchSsrf-wbmYgzmz.mjs +26 -0
  5. package/dist/packem_shared/aiRawRunEscapeHatch-C29jd32J.mjs +26 -0
  6. package/dist/packem_shared/aiToolSideEffectPromptInjection-BtD3alqB.mjs +33 -0
  7. package/dist/packem_shared/aiUnboundedGenerationPublic-CbAcSxLB.mjs +26 -0
  8. package/dist/packem_shared/allowUnauthenticatedShardAccessEnabled-BcASq-jP.mjs +30 -0
  9. package/dist/packem_shared/authCsrfCheckDisabled-DCf9FSoD.mjs +26 -0
  10. package/dist/packem_shared/authEmailVerificationDisabled-Dk-Tc5oU.mjs +26 -0
  11. package/dist/packem_shared/authSecureCookiesDisabled-osJrHW9Y.mjs +26 -0
  12. package/dist/packem_shared/authSessionFreshageZero-CjufCc_Q.mjs +26 -0
  13. package/dist/packem_shared/authTrustedOriginsWildcard-ylv4PKzC.mjs +26 -0
  14. package/dist/packem_shared/browserAllowPrivateTargets-CBvQxLAM.mjs +26 -0
  15. package/dist/packem_shared/browserUserUrlWithoutAllowlist-B5DrK72J.mjs +32 -0
  16. package/dist/packem_shared/containerInstanceKeyFromUserInput-DLl-jpex.mjs +26 -0
  17. package/dist/packem_shared/containerRuntimeEgressRelaxation-B0LlfmDA.mjs +26 -0
  18. package/dist/packem_shared/containerStartEnableInternetOverride-DDaHZQ1L.mjs +26 -0
  19. package/dist/packem_shared/flagGatesSecurityWithUnsafeDefault-BhIs0shr.mjs +41 -0
  20. package/dist/packem_shared/{fromServerSchema-WVRvXPy8.mjs → fromServerSchema-BiB6JSiW.mjs} +3 -0
  21. package/dist/packem_shared/helpers-BhGmRI2n.mjs +30 -0
  22. package/dist/packem_shared/httpActionMissingAuthGuard-CxipddNx.mjs +35 -0
  23. package/dist/packem_shared/httpActionResponseHeaderInjection-DOFS7pFT.mjs +39 -0
  24. package/dist/packem_shared/identityUndeclaredClaimTrusted-D8nXV2dd.mjs +32 -0
  25. package/dist/packem_shared/imagesUrlSourceFromUserInput-BYq6I7VC.mjs +26 -0
  26. package/dist/packem_shared/{indexReferencesUnknownField-DH0_dbUY.mjs → indexReferencesUnknownField-BfCCZfgW.mjs} +1 -1
  27. package/dist/packem_shared/insertManyUnsafeUserData-Dn77XpmX.mjs +26 -0
  28. package/dist/packem_shared/kvUnscopedUserKeyIdor-wOv1sRL8.mjs +26 -0
  29. package/dist/packem_shared/mailInboundDispatchWithoutVerify-CHSRA8zz.mjs +28 -0
  30. package/dist/packem_shared/mailRecipientFromRequestInput-Cka2qu5J.mjs +26 -0
  31. package/dist/packem_shared/maskWeakHashStrategyOnPii-1c4q8Opf.mjs +35 -0
  32. package/dist/packem_shared/maskedRelationLeakViaWith-CPI4s0sl.mjs +76 -0
  33. package/dist/packem_shared/normalizeIdUsedAsAuthorization-BVPtCpzT.mjs +50 -0
  34. package/dist/packem_shared/outputProjectionMissingOnPublicRead-Cjd885DW.mjs +51 -0
  35. package/dist/packem_shared/ownerFieldFromArgsNotAuth-mOw3hE5z.mjs +26 -0
  36. package/dist/packem_shared/paymentCreateWithoutAuthorize-BYm4JLxo.mjs +26 -0
  37. package/dist/packem_shared/paymentWebhookWideTolerance-D9QQJMJq.mjs +35 -0
  38. package/dist/packem_shared/plaintextSecretInWranglerVariables-NKO4YkKf.mjs +35 -0
  39. package/dist/packem_shared/privilegedDispatchUnvalidatedPayload-5Forjckt.mjs +37 -0
  40. package/dist/packem_shared/privilegedFanoutFromPublicProcedure-D3dL01B8.mjs +26 -0
  41. package/dist/packem_shared/publicTableRlsOptoutConfusion-DJ5GFSRD.mjs +38 -0
  42. package/dist/packem_shared/ratelimitDefaultMemoryStore-BISChG5C.mjs +26 -0
  43. package/dist/packem_shared/ratelimitKeySpoofableOrGlobal-DqlHYQQ3.mjs +26 -0
  44. package/dist/packem_shared/ratelimitMiddlewareFailOpen-CJgDCaUw.mjs +33 -0
  45. package/dist/packem_shared/{relationReferencesUnknownField-YznyXt_7.mjs → relationReferencesUnknownField-D4hckqi8.mjs} +1 -1
  46. package/dist/packem_shared/softDeleteIncludeDeletedFromArgs-BLqDKrkM.mjs +38 -0
  47. package/dist/packem_shared/storageGenerateUploadUrlNoContentTypePin-Da4L9Ge8.mjs +26 -0
  48. package/dist/packem_shared/storageKeyFromUserArgs-B7k0iiGb.mjs +26 -0
  49. package/dist/packem_shared/storagePresignedUrlForPrivateContent-yGmb8uqz.mjs +47 -0
  50. package/dist/packem_shared/storageUploadWithoutContentTypeAllowlist-BV-gF1lT.mjs +27 -0
  51. package/dist/packem_shared/storageUploadWithoutMaxSize-DpxO59wU.mjs +27 -0
  52. package/dist/packem_shared/vectorsNamespaceFromUserInput-CCSl5SYq.mjs +26 -0
  53. package/package.json +2 -2
  54. package/dist/packem_shared/helpers-DNCkMWZQ.mjs +0 -4
package/dist/index.d.mts CHANGED
@@ -18,6 +18,69 @@ interface AdvisorAdminRoute {
18
18
  usesGuard: boolean;
19
19
  }
20
20
  /**
21
+ * One `ctx.ai.run(model, …)` call whose model-id argument is derived from the
22
+ * handler's `args` with no server-side scoping — the input the
23
+ * `ai_raw_run_escape_hatch` lint consumes. `ctx.ai.run` is the raw Workers AI
24
+ * binding passthrough, bypassing the typed `ctx.ai.model(...)` + AI-SDK layer
25
+ * (`generateText`/`streamText`/…) that caps output and enforces a schema. When
26
+ * the model id comes straight from request input, any caller can select an
27
+ * arbitrary model. A fixed literal model, or one scoped by a server-trusted
28
+ * `ctx.*` value, is *not* recorded; only an arg-derived, unscoped model id
29
+ * reaches here — an arg-derived `inputs` argument is normal usage and is never
30
+ * inspected. Produced by the codegen feeder; runtime callers don't supply it,
31
+ * so the lint finds nothing there.
32
+ */
33
+ interface AdvisorAiRawRun {
34
+ /** The exported binding name of the procedure performing the `ctx.ai.run` call. */
35
+ exportName: string;
36
+ /** Source file relative to the lunora dir, no extension. */
37
+ file: string;
38
+ /** 1-based line of the `ctx.ai.run` call, or `0` when unknown. */
39
+ line: number;
40
+ }
41
+ /**
42
+ * One `generateText` / `streamText` call whose `tools` reach a privileged side
43
+ * effect — the shared input for the `ai_tool_side_effect_prompt_injection` lint.
44
+ * A model-callable `tool({ execute })` that writes to the database, dispatches
45
+ * another function, or sends outbound (fetch / mail / queue) hands the LLM the
46
+ * trigger for a real-world action; `userInputDerived` records whether the model
47
+ * input (`prompt`/`messages`/`system`) flows from the handler's `args`, the
48
+ * channel a prompt injection rides in on. Produced by the codegen feeder; runtime
49
+ * callers don't supply it, so the lint finds nothing there.
50
+ */
51
+ interface AdvisorAiToolSideEffect {
52
+ /** The exported binding name of the procedure performing the call. */
53
+ exportName: string;
54
+ /** Source file relative to the lunora dir, no extension. */
55
+ file: string;
56
+ /** 1-based line of the generation call, or `0` when unknown. */
57
+ line: number;
58
+ /** The generation entrypoint invoked. */
59
+ method: "generateText" | "streamText";
60
+ /** The privileged side-effect sink a model-callable tool reaches (`ctx.db.insert`, `ctx.run`, `ctx.fetch`, …). */
61
+ sideEffect: string;
62
+ /** `true` when a model-input option is derived from the handler's `args` (a bare `args.x`, or a name destructured from `args`). */
63
+ userInputDerived: boolean;
64
+ }
65
+ /**
66
+ * One `ctx.fetch(url, …)` call inside an action whose URL argument is derived
67
+ * from the handler's `args` — the input the `action_fetch_ssrf` lint consumes.
68
+ * `ctx.fetch` is the action-only outbound-request escape hatch with no host
69
+ * allowlist, so a URL assembled from request input is a server-side request
70
+ * forgery vector (cloud metadata endpoints, internal services). A fixed literal
71
+ * URL, or one built from config/`ctx.*`, is *not* recorded; only an arg-derived
72
+ * URL reaches here. Produced by the codegen feeder; runtime callers don't supply
73
+ * it, so the lint finds nothing there.
74
+ */
75
+ interface AdvisorArgumentDerivedFetch {
76
+ /** The exported binding name of the action performing the `ctx.fetch` call. */
77
+ exportName: string;
78
+ /** Source file relative to the lunora dir, no extension. */
79
+ file: string;
80
+ /** 1-based line of the `ctx.fetch` call, or `0` when unknown. */
81
+ line: number;
82
+ }
83
+ /**
21
84
  * One public procedure's argument validators reduced to the input-safety facts
22
85
  * the `public_arg_uses_any` and `unbounded_string_arg` lints consume: which args
23
86
  * are declared `v.any()` (unvalidated input) and which `v.string()` args carry no
@@ -38,6 +101,46 @@ interface AdvisorArgumentValidator {
38
101
  unboundedStringArgs: ReadonlyArray<string>;
39
102
  }
40
103
  /**
104
+ * One `createAuth({...})` call's configuration snapshot — the shared input for
105
+ * the five `auth_*` security lints (`auth_trusted_origins_wildcard`,
106
+ * `auth_csrf_check_disabled`, `auth_secure_cookies_disabled`,
107
+ * `auth_email_verification_disabled`, `auth_session_freshage_zero`).
108
+ *
109
+ * The feeder matches the `createAuth` call by callee name and, when its config
110
+ * argument is a static object literal, reads the handful of nested facts each
111
+ * lint cares about. An opaque config (a top-level spread, or a non-object-literal
112
+ * argument) is recorded with `analyzable: false` and every boolean fact left at
113
+ * its SAFE (not-flagged) value, so a config assembled elsewhere can't be flagged
114
+ * on a key it may or may not set. Produced by the codegen feeder; runtime
115
+ * callers don't supply it, so the auth-config lints find nothing there.
116
+ */
117
+ interface AdvisorAuthConfig {
118
+ /**
119
+ * `true` when the call's config argument was a static object literal the
120
+ * feeder could read. `false` when the config was opaque (a variable, spread,
121
+ * call result, or missing argument) — every lint below skips such a config.
122
+ */
123
+ analyzable: boolean;
124
+ /** `advanced.disableCSRFCheck === true`. */
125
+ disableCsrfCheck: boolean;
126
+ /** `emailAndPassword.enabled === true`. */
127
+ emailPasswordEnabled: boolean;
128
+ /** The exported binding name enclosing the `createAuth(...)` call. */
129
+ exportName: string;
130
+ /** Source file relative to the lunora dir, no extension. */
131
+ file: string;
132
+ /** 1-based line of the `createAuth(...)` call, or `0` when unknown. */
133
+ line: number;
134
+ /** `emailAndPassword.requireEmailVerification === true` present. */
135
+ requireEmailVerification: boolean;
136
+ /** `advanced.useSecureCookies === false`. */
137
+ secureCookiesDisabled: boolean;
138
+ /** `session.freshAge === 0` (explicit literal). */
139
+ sessionFreshAgeZero: boolean;
140
+ /** `trustedOrigins` array literal contains a `"*"` element. */
141
+ trustedOriginsWildcard: boolean;
142
+ }
143
+ /**
41
144
  * One `ctx.authApi.&lt;method>(...)` call discovered in a function body — the input
42
145
  * the `auth_api_call_without_headers` lint consumes. Produced by the codegen
43
146
  * feeder; runtime callers don't supply it, so the lint finds nothing there.
@@ -55,6 +158,100 @@ interface AdvisorAuthApiCall {
55
158
  method: string;
56
159
  }
57
160
  /**
161
+ * One `ctx.browser.&lt;method>(url, …)` call whose navigation URL (`arguments[0]`)
162
+ * is derived from the handler's `args` with no server-side scoping — the input
163
+ * the `browser_user_url_without_allowlist` lint consumes. `@lunora/browser`
164
+ * blocks private/internal targets by default, but a request-supplied *public*
165
+ * URL can still turn the headless browser into an open-proxy / SSRF tool
166
+ * (fetching arbitrary third-party URLs, DNS-rebinding to internal hosts). A
167
+ * fixed literal URL, or one scoped by a server-trusted `ctx.*` value, is not
168
+ * recorded; only an arg-derived, unscoped URL reaches here. Produced by the
169
+ * codegen feeder; runtime callers don't supply it, so the lint finds nothing
170
+ * there.
171
+ */
172
+ interface AdvisorBrowserUrlAccess {
173
+ /** The exported binding name of the procedure performing the `ctx.browser` call. */
174
+ exportName: string;
175
+ /** Source file relative to the lunora dir, no extension. */
176
+ file: string;
177
+ /** 1-based line of the `ctx.browser` call, or `0` when unknown. */
178
+ line: number;
179
+ /** The browser method invoked: `content` / `pdf` / `scrape` / `screenshot`. */
180
+ method: string;
181
+ }
182
+ /**
183
+ * One factory/constructor call in `lunora/` whose configuration object literal a
184
+ * security lint inspects for a present-or-absent key — the shared input for the
185
+ * config-call security lints (payment authorize, inbound-mail verify, rate-limit
186
+ * store, browser private-targets).
187
+ *
188
+ * The feeder records the callee name and, when the config argument is a static
189
+ * object literal it could read, the set of keys present and the subset assigned
190
+ * the literal `true`. Produced by the codegen feeder; runtime callers don't
191
+ * supply it, so the config-call lints find nothing there.
192
+ */
193
+ interface AdvisorConfigCall {
194
+ /**
195
+ * `true` when the call's config argument was a static object literal the
196
+ * feeder could read. `false` when the config was opaque (a variable, spread,
197
+ * call result, or missing argument) — key-presence lints skip such calls so
198
+ * a config assembled elsewhere can't be flagged on a key it may well set.
199
+ */
200
+ analyzable: boolean;
201
+ /** The factory function or constructor name at the call site, e.g. `createPayment` / `RateLimiter`. */
202
+ callee: string;
203
+ /** Source file relative to the lunora dir, no extension. */
204
+ file: string;
205
+ /** 1-based line of the call site, or `0` when unknown. */
206
+ line: number;
207
+ /** Keys present in the config object literal (empty when not `analyzable`). */
208
+ presentKeys: ReadonlyArray<string>;
209
+ /** Keys in the config object literal explicitly assigned the literal `true`. */
210
+ trueKeys: ReadonlyArray<string>;
211
+ }
212
+ /**
213
+ * One `ctx.containers.&lt;exportName>.get(name, …)` call whose instance key is
214
+ * derived from the handler's `args` with no server-side scoping — the input
215
+ * the `container_instance_key_from_user_input` lint consumes. A container
216
+ * definition's `.get(name)` accessor routes to one instance per `name`, so a
217
+ * key taken straight from request input lets any caller reach any other
218
+ * tenant's container (a cross-tenant IDOR). A fixed literal key, or one
219
+ * derived from a server-trusted identity (`` `${ctx.auth.userId}` `` —
220
+ * references `ctx`, so treated as scoped), is not recorded; only an
221
+ * arg-derived, unscoped key reaches here. Produced by the codegen feeder;
222
+ * runtime callers don't supply it, so the lint finds nothing there.
223
+ */
224
+ interface AdvisorContainerKeyAccess {
225
+ /** The exported binding name of the procedure performing the `ctx.containers` access. */
226
+ exportName: string;
227
+ /** Source file relative to the lunora dir, no extension. */
228
+ file: string;
229
+ /** 1-based line of the `ctx.containers.*.get` call, or `0` when unknown. */
230
+ line: number;
231
+ /** The container accessor method invoked — always `get` (the only per-instance-key sink). */
232
+ method: string;
233
+ }
234
+ /**
235
+ * One runtime container-override call: a `&lt;handle>.start({ enableInternet: true, … })`
236
+ * launch override, or a `&lt;handle>.egress.&lt;method>(...)` runtime firewall mutation
237
+ * (`allow` / `deny` / `setAllowed`) — the `container_start_enable_internet_override`
238
+ * and `container_runtime_egress_relaxation` lint input. Both shapes re-open network
239
+ * access the static `defineContainer` declaration (and its `container_public_internet`
240
+ * lint) assumes is locked down. Structurally identical to `ContainerOverrideIR`.
241
+ */
242
+ interface AdvisorContainerOverride {
243
+ /** e.g. the egress method name, or `"enableInternet: true"`. */
244
+ detail: string;
245
+ /** Export binding name of the procedure performing the call. */
246
+ exportName: string;
247
+ /** Source file relative to the lunora dir, no extension. */
248
+ file: string;
249
+ /** Which override shape matched. */
250
+ kind: "egress_relaxation" | "enable_internet";
251
+ /** 1-based line of the call, or `0` when unknown. */
252
+ line: number;
253
+ }
254
+ /**
58
255
  * One container declaration discovered in `lunora/containers.ts` — the input
59
256
  * the `container_*` lints consume. Produced by the codegen feeder (which lifts
60
257
  * the static fields of each `defineContainer({...})` export); runtime callers
@@ -84,6 +281,108 @@ interface AdvisorContainer {
84
281
  sleepAfter?: number | string;
85
282
  }
86
283
  /**
284
+ * One rate-limit / Turnstile middleware call — the `ratelimit_middleware_fail_open`
285
+ * lint input. `rateLimit`/`dbRateLimit` (`@lunora/ratelimit`) and
286
+ * `verifyTurnstileMiddleware` (`@lunora/auth`) each accept a `failOpen` escape
287
+ * hatch that admits every request when the limiter/siteverify is unavailable;
288
+ * `failOpen` is `true` only when the options literal set it to the boolean
289
+ * literal `true` (anything else is fail-closed). The lint escalates a fail-open
290
+ * guard to a finding when the guarded procedure (`exportName`/`limitName`) looks
291
+ * auth/payment-sensitive. Produced by the codegen feeder; runtime callers don't
292
+ * supply it, so the lint finds nothing there.
293
+ */
294
+ interface AdvisorFailOpenGuard {
295
+ /** The middleware factory at the call site: `rateLimit` / `dbRateLimit` / `verifyTurnstileMiddleware`. */
296
+ callee: string;
297
+ /** The exported binding name of the procedure the guard is attached to, or `"&lt;module>"` at file scope. */
298
+ exportName: string;
299
+ /** `true` only when the options literal set `failOpen: true` as a boolean literal; a non-literal or absent option is treated as fail-closed. */
300
+ failOpen: boolean;
301
+ /** Source file relative to the lunora dir, no extension. */
302
+ file: string;
303
+ /** The rate-limit `name` (second string argument) for `rateLimit`/`dbRateLimit`; `""` for `verifyTurnstileMiddleware`. */
304
+ limitName: string;
305
+ /** 1-based line of the middleware call, or `0` when unknown. */
306
+ line: number;
307
+ }
308
+ /**
309
+ * One `ctx.flags.boolean("key", &lt;boolean-literal>)` read — the
310
+ * `flag_gates_security_with_unsafe_default` lint input. OpenFeature returns the
311
+ * `defaultValue` when the provider errors, so a fail-open default on a
312
+ * security-shaped key (an `enforce`/`rls`/`gate`/`lockdown` protection
313
+ * defaulting `false`, or an `allow`/`permit`/`bypass` permission defaulting
314
+ * `true`) silently opens access during an outage. Only reads with a
315
+ * statically-known string key and boolean-literal default are recorded; the lint
316
+ * owns the security-shape + polarity judgment. Produced by the codegen feeder;
317
+ * runtime callers don't supply it, so the lint finds nothing there.
318
+ */
319
+ interface AdvisorFlagSecurityDefault {
320
+ /** The boolean-literal default returned on a provider outage (fail-open value). */
321
+ defaultValue: boolean;
322
+ /** The exported binding name of the procedure performing the flag read, or `"&lt;module>"` at file scope. */
323
+ exportName: string;
324
+ /** Source file relative to the lunora dir, no extension. */
325
+ file: string;
326
+ /** The flag key — the first string-literal argument of `ctx.flags.boolean`. */
327
+ key: string;
328
+ /** 1-based line of the `ctx.flags.boolean` call, or `0` when unknown. */
329
+ line: number;
330
+ }
331
+ /**
332
+ * One discovered `httpAction`/`httpRoute` handler that performs a side effect
333
+ * (`ctx.runMutation` / `ctx.runAction` / a `ctx.db.{insert,patch,replace,delete,
334
+ * insertManyUnsafe}` write) from the HTTP edge, with whether it reads `ctx.auth`
335
+ * — the `http_action_missing_auth_guard` lint input. A handler that mutates state
336
+ * or dispatches an action without ever consulting the request identity is an
337
+ * unauthenticated write bypassing identity/RLS (distinct from
338
+ * `admin_route_without_guard`, which covers Studio/admin paths). Only handlers
339
+ * with a statically-resolvable inline body and `ctx` binding are recorded
340
+ * (fail-safe under-report); read-only handlers are never recorded. Produced by
341
+ * the codegen feeder; runtime callers don't supply it, so the lint finds nothing
342
+ * there.
343
+ */
344
+ interface AdvisorHttpActionGuard {
345
+ /** The exported binding name of the handler (or `"&lt;module>"` when mounted inline / not a named binding). */
346
+ exportName: string;
347
+ /** Source file relative to the lunora dir, no extension. */
348
+ file: string;
349
+ /** Which HTTP surface the handler is: a raw `httpAction` or a typed `httpRoute` route. */
350
+ kind: "httpAction" | "httpRoute";
351
+ /** 1-based line of the handler call, or `0` when unknown. */
352
+ line: number;
353
+ /** For an `httpRoute`, the uppercased verb (`"POST"`); absent for a raw `httpAction`. */
354
+ method?: string;
355
+ /** `true` when the handler reads `ctx.auth` (a direct member access or a `const { auth } = ctx` destructure). */
356
+ readsAuth: boolean;
357
+ /** The first side effect found, as a stable label: `runMutation`, `runAction`, or `db.&lt;method>`. */
358
+ sideEffect: string;
359
+ }
360
+ /**
361
+ * One response-header write, inside an `httpAction` handler, whose value is derived
362
+ * from raw request input (`request.headers`, `request.url`/query, `await
363
+ * request.json()`) with no CR/LF sanitizer — the
364
+ * `http_action_response_header_injection` lint input. A `Request`-derived string
365
+ * placed verbatim into a response header lets a caller smuggle `\r\n` and inject
366
+ * extra headers or split the response. Only request-tainted, unguarded sites are
367
+ * recorded — a value routed through `isSafeHeaderValue`, `encodeURIComponent`/
368
+ * `encodeURI`, a numeric coercion, or `btoa` is treated as safe (`String(...)` /
369
+ * `.toString()` are NOT sanitizers). Produced by the codegen feeder; runtime
370
+ * callers don't supply it, so the lint finds nothing there. Structurally identical
371
+ * to `HttpHeaderWriteIR`.
372
+ */
373
+ interface AdvisorHttpHeaderWrite {
374
+ /** The exported binding name of the enclosing handler, or `"&lt;module>"` when mounted inline. */
375
+ exportName: string;
376
+ /** Source file relative to the lunora dir, no extension. */
377
+ file: string;
378
+ /** The header name being written (`"location"`), or `""` when the key is not a string literal. */
379
+ headerName: string;
380
+ /** 1-based line of the request-tainted header value. */
381
+ line: number;
382
+ /** How the header was written. */
383
+ via: "headers-append" | "headers-ctor" | "headers-set" | "response-init";
384
+ }
385
+ /**
87
386
  * One `ctx.sql` access discovered lexically inside a `query(...)` or
88
387
  * `mutation(...)` handler body — the input the `hyperdrive_outside_action` lint
89
388
  * consumes. Produced by the codegen feeder, which walks each exported function's
@@ -110,6 +409,41 @@ interface AdvisorHyperdriveCall {
110
409
  line: number;
111
410
  }
112
411
  /**
412
+ * One `&lt;receiver>.identity.&lt;key>` claim read (where `&lt;receiver>` is an RLS/mask
413
+ * policy `auth`, or `ctx.auth`/`context.auth`) — the shared input for the
414
+ * `identity_undeclared_claim_trusted` lint. `defineIdentity` validates only its
415
+ * declared claims at the trust boundary and forwards undeclared claims
416
+ * verbatim, so a read of a claim outside the declared contract trusts an
417
+ * unvalidated, forgeable value. `declared` records whether `key` is in the
418
+ * contract (or the always-present `userId`); the lint flags the undeclared reads.
419
+ * Produced by the codegen feeder — and only when a resolvable `defineIdentity`
420
+ * contract exists — so runtime callers supply nothing and the lint finds nothing
421
+ * there.
422
+ */
423
+ interface AdvisorIdentityClaimRead {
424
+ /** `true` when `key` is a declared claim (in the `defineIdentity` contract, or the always-present `userId`). */
425
+ declared: boolean;
426
+ /** The exported binding name of the enclosing declaration (`&lt;module>` at file scope). */
427
+ exportName: string;
428
+ /** Source file relative to the lunora dir, no extension. */
429
+ file: string;
430
+ /** The claim key read off the identity bag. */
431
+ key: string;
432
+ /** 1-based line of the read, or `0` when unknown. */
433
+ line: number;
434
+ }
435
+ /**
436
+ * One `buildImageDeliveryUrl({ key, … })` call (`@lunora/bindings/images`) whose
437
+ * `key` — the CDN transform's source image, an absolute URL or an
438
+ * origin-relative key — is derived from the handler's `args` with no
439
+ * server-side scoping — the `images_url_source_from_user_input` lint input.
440
+ */
441
+ interface AdvisorImageDeliveryUrlAccess {
442
+ exportName: string;
443
+ file: string;
444
+ line: number;
445
+ }
446
+ /**
113
447
  * Observed read signal over a table — the input the `index_utilization` runtime
114
448
  * lint consumes. Produced by the studio backend from each shard's recorded
115
449
  * metrics.
@@ -177,6 +511,49 @@ interface AdvisorInsertWrite {
177
511
  table: string;
178
512
  }
179
513
  /**
514
+ * One `ctx.kv.&lt;method>(key, …)` call whose namespace key is derived from the
515
+ * handler's `args` with no server-side scoping — the input the
516
+ * `kv_unscoped_user_key_idor` lint consumes. Workers KV is a single flat
517
+ * namespace, so a key taken straight from request input lets any caller read,
518
+ * overwrite, or delete another user's entry (an insecure direct object
519
+ * reference). A fixed literal key, or one prefixed with a server-trusted identity
520
+ * (`` `${ctx.auth.userId}:…` `` — references `ctx`, so treated as scoped), is not
521
+ * recorded; only an arg-derived, unscoped key reaches here. Produced by the
522
+ * codegen feeder; runtime callers don't supply it, so the lint finds nothing
523
+ * there.
524
+ */
525
+ interface AdvisorKvKeyAccess {
526
+ /** The exported binding name of the procedure performing the `ctx.kv` access. */
527
+ exportName: string;
528
+ /** Source file relative to the lunora dir, no extension. */
529
+ file: string;
530
+ /** 1-based line of the `ctx.kv` call, or `0` when unknown. */
531
+ line: number;
532
+ /** The `ctx.kv` method invoked: `get` / `getRaw` / `getWithMetadata` / `put` / `delete`. */
533
+ method: string;
534
+ }
535
+ /**
536
+ * One `ctx.mail`/`ctx.email` `send`/`queue` call whose recipient field
537
+ * (`to`/`cc`/`bcc`) is derived from the handler's `args` with no server-side
538
+ * scoping — the input the `mail_recipient_from_request_input` lint consumes. A
539
+ * recipient taken straight from request input turns the deployment into an
540
+ * open relay / spam amplifier: any caller can direct mail to an arbitrary
541
+ * address. A fixed literal recipient, or one scoped by a server-trusted
542
+ * `ctx.*` value (e.g. `ctx.auth.user.email`), is not recorded; only an
543
+ * arg-derived, unscoped recipient reaches here. Produced by the codegen
544
+ * feeder; runtime callers don't supply it, so the lint finds nothing there.
545
+ */
546
+ interface AdvisorMailRecipientAccess {
547
+ /** The exported binding name of the procedure performing the `ctx.mail`/`ctx.email` call. */
548
+ exportName: string;
549
+ /** Source file relative to the lunora dir, no extension. */
550
+ file: string;
551
+ /** 1-based line of the `ctx.mail`/`ctx.email` call, or `0` when unknown. */
552
+ line: number;
553
+ /** The mailer method invoked: `send` / `queue`. */
554
+ method: string;
555
+ }
556
+ /**
180
557
  * One procedure (query / mutation / action) discovered in the lunora source,
181
558
  * reduced to the facts the `mask_uncovered_pii_column` lint needs: whether the
182
559
  * procedure's builder chain includes `.use(mask(...))`, which `(table, column)`
@@ -214,6 +591,30 @@ interface AdvisorMaskProcedure {
214
591
  visibility: "internal" | "public";
215
592
  }
216
593
  /**
594
+ * One masked column whose `mask(policies)` strategy is a statically-known
595
+ * literal (`"hash"` or `"redact"`) — the `mask_weak_hash_strategy_on_pii` lint
596
+ * input. Unlike `AdvisorMaskProcedure` (one row per procedure, `maskColumns`
597
+ * without a strategy), this is one row per masked column with its strategy
598
+ * literal attached, so the lint can flag `"hash"` applied to a PII-named
599
+ * column. A `MaskFn` (custom, non-literal) strategy carries no lint-relevant
600
+ * signal and is never recorded here. Produced by the codegen feeder; runtime
601
+ * callers don't supply it, so the lint finds nothing there.
602
+ */
603
+ interface AdvisorMaskStrategy {
604
+ /** Masked column name. */
605
+ column: string;
606
+ /** The exported binding name of the procedure whose `.use(mask(...))` chain declared this column, or `"&lt;module>"` when declared at file scope. */
607
+ exportName: string;
608
+ /** Source file relative to the lunora dir, no extension. */
609
+ file: string;
610
+ /** 1-based line of the masked column's strategy property. */
611
+ line: number;
612
+ /** The statically-known strategy literal: `"hash"` or `"redact"`. */
613
+ strategy: string;
614
+ /** Logical table the masked column belongs to. */
615
+ table: string;
616
+ }
617
+ /**
217
618
  * One whole-row `ctx.db.replace(id, document)` write discovered inside a custom
218
619
  * mutator's authoritative `server` impl (`lunora/mutators.ts`) — the input the
219
620
  * `mutator_full_row_replace` lint consumes.
@@ -258,6 +659,109 @@ interface AdvisorNondeterministicCall {
258
659
  line: number;
259
660
  }
260
661
  /**
662
+ * One `query`/`mutation` handler that gates a `ctx.db.get`/`patch`/`delete` on a
663
+ * null-checked `ctx.db.normalizeId(table, id)` result — the shared input for the
664
+ * `normalize_id_used_as_authorization` lint. `normalizeId` validates an id's
665
+ * structural shape only (it never reads the database), so a non-null result proves
666
+ * the id is well-formed, never that the caller owns the row; gating access on it is
667
+ * an IDOR. The lint keeps only public procedures with no `.use(rls(...))` and no
668
+ * ownership/identity mention (`mentionsOwnership`), then joins `table` against the
669
+ * schema's RLS mode before flagging. Produced by the codegen feeder; runtime callers
670
+ * don't supply it, so the lint finds nothing there. Structurally identical to
671
+ * `@lunora/codegen`'s `NormalizeIdAuthorizationIR`.
672
+ */
673
+ interface AdvisorNormalizeIdAuthorization {
674
+ /** The exported binding name of the procedure performing the normalize-then-access. */
675
+ exportName: string;
676
+ /** Source file relative to the lunora dir, no extension. */
677
+ file: string;
678
+ /** 1-based line of the `ctx.db.normalizeId(...)` call the access is gated on. */
679
+ line: number;
680
+ /** `true` when the handler anywhere reads an ownership-named identifier or `ctx.auth`/`ctx.identity`/… — an intervening ownership signal. */
681
+ mentionsOwnership: boolean;
682
+ /** The id-first `ctx.db` sink the normalized id reaches. */
683
+ sinkMethod: "delete" | "get" | "patch";
684
+ /** Table named in the `normalizeId` call, or `""` when its table argument wasn't a string literal. */
685
+ table: string;
686
+ /** `true` when the procedure's builder chain carries a `.use(rls(...))` step. */
687
+ usesRls: boolean;
688
+ /** `"internal"` for `internalQuery`/`internalMutation`; `"public"` for `query`/`mutation`. */
689
+ visibility: "internal" | "public";
690
+ }
691
+ /**
692
+ * One `ctx.db` write (`insert` / `replace` / `patch` / `insertManyUnsafe`) that
693
+ * sets an ownership / identity column — `userId`, `ownerId`, `tenantId`, and the
694
+ * like — from the handler's `args` instead of the server-trusted identity. This
695
+ * is the `owner_field_from_args_not_auth` lint input: the ownership column decides
696
+ * who a row belongs to, so a value taken from request input lets any caller write
697
+ * rows owned by another user or tenant (the act-as-any-user / cross-tenant IDOR
698
+ * vector). A column stamped from `ctx.auth` / `ctx.identity`, or set to a fixed
699
+ * literal, is *not* recorded; only an arg-derived identity write reaches here.
700
+ * Produced by the codegen feeder; runtime callers don't supply it, so the lint
701
+ * finds nothing there. Structurally identical to `OwnerFieldWriteIR`.
702
+ */
703
+ interface AdvisorOwnerFieldWrite {
704
+ /** The exported binding name of the procedure performing the write. */
705
+ exportName: string;
706
+ /** The identity column being written from `args` (e.g. `userId`). */
707
+ field: string;
708
+ /** Source file relative to the lunora dir, no extension. */
709
+ file: string;
710
+ /** 1-based line of the `ctx.db` write call, or `0` when unknown. */
711
+ line: number;
712
+ /** The `ctx.db` write method (`insert` / `replace` / `patch` / `insertManyUnsafe`). */
713
+ method: string;
714
+ }
715
+ /**
716
+ * One payment webhook-adapter construction (`createStripeAdapter` /
717
+ * `createPolarAdapter`) — the shared input for the
718
+ * `payment_webhook_wide_tolerance` lint. The adapters verify a webhook's signed
719
+ * timestamp against a `webhookToleranceSeconds` replay window (default 300s); an
720
+ * implausibly wide window leaves the endpoint accepting stale, replayable signed
721
+ * payloads long after capture. `toleranceSeconds` carries the statically-known
722
+ * literal (when present and a plain numeric literal); the lint fires only above a
723
+ * conservative ceiling. Produced by the codegen feeder; runtime callers don't
724
+ * supply it, so the lint finds nothing there.
725
+ */
726
+ interface AdvisorPaymentWebhook {
727
+ /** The adapter factory invoked. */
728
+ callee: "createPolarAdapter" | "createStripeAdapter";
729
+ /** The exported binding name of the enclosing declaration (`&lt;module>` at file scope). */
730
+ exportName: string;
731
+ /** Source file relative to the lunora dir, no extension. */
732
+ file: string;
733
+ /** 1-based line of the construction, or `0` when unknown. */
734
+ line: number;
735
+ /** Statically-known `webhookToleranceSeconds` literal, when present and a plain numeric literal. */
736
+ toleranceSeconds?: number;
737
+ }
738
+ /**
739
+ * One payload-derived privileged dispatch — a `ctx.run`/`context.run` back into a
740
+ * Lunora function from inside a `defineQueue` push handler or a `defineWorkflow`
741
+ * handler, whose args reference the handler's untrusted payload (`context.params`
742
+ * for a workflow, a `for (… of batch.messages)` body for a queue) — the input the
743
+ * `privileged_dispatch_unvalidated_payload` lint consumes. Both handler kinds run
744
+ * under the **system identity** (RLS disabled), so forwarding attacker-influenced
745
+ * payload into the dispatch skips the target's row policy. The lint joins the
746
+ * resolved `targetFile`/`targetExport` against the RLS-procedure evidence and
747
+ * fires only when the target enforces RLS. Produced by the codegen feeder;
748
+ * runtime callers don't supply it, so the lint finds nothing there.
749
+ */
750
+ interface AdvisorPrivilegedDispatch {
751
+ /** `"queue"` for a `defineQueue` handler, `"workflow"` for a `defineWorkflow` handler. */
752
+ dispatchKind: "queue" | "workflow";
753
+ /** Source file relative to the lunora dir, no extension. */
754
+ file: string;
755
+ /** The exported handler binding performing the dispatch. */
756
+ handlerExport: string;
757
+ /** 1-based line of the dispatch call, or `0` when unknown. */
758
+ line: number;
759
+ /** Export name of the dispatched target (`send` in `api.messages.send`). */
760
+ targetExport: string;
761
+ /** File path of the dispatched target relative to the lunora dir (`messages` in `api.messages.send`). */
762
+ targetFile: string;
763
+ }
764
+ /**
261
765
  * One procedure (query / mutation / action) reduced to the protective middlewares
262
766
  * its builder chain installs plus the behavioural facts that decide whether a
263
767
  * guard is expected — the input the `public_mutation_without_ratelimit` and
@@ -271,12 +775,18 @@ interface AdvisorProcedureProtection {
271
775
  callsMail: boolean;
272
776
  /** The exported binding name of the procedure (e.g. `signUp`). */
273
777
  exportName: string;
778
+ /** `true` when the handler fans work out to a privileged, cost-bearing dispatch surface (scheduler `runAfter`/`runAt`, a queue producer send, or a workflow create). Read by the privileged-fanout lint, paired with public visibility and no rate limit. */
779
+ fanOut: boolean;
274
780
  /** Source file relative to the lunora dir, no extension. */
275
781
  file: string;
276
782
  /** Registration kind — `query` is read-only; `mutation`/`action` are write-shaped. */
277
783
  kind: "action" | "mutation" | "query";
784
+ /** `true` when the handler runs an AI generation (`generateText`/`streamText`/`generateObject`/`streamObject`) with no `maxOutputTokens` bound. Read by the `ai_unbounded_generation_public` lint (paired with public visibility). */
785
+ unboundedAiGeneration: boolean;
278
786
  /** `true` when the chain carries `.use(verifyTurnstile(...))` or a `protectPublic({ captcha })` bundle. */
279
787
  usesCaptcha: boolean;
788
+ /** `true` when the handler calls `ctx.db.insertManyUnsafe(...)`, which bypasses validators and triggers. Read by the `insert_many_unsafe_user_data` lint (paired with public visibility). */
789
+ usesInsertManyUnsafe: boolean;
280
790
  /** `true` when the chain carries `.use(mask(...))`. */
281
791
  usesMask: boolean;
282
792
  /** `true` when the chain carries `.use(rateLimit(...))` or a `protectPublic({ rateLimit })` bundle. */
@@ -334,6 +844,70 @@ interface AdvisorR2sqlCall {
334
844
  line: number;
335
845
  }
336
846
  /**
847
+ * One `rateLimit`/`dbRateLimit` middleware call (`@lunora/ratelimit`) whose
848
+ * `key` selector is derived from the handler's `args` with no server-side
849
+ * scoping — the `ratelimit_key_spoofable_or_global` lint input.
850
+ */
851
+ interface AdvisorRatelimitKeySelector {
852
+ callee: string;
853
+ exportName: string;
854
+ file: string;
855
+ limitName: string;
856
+ line: number;
857
+ }
858
+ /**
859
+ * One `query` handler whose `return` hands back the raw rows of a table — the
860
+ * result of a `ctx.db.&lt;table>.findMany()` / `.findFirst()` / `.get()` read, or a
861
+ * `ctx.db.query("&lt;table>")…collect()` fluent chain — returned directly (or through
862
+ * one local `const` hop) with no hand-built projection. The shared input for the
863
+ * `output_projection_missing_on_public_read` lint, which keeps only `visibility
864
+ * === "public"` rows with no `.output(...)` / `.use(mask(...))` on the chain and
865
+ * joins `table` against the schema's PII-named columns before flagging. Produced by
866
+ * the codegen feeder; runtime callers don't supply it, so the lint finds nothing
867
+ * there. Structurally identical to `@lunora/codegen`'s `RawRowReturnIR`.
868
+ */
869
+ interface AdvisorRawRowReturn {
870
+ /** The exported binding name of the query returning the raw rows. */
871
+ exportName: string;
872
+ /** Source file relative to the lunora dir, no extension. */
873
+ file: string;
874
+ /** 1-based line of the `return` (or concise-body) expression. */
875
+ line: number;
876
+ /** Table whose raw rows are returned, or `""` when the read's table couldn't be statically resolved. */
877
+ table: string;
878
+ /** `true` when the procedure's builder chain carries a `.use(mask(...))` step. */
879
+ usesMask: boolean;
880
+ /** `true` when the procedure's builder chain carries an `.output(...)` return-shape projection. */
881
+ usesOutput: boolean;
882
+ /** `"internal"` for `internalQuery`; `"public"` for `query`. */
883
+ visibility: "internal" | "public";
884
+ }
885
+ /**
886
+ * One `ctx.db.&lt;table>.findMany({ with: { &lt;rel> } })` relation-hydrating list read
887
+ * — the shared input for the `masked_relation_leak_via_with` lint. Column
888
+ * masking is applied per-procedure to the top-level rows of the table named in
889
+ * the read; it does **not** descend into `with`-hydrated relations, so a masked
890
+ * table surfaced only through a `with` on an unprotected parent read is returned
891
+ * in the clear. The lint resolves each relation accessor to its target table and
892
+ * joins it against the discovered mask evidence before flagging. Produced by the
893
+ * codegen feeder; runtime callers don't supply it, so the lint finds nothing
894
+ * there. Structurally identical to `@lunora/codegen`'s `RelationLoadIR`.
895
+ */
896
+ interface AdvisorRelationLoad {
897
+ /** The exported binding name of the procedure performing the read. */
898
+ exportName: string;
899
+ /** Source file relative to the lunora dir, no extension. */
900
+ file: string;
901
+ /** 1-based line of the read call. */
902
+ line: number;
903
+ /** Parent table the read targets, or `""` when it couldn't be statically resolved. */
904
+ parentTable: string;
905
+ /** Relation accessor names named in the read's `with: { … }` map — matched against the parent table's declared relations. */
906
+ relations: ReadonlyArray<string>;
907
+ /** `"internal"` for `internalQuery` / `internalMutation` / `internalAction`. */
908
+ visibility: "internal" | "public";
909
+ }
910
+ /**
337
911
  * One procedure (query / mutation / action) discovered in the lunora source,
338
912
  * reduced to the facts the `rls_uncovered_table` lint needs: whether the
339
913
  * procedure's builder chain includes `.use(rls(...))`, and which tables the
@@ -373,6 +947,15 @@ interface AdvisorRlsProcedure {
373
947
  * read — tables, their columns, indexes, and relations.
374
948
  */
375
949
  interface AdvisorSchema {
950
+ /**
951
+ * Set when the schema opted into `.rls("required")` — every table's `ctx.db`
952
+ * write path is denied without an RLS-covering procedure UNLESS the table
953
+ * itself is `.public()` (see {@link AdvisorTable.isPublic}). `undefined` when
954
+ * the schema never called `.rls("required")`. Read by the
955
+ * `public_table_rls_optout_confusion` and `allow_unauthenticated_shard_access_enabled`
956
+ * lints.
957
+ */
958
+ rlsMode?: "required";
376
959
  tables: ReadonlyArray<AdvisorTable>;
377
960
  }
378
961
  /** A table plus the column/index/relation metadata lints inspect. */
@@ -400,6 +983,15 @@ interface AdvisorTable {
400
983
  fields: ReadonlyArray<string>;
401
984
  /** Every declared index, across all kinds (secondary / search / rank / vector). */
402
985
  indexes: ReadonlyArray<AdvisorIndex>;
986
+ /**
987
+ * `true` when the table was declared with `.public()` — an explicit opt-OUT
988
+ * of the schema's `.rls("required")` enforcement for this one table (the
989
+ * name is misleading: it means "unprotected by RLS", not "safe to read
990
+ * publicly"). Has no effect when the schema itself never required RLS.
991
+ * Defaults to `false`. Read by `public_table_rls_optout_confusion` and
992
+ * `allow_unauthenticated_shard_access_enabled`.
993
+ */
994
+ isPublic?: boolean;
403
995
  /** Table name. */
404
996
  name: string;
405
997
  /**
@@ -424,6 +1016,17 @@ interface AdvisorTable {
424
1016
  * that omits it leaves tier-sensitive lints to treat the table as local.
425
1017
  */
426
1018
  shardKind?: "global" | "root" | "shardBy";
1019
+ /**
1020
+ * Set when the table opted into `.softDelete()` — the marker column
1021
+ * (`field`, default `deletedAt`) whose presence excludes a row from list
1022
+ * reads unless `includeDeleted: true` is passed. Read by
1023
+ * `soft_delete_include_deleted_from_args` to confirm a read's target actually
1024
+ * soft-deletes before flagging an `includeDeleted` toggle on a public read.
1025
+ * Optional — a feeder that doesn't track soft-delete omits it.
1026
+ */
1027
+ softDelete?: {
1028
+ field: string;
1029
+ };
427
1030
  }
428
1031
  /**
429
1032
  * One declared index, flattened across Lunora's index kinds so a single lint can
@@ -546,6 +1149,32 @@ interface AdvisorShardTraffic {
546
1149
  shardKey: string;
547
1150
  }
548
1151
  /**
1152
+ * One `ctx.db.&lt;table>.findMany({ includeDeleted })` list read whose
1153
+ * `includeDeleted` is either a hardcoded `true` or derived from the handler's
1154
+ * `args` — the shared input for the `soft_delete_include_deleted_from_args`
1155
+ * lint. `includeDeleted` resurfaces rows a `.softDelete()` table would otherwise
1156
+ * hide from list reads; on a public read that means any caller (arg-derived) or
1157
+ * every caller (hardcoded `true`) can see soft-deleted rows. Produced by the
1158
+ * codegen feeder; runtime callers don't supply it, so the lint finds nothing
1159
+ * there. Structurally identical to `@lunora/codegen`'s `SoftDeleteReadIR`.
1160
+ */
1161
+ interface AdvisorSoftDeleteRead {
1162
+ /** The exported binding name of the procedure performing the read. */
1163
+ exportName: string;
1164
+ /** Source file relative to the lunora dir, no extension. */
1165
+ file: string;
1166
+ /** `true` when `includeDeleted` was derived from the handler's `args` (any caller can flip it). */
1167
+ fromArgs: boolean;
1168
+ /** `true` when `includeDeleted` was a hardcoded `true` literal (always resurfaces soft-deleted rows). */
1169
+ hardcodedTrue: boolean;
1170
+ /** 1-based line of the read call. */
1171
+ line: number;
1172
+ /** Table read, or `""` when the table couldn't be statically resolved. */
1173
+ table: string;
1174
+ /** `"internal"` for `internalQuery` / `internalMutation` / `internalAction`. */
1175
+ visibility: "internal" | "public";
1176
+ }
1177
+ /**
549
1178
  * One `ctx.sql` tagged-template interpolation that splices an unparameterized
550
1179
  * string-building expression into the query — the input the `sql_injection_risk`
551
1180
  * lint consumes. A `${…}` placeholder that simply names a value is bound as a
@@ -563,6 +1192,55 @@ interface AdvisorSqlInterpolation {
563
1192
  line: number;
564
1193
  }
565
1194
  /**
1195
+ * One `ctx.storage.&lt;bucket>.&lt;method>(key, …)` call whose R2 object key is derived
1196
+ * from the handler's `args` with no server-side scoping — the input the
1197
+ * `storage_key_from_user_args` lint consumes. An object key taken straight from
1198
+ * request input lets any caller read, overwrite, or delete another user's object
1199
+ * (object-level IDOR). A key prefixed with a server-trusted identity (a `ctx.*`
1200
+ * value such as `` `${ctx.auth.userId}/…` ``) is treated as scoped and is *not*
1201
+ * recorded; only an arg-derived, `ctx`-free key reaches here. Produced by the
1202
+ * codegen feeder; runtime callers don't supply it, so the lint finds nothing there.
1203
+ */
1204
+ interface AdvisorStorageKeyAccess {
1205
+ /** The exported binding name of the procedure performing the storage call. */
1206
+ exportName: string;
1207
+ /** Source file relative to the lunora dir, no extension. */
1208
+ file: string;
1209
+ /** 1-based line of the storage call, or `0` when unknown. */
1210
+ line: number;
1211
+ /** The bucket method invoked with the arg-derived key, e.g. `get` / `put` / `delete` / `download`. */
1212
+ method: string;
1213
+ }
1214
+ /**
1215
+ * One tracked `ctx.storage.&lt;bucket>.&lt;method>(...)` upload/signing call — the
1216
+ * shared input for the storage config-hygiene security lints
1217
+ * (`storage_upload_without_content_type_allowlist`, `storage_upload_without_max_size`,
1218
+ * `storage_generate_upload_url_no_content_type_pin`, `storage_presigned_url_for_private_content`).
1219
+ * `upload`/`store` carry the `UploadOptions` guards (`allowedContentTypes` /
1220
+ * `maxSize`); `generateUploadUrl` carries the signed-PUT `contentType` pin;
1221
+ * `getPresignedUrl`/`getSignedUrl` carry a statically-known `expiresInSeconds`
1222
+ * literal. `presentKeys` is empty (and `expiresInSeconds` unset) when the
1223
+ * options argument was absent, a non-literal, or a spread — see `analyzable`.
1224
+ * Produced by the codegen feeder; runtime callers don't supply it, so the
1225
+ * lints find nothing there.
1226
+ */
1227
+ interface AdvisorStorageUpload {
1228
+ /** `true` when the call's options-object argument (or its deliberate absence) was statically resolvable. */
1229
+ analyzable: boolean;
1230
+ /** Numeric literal value of an `expiresInSeconds` option, when statically known (`getSignedUrl` / `getPresignedUrl` only). */
1231
+ expiresInSeconds?: number;
1232
+ /** The exported binding name of the procedure performing the call. */
1233
+ exportName: string;
1234
+ /** Source file relative to the lunora dir, no extension. */
1235
+ file: string;
1236
+ /** 1-based line of the call, or `0` when unknown. */
1237
+ line: number;
1238
+ /** The `ctx.storage` method invoked. */
1239
+ method: "generateUploadUrl" | "getPresignedUrl" | "getSignedUrl" | "store" | "upload";
1240
+ /** Options-object keys present at the call site (empty when not `analyzable`, or when no options argument was passed). */
1241
+ presentKeys: string[];
1242
+ }
1243
+ /**
566
1244
  * A bounded sample of rows from one table, fed into the constraint-validator
567
1245
  * lint by the studio backend (via `readTablePage`). The cap prevents unbounded
568
1246
  * scans while still catching obvious violations on small-to-medium tables.
@@ -588,6 +1266,28 @@ interface AdvisorTableSample {
588
1266
  readonly truncated: boolean;
589
1267
  }
590
1268
  /**
1269
+ * One `ctx.vectors.&lt;method>(indexName, input)` call whose `input.namespace` is
1270
+ * derived from the handler's `args` with no server-side scoping — the input the
1271
+ * `vectors_namespace_from_user_input` lint consumes. A Vectorize namespace
1272
+ * partitions one index into isolated sub-collections, so a namespace taken
1273
+ * straight from request input lets any caller read or poison another tenant's
1274
+ * vectors. A fixed literal namespace, or one prefixed with a server-trusted
1275
+ * identity (`` `${ctx.auth.orgId}` `` — references `ctx`, so treated as
1276
+ * scoped), is not recorded; only an arg-derived, unscoped namespace reaches
1277
+ * here. Produced by the codegen feeder; runtime callers don't supply it, so
1278
+ * the lint finds nothing there.
1279
+ */
1280
+ interface AdvisorVectorNamespaceAccess {
1281
+ /** The exported binding name of the procedure performing the `ctx.vectors` access. */
1282
+ exportName: string;
1283
+ /** Source file relative to the lunora dir, no extension. */
1284
+ file: string;
1285
+ /** 1-based line of the `ctx.vectors` call, or `0` when unknown. */
1286
+ line: number;
1287
+ /** The `ctx.vectors` method invoked: `query` / `upsert` / `upsertMany`. */
1288
+ method: string;
1289
+ }
1290
+ /**
591
1291
  * The two workflow-shaped inputs the `workflow_*` lints consume, produced by the
592
1292
  * codegen feeder. {@link AdvisorWorkflow} is the declaration side (one per
593
1293
  * `defineWorkflow` export in `lunora/workflows.ts`); {@link AdvisorWorkflowCall}
@@ -634,6 +1334,23 @@ interface AdvisorWorkflowCall {
634
1334
  workflow: string;
635
1335
  }
636
1336
  /**
1337
+ * One committed `wrangler.jsonc` `vars` entry whose value is a plaintext secret —
1338
+ * the input the `plaintext_secret_in_wrangler_vars` lint consumes. The full value
1339
+ * is never carried; only a redacted {@link AdvisorWranglerVariable.preview}.
1340
+ * Produced by `@lunora/config` (which reads `wrangler.jsonc`) and threaded through
1341
+ * codegen; runtime callers don't supply it, so the lint finds nothing there.
1342
+ */
1343
+ interface AdvisorWranglerVariable {
1344
+ /** The `wrangler.jsonc` file the var was read from, relative to the project root. */
1345
+ file: string;
1346
+ /** The offending `vars` key (e.g. `STRIPE_SECRET_KEY`). */
1347
+ key: string;
1348
+ /** Heuristic that matched, e.g. `stripe_live_key` / `private_key` / `secret_named_var`. */
1349
+ kind: string;
1350
+ /** Redacted preview (first few chars + length) — never the full secret. */
1351
+ preview: string;
1352
+ }
1353
+ /**
637
1354
  * Severity of a finding, mirroring splinter's `level`. `ERROR` is a definite
638
1355
  * problem, `WARN` a likely one, `INFO` an advisory nudge.
639
1356
  */
@@ -704,6 +1421,33 @@ interface LintContext {
704
1421
  */
705
1422
  adminRoutes?: ReadonlyArray<AdvisorAdminRoute>;
706
1423
  /**
1424
+ * `ctx.ai.run(model, …)` calls whose model-id argument is derived from the
1425
+ * handler's `args` with no server-side scoping — the `ai_raw_run_escape_hatch`
1426
+ * input. `ctx.ai.run` is the raw Workers AI passthrough, so an arg-derived model
1427
+ * id lets any caller select an arbitrary model, bypassing the typed
1428
+ * `ctx.ai.model(...)` + AI-SDK layer's cap/schema (an arg-derived `inputs`
1429
+ * argument is normal usage and is not recorded). Supplied by the codegen feeder;
1430
+ * absent for runtime callers, where the lint finds nothing.
1431
+ */
1432
+ aiRawRuns?: ReadonlyArray<AdvisorAiRawRun>;
1433
+ /**
1434
+ * `generateText` / `streamText` calls whose model-callable `tools` reach a
1435
+ * privileged side effect (DB write / function dispatch / outbound
1436
+ * fetch/mail/queue) — the `ai_tool_side_effect_prompt_injection` input. Each
1437
+ * row's `userInputDerived` says whether the model input flows from `args`; the
1438
+ * lint fires only when it does. Supplied by the codegen feeder; absent for
1439
+ * runtime callers, where the lint finds nothing.
1440
+ */
1441
+ aiToolSideEffects?: ReadonlyArray<AdvisorAiToolSideEffect>;
1442
+ /**
1443
+ * `ctx.fetch(url, …)` calls inside actions whose URL argument is derived from
1444
+ * the handler's `args` — the `action_fetch_ssrf` input. `ctx.fetch` has no
1445
+ * host allowlist, so a URL built from request input is a server-side request
1446
+ * forgery vector. Supplied by the codegen feeder; absent for runtime callers,
1447
+ * where the lint finds nothing.
1448
+ */
1449
+ argumentDerivedFetches?: ReadonlyArray<AdvisorArgumentDerivedFetch>;
1450
+ /**
707
1451
  * Per-public-procedure argument validators that weaken input safety — the
708
1452
  * `public_arg_uses_any` (`v.any()` args) and `unbounded_string_arg` (length-less
709
1453
  * `v.string()` args) input. Supplied by the codegen feeder for public procedures
@@ -717,12 +1461,98 @@ interface LintContext {
717
1461
  */
718
1462
  authApiCalls?: ReadonlyArray<AdvisorAuthApiCall>;
719
1463
  /**
1464
+ * Per-`createAuth({...})`-call configuration snapshots — the shared input for
1465
+ * the five `auth_*` security lints (`auth_trusted_origins_wildcard`,
1466
+ * `auth_csrf_check_disabled`, `auth_secure_cookies_disabled`,
1467
+ * `auth_email_verification_disabled`, `auth_session_freshage_zero`). Each
1468
+ * carries whether the call's config object literal was statically analyzable
1469
+ * and, when it was, the handful of nested facts the lints check (a
1470
+ * `trustedOrigins` wildcard, `advanced.disableCSRFCheck`/`useSecureCookies`,
1471
+ * `emailAndPassword.enabled`/`requireEmailVerification`,
1472
+ * `session.freshAge === 0`). Supplied by the codegen feeder; absent for
1473
+ * runtime callers, where the auth-config lints find nothing.
1474
+ */
1475
+ authConfigs?: ReadonlyArray<AdvisorAuthConfig>;
1476
+ /**
1477
+ * `ctx.browser.&lt;method>(url, …)` calls whose navigation URL is derived from the
1478
+ * handler's `args` with no server-side scoping — the
1479
+ * `browser_user_url_without_allowlist` input. `@lunora/browser` blocks
1480
+ * private/internal targets by default, but a request-supplied public URL can
1481
+ * still be an open-proxy / SSRF vector; the lint suppresses findings when a
1482
+ * `createBrowser` config-call is hardened with `allowedHosts` or `resolveDns`.
1483
+ * Supplied by the codegen feeder; absent for runtime callers, where the lint
1484
+ * finds nothing.
1485
+ */
1486
+ browserUrlAccesses?: ReadonlyArray<AdvisorBrowserUrlAccess>;
1487
+ /**
1488
+ * Factory/constructor calls in `lunora/` whose config object literal a
1489
+ * security lint inspects for a present-or-absent key — the shared input for
1490
+ * the config-call security lints (payment authorize, inbound-mail verify,
1491
+ * rate-limit store, browser private-targets). Supplied by the codegen feeder;
1492
+ * absent for runtime callers, where the config-call lints find nothing.
1493
+ */
1494
+ configCalls?: ReadonlyArray<AdvisorConfigCall>;
1495
+ /**
1496
+ * `ctx.containers.&lt;name>.get(key, …)` calls whose instance key is derived from
1497
+ * the handler's `args` with no server-side scoping — the
1498
+ * `container_instance_key_from_user_input` input. Each container definition's
1499
+ * `.get(name)` accessor routes to one instance per key, so an arg-derived key lets
1500
+ * any caller reach another tenant's container (cross-tenant IDOR). A key scoped by
1501
+ * a server-trusted `ctx.*` value, or a fixed literal, is not recorded. Supplied by
1502
+ * the codegen feeder; absent for runtime callers, where the lint finds nothing.
1503
+ */
1504
+ containerKeyAccesses?: ReadonlyArray<AdvisorContainerKeyAccess>;
1505
+ /**
1506
+ * Runtime container-override calls — a `.start({ enableInternet: true, … })`
1507
+ * launch override, or a `.egress.&lt;method>(...)` runtime firewall mutation — the
1508
+ * `container_start_enable_internet_override` and `container_runtime_egress_relaxation`
1509
+ * lint input. Supplied by the codegen feeder; absent for runtime callers, where
1510
+ * those lints find nothing.
1511
+ */
1512
+ containerOverrides?: ReadonlyArray<AdvisorContainerOverride>;
1513
+ /**
720
1514
  * Containers declared in `lunora/containers.ts` — the `container_*` lint
721
1515
  * input. Supplied by the codegen feeder; absent for runtime callers, where
722
1516
  * the container lints find nothing.
723
1517
  */
724
1518
  containers?: ReadonlyArray<AdvisorContainer>;
725
1519
  /**
1520
+ * `rateLimit`/`dbRateLimit` (`@lunora/ratelimit`) and `verifyTurnstileMiddleware`
1521
+ * (`@lunora/auth`) middleware calls, each with whether its options literal set
1522
+ * `failOpen: true` and the rate-limit `name` — the
1523
+ * `ratelimit_middleware_fail_open` input. These guards fail closed by default; a
1524
+ * `failOpen: true` admits every request during a limiter/siteverify outage, so
1525
+ * the lint fires when a fail-open guard protects an auth/payment-sensitive
1526
+ * procedure. Supplied by the codegen feeder; absent for runtime callers, where
1527
+ * the lint finds nothing.
1528
+ */
1529
+ failOpenGuards?: ReadonlyArray<AdvisorFailOpenGuard>;
1530
+ /**
1531
+ * `ctx.flags.boolean(key, default)` reads with a statically-known string key and
1532
+ * boolean-literal default — the `flag_gates_security_with_unsafe_default` input.
1533
+ * OpenFeature returns the default when the provider errors, so a fail-open
1534
+ * default on a security-shaped key (an `enforce`/`rls`/`gate`/`lockdown`
1535
+ * protection defaulting `false`, or an `allow`/`permit`/`bypass` permission
1536
+ * defaulting `true`) silently opens access during an outage. Supplied by the
1537
+ * codegen feeder; absent for runtime callers, where the lint finds nothing.
1538
+ */
1539
+ flagSecurityDefaults?: ReadonlyArray<AdvisorFlagSecurityDefault>;
1540
+ /**
1541
+ * `httpAction`/`httpRoute` handlers that perform a side effect
1542
+ * (`ctx.runMutation` / `ctx.runAction` / a `ctx.db` write) from the HTTP edge,
1543
+ * with whether each reads `ctx.auth` — the `http_action_missing_auth_guard`
1544
+ * input. Supplied by the codegen feeder; absent for runtime callers, where the
1545
+ * lint finds nothing.
1546
+ */
1547
+ httpActionGuards?: ReadonlyArray<AdvisorHttpActionGuard>;
1548
+ /**
1549
+ * Response-header writes, inside `httpAction` handlers, whose value is derived
1550
+ * from raw request input (`request.headers`/URL/query/body) with no CR/LF
1551
+ * sanitizer — the `http_action_response_header_injection` input. Supplied by the
1552
+ * codegen feeder; absent for runtime callers, where the lint finds nothing.
1553
+ */
1554
+ httpHeaderWrites?: ReadonlyArray<AdvisorHttpHeaderWrite>;
1555
+ /**
726
1556
  * Hyperdrive `ctx.sql` accesses discovered lexically inside `query`/`mutation`
727
1557
  * handler bodies — the `hyperdrive_outside_action` input. Supplied by the
728
1558
  * codegen feeder, which omits `action` handlers (where `ctx.sql` is the typed,
@@ -730,6 +1560,30 @@ interface LintContext {
730
1560
  */
731
1561
  hyperdriveCalls?: ReadonlyArray<AdvisorHyperdriveCall>;
732
1562
  /**
1563
+ * `&lt;receiver>.identity.&lt;key>` claim reads (RLS/mask policy `auth`, or
1564
+ * `ctx.auth`/`context.auth`) — the `identity_undeclared_claim_trusted` input.
1565
+ * `defineIdentity` validates only declared claims and forwards undeclared ones
1566
+ * verbatim, so each row's `declared` flag says whether `key` is in the contract
1567
+ * (or the always-present `userId`); the lint fires on the undeclared reads.
1568
+ * Supplied by the codegen feeder — and only when a resolvable `defineIdentity`
1569
+ * contract exists; absent for runtime callers, where the lint finds nothing.
1570
+ */
1571
+ identityClaimReads?: ReadonlyArray<AdvisorIdentityClaimRead>;
1572
+ /**
1573
+ * `buildImageDeliveryUrl({ key, … })` calls (`@lunora/bindings/images`) whose
1574
+ * `key` — the CDN transform's source image, an absolute URL or an
1575
+ * origin-relative key — is derived from the handler's `args` with no
1576
+ * server-side scoping — the `images_url_source_from_user_input` input.
1577
+ * `ctx.images.transform`/`info` take image bytes, never a URL, so they are
1578
+ * not sinks; only the `key` of `buildImageDeliveryUrl` accepts a URL-or-key
1579
+ * source and is inspected. An arg-derived key lets any caller point the
1580
+ * CDN's `/cdn-cgi/image/` transform at an attacker-chosen origin (SSRF /
1581
+ * open proxy). A fixed literal, or a key scoped by a server-trusted `ctx.*`
1582
+ * value, is not recorded. Supplied by the codegen feeder; absent for
1583
+ * runtime callers, where the lint finds nothing.
1584
+ */
1585
+ imageDeliveryUrlAccesses?: ReadonlyArray<AdvisorImageDeliveryUrlAccess>;
1586
+ /**
733
1587
  * Per-declared-index hit counts observed at runtime (the dead-index half of
734
1588
  * the `index_utilization` lint input). Supplied by the studio backend, which
735
1589
  * sums the per-`(table, index)` reads each shard records in the durable
@@ -745,6 +1599,26 @@ interface LintContext {
745
1599
  */
746
1600
  inserts?: ReadonlyArray<AdvisorInsertWrite>;
747
1601
  /**
1602
+ * `ctx.kv.&lt;method>(key, …)` calls whose namespace key is derived from the
1603
+ * handler's `args` with no server-side scoping — the `kv_unscoped_user_key_idor`
1604
+ * input. Workers KV is one flat namespace, so a key taken straight from request
1605
+ * input lets any caller read/overwrite/delete another user's entry (IDOR). Only
1606
+ * arg-derived, unscoped keys are recorded (a fixed literal or a
1607
+ * `${ctx.auth.userId}:…` prefix is not). Supplied by the codegen feeder; absent
1608
+ * for runtime callers, where the lint finds nothing.
1609
+ */
1610
+ kvKeyAccesses?: ReadonlyArray<AdvisorKvKeyAccess>;
1611
+ /**
1612
+ * `ctx.mail`/`ctx.email` `send`/`queue` calls whose `to`/`cc`/`bcc` recipient is
1613
+ * derived from the handler's `args` with no server-side scoping — the
1614
+ * `mail_recipient_from_request_input` input. A recipient taken straight from
1615
+ * request input turns the deployment into an open relay / spam amplifier (any
1616
+ * caller can direct mail to an arbitrary address). A recipient scoped by a
1617
+ * server-trusted `ctx.*` value, or a fixed literal, is not recorded. Supplied by
1618
+ * the codegen feeder; absent for runtime callers, where the lint finds nothing.
1619
+ */
1620
+ mailRecipientAccesses?: ReadonlyArray<AdvisorMailRecipientAccess>;
1621
+ /**
748
1622
  * Per-procedure column-masking usage discovered in function bodies (the
749
1623
  * `mask_uncovered_pii_column` input). Carries whether each procedure's builder
750
1624
  * chain includes `.use(mask(...))`, which `(table, column)` pairs its mask
@@ -754,6 +1628,15 @@ interface LintContext {
754
1628
  */
755
1629
  maskProcedures?: ReadonlyArray<AdvisorMaskProcedure>;
756
1630
  /**
1631
+ * Masked columns whose `mask(policies)` strategy is a statically-known
1632
+ * literal (the `mask_weak_hash_strategy_on_pii` input). One row per masked
1633
+ * column, with the `"hash"` / `"redact"` strategy literal attached; a
1634
+ * `MaskFn` (custom, non-literal) strategy is never recorded. Supplied by
1635
+ * the codegen feeder; absent for runtime callers, where the lint finds
1636
+ * nothing.
1637
+ */
1638
+ maskStrategies?: ReadonlyArray<AdvisorMaskStrategy>;
1639
+ /**
757
1640
  * Whole-row `ctx.db.replace(id, document)` writes lifted from custom
758
1641
  * mutators' authoritative `server` impls (the `mutator_full_row_replace`
759
1642
  * input). Each `replace` overwrites the entire row, clobbering a concurrent
@@ -771,6 +1654,48 @@ interface LintContext {
771
1654
  */
772
1655
  nondeterministicCalls?: ReadonlyArray<AdvisorNondeterministicCall>;
773
1656
  /**
1657
+ * `query`/`mutation` handlers that gate a `ctx.db.get`/`patch`/`delete` on a
1658
+ * null-checked `ctx.db.normalizeId(table, id)` result — the
1659
+ * `normalize_id_used_as_authorization` input. `normalizeId` validates an id's
1660
+ * structural shape only (it never reads the database), so gating access on a
1661
+ * non-null result is an IDOR. The lint keeps only public procedures with no
1662
+ * `.use(rls(...))` and no ownership/identity mention, then joins `table` against
1663
+ * the schema's RLS mode before flagging. Supplied by the codegen feeder; absent
1664
+ * for runtime callers, where the lint finds nothing.
1665
+ */
1666
+ normalizeIdAuthorizations?: ReadonlyArray<AdvisorNormalizeIdAuthorization>;
1667
+ /**
1668
+ * `ctx.db` writes (`insert` / `replace` / `patch` / `insertManyUnsafe`) that set
1669
+ * an ownership / identity column (`userId`, `ownerId`, `tenantId`, …) from the
1670
+ * handler's `args` instead of the server-trusted identity — the
1671
+ * `owner_field_from_args_not_auth` input. The ownership column decides who a row
1672
+ * belongs to, so an arg-derived value lets any caller write rows owned by another
1673
+ * user or tenant (act-as-any-user / cross-tenant IDOR). A column stamped from
1674
+ * `ctx.*`, or a fixed literal, is not recorded. Supplied by the codegen feeder;
1675
+ * absent for runtime callers, where the lint finds nothing.
1676
+ */
1677
+ ownerFieldWrites?: ReadonlyArray<AdvisorOwnerFieldWrite>;
1678
+ /**
1679
+ * Payment webhook-adapter constructions (`createStripeAdapter` /
1680
+ * `createPolarAdapter`) — the payment-webhook wide-tolerance lint's input. Each row's
1681
+ * `toleranceSeconds` is the statically-known `webhookToleranceSeconds` replay
1682
+ * window (default 300s); the lint fires only above a conservative ceiling, where
1683
+ * the endpoint would accept stale, replayable signed payloads. Supplied by the
1684
+ * codegen feeder; absent for runtime callers, where the lint finds nothing.
1685
+ */
1686
+ paymentWebhooks?: ReadonlyArray<AdvisorPaymentWebhook>;
1687
+ /**
1688
+ * Payload-derived privileged dispatches — the `privileged_dispatch_unvalidated_payload`
1689
+ * input. Each is a `ctx.run`/`context.run` back into a Lunora function from inside a
1690
+ * `defineQueue` push handler or a `defineWorkflow` handler, whose args reference the
1691
+ * handler's untrusted payload (`context.params` for a workflow, a `for (… of
1692
+ * batch.messages)` body for a queue). Both handler kinds run under the system identity
1693
+ * (RLS disabled), so the lint joins the resolved target against `rlsProcedures` and
1694
+ * fires only when the target enforces a row policy. Supplied by the codegen feeder;
1695
+ * absent for runtime callers, where the lint finds nothing.
1696
+ */
1697
+ privilegedDispatches?: ReadonlyArray<AdvisorPrivilegedDispatch>;
1698
+ /**
774
1699
  * Per-procedure protective-middleware snapshots — the
775
1700
  * `public_mutation_without_ratelimit` and `user_creating_mutation_without_captcha`
776
1701
  * input. Records which `.use(...)` guards (`rateLimit`, captcha, `rls`, `mask`,
@@ -793,6 +1718,36 @@ interface LintContext {
793
1718
  */
794
1719
  r2sqlCalls?: ReadonlyArray<AdvisorR2sqlCall>;
795
1720
  /**
1721
+ * `rateLimit`/`dbRateLimit` middleware calls (`@lunora/ratelimit`) whose
1722
+ * `key` selector is derived from the handler's `args` with no server-side
1723
+ * scoping — the `ratelimit_key_spoofable_or_global` input. A key an
1724
+ * attacker controls lets them rotate it per request and bypass the limit
1725
+ * entirely, defeating its purpose. A selector scoped by `ctx` (e.g.
1726
+ * `ctx.auth.userId`, `ctx.ip`), or one with no `args` reference at all (a
1727
+ * fixed/global bucket), is not recorded. Supplied by the codegen feeder;
1728
+ * absent for runtime callers, where the lint finds nothing.
1729
+ */
1730
+ ratelimitKeySelectors?: ReadonlyArray<AdvisorRatelimitKeySelector>;
1731
+ /**
1732
+ * `query` handlers that `return` the raw rows of a table (a `ctx.db` row read
1733
+ * or `ctx.db.query(...)` fluent chain, returned directly or through one local
1734
+ * `const` hop, with no hand-built projection) — the
1735
+ * `output_projection_missing_on_public_read` input. The lint keeps only public
1736
+ * queries with no `.output(...)`/mask on the chain, then joins `table` against
1737
+ * the schema's PII-named columns before nudging. Supplied by the codegen
1738
+ * feeder; absent for runtime callers, where the lint finds nothing.
1739
+ */
1740
+ rawRowReturns?: ReadonlyArray<AdvisorRawRowReturn>;
1741
+ /**
1742
+ * `ctx.db.&lt;table>.findMany({ with: { &lt;rel> } })` relation-hydrating list reads
1743
+ * — the `masked_relation_leak_via_with` input. Column masking is applied to a
1744
+ * read's top-level rows but does not descend into `with`-hydrated relations,
1745
+ * so a masked table surfaced only through a `with` on an unprotected public
1746
+ * read is returned in the clear. Supplied by the codegen feeder; absent for
1747
+ * runtime callers, where the lint finds nothing.
1748
+ */
1749
+ relationLoads?: ReadonlyArray<AdvisorRelationLoad>;
1750
+ /**
796
1751
  * Per-procedure RLS usage discovered in function bodies (the
797
1752
  * `rls_uncovered_table` input). Carries whether each procedure's builder chain
798
1753
  * includes `.use(rls(...))`, which tables the procedure reads/writes, and which
@@ -825,6 +1780,15 @@ interface LintContext {
825
1780
  */
826
1781
  shardTraffic?: ReadonlyArray<AdvisorShardTraffic>;
827
1782
  /**
1783
+ * `ctx.db.&lt;table>.findMany({ includeDeleted })` list reads whose
1784
+ * `includeDeleted` is a hardcoded `true` or derived from the handler's
1785
+ * `args` — the `soft_delete_include_deleted_from_args` input. On a public
1786
+ * read of a `.softDelete()` table this resurfaces soft-deleted rows to any
1787
+ * caller (arg-derived) or every caller (hardcoded). Supplied by the codegen
1788
+ * feeder; absent for runtime callers, where the lint finds nothing.
1789
+ */
1790
+ softDeleteReads?: ReadonlyArray<AdvisorSoftDeleteRead>;
1791
+ /**
828
1792
  * `ctx.sql` tagged-template interpolations that splice an unparameterized
829
1793
  * string-building expression into the query — the `sql_injection_risk` input.
830
1794
  * Supplied by the codegen feeder; absent for runtime callers, where the lint
@@ -832,6 +1796,29 @@ interface LintContext {
832
1796
  */
833
1797
  sqlInterpolations?: ReadonlyArray<AdvisorSqlInterpolation>;
834
1798
  /**
1799
+ * `ctx.storage.&lt;bucket>.&lt;method>(key, …)` calls whose R2 object key is derived
1800
+ * from the handler's `args` with no server-side scoping — the
1801
+ * `storage_key_from_user_args` input. The bucket read/write/URL/delete methods
1802
+ * key by their first argument, so an arg-derived key is object-level IDOR
1803
+ * (read/overwrite/delete anyone's object). A key referencing a server-trusted
1804
+ * `ctx.*` value (e.g. `${ctx.auth.userId}/…`) is treated as scoped and not
1805
+ * recorded. Supplied by the codegen feeder; absent for runtime callers, where
1806
+ * the lint finds nothing.
1807
+ */
1808
+ storageKeyAccesses?: ReadonlyArray<AdvisorStorageKeyAccess>;
1809
+ /**
1810
+ * Tracked `ctx.storage.&lt;bucket>.&lt;method>(...)` upload/signing calls — the
1811
+ * shared input for the storage config-hygiene lints
1812
+ * (`storage_upload_without_content_type_allowlist`, `storage_upload_without_max_size`,
1813
+ * `storage_generate_upload_url_no_content_type_pin`,
1814
+ * `storage_presigned_url_for_private_content`). Each row carries the method
1815
+ * invoked, which options-object keys were present, and (for the two URL
1816
+ * signers) a statically-known `expiresInSeconds` literal. Supplied by the
1817
+ * codegen feeder; absent for runtime callers, where these lints find
1818
+ * nothing.
1819
+ */
1820
+ storageUploads?: ReadonlyArray<AdvisorStorageUpload>;
1821
+ /**
835
1822
  * Bounded row samples per table — the `constraint_validator` lint input.
836
1823
  * Supplied by the studio backend, which reads up to the configured row cap
837
1824
  * from each table via `readTablePage` and assembles the existing-id set for
@@ -854,6 +1841,16 @@ interface LintContext {
854
1841
  */
855
1842
  tableScans?: ReadonlyArray<AdvisorTableScan>;
856
1843
  /**
1844
+ * `ctx.vectors.&lt;method>(index, { namespace, … })` calls whose `namespace` is
1845
+ * derived from the handler's `args` with no server-side scoping — the
1846
+ * `vectors_namespace_from_user_input` input. A Vectorize namespace partitions one
1847
+ * index into isolated sub-collections, so an arg-derived namespace lets any caller
1848
+ * read or poison another tenant's vectors. A namespace scoped by a server-trusted
1849
+ * `ctx.*` value, or a fixed literal, is not recorded. Supplied by the codegen
1850
+ * feeder; absent for runtime callers, where the lint finds nothing.
1851
+ */
1852
+ vectorNamespaceAccesses?: ReadonlyArray<AdvisorVectorNamespaceAccess>;
1853
+ /**
857
1854
  * `ctx.workflows.get("name")` call sites discovered in function bodies — the
858
1855
  * use-side input the `workflow_unused` and `workflow_unknown_target` lints
859
1856
  * cross-reference against {@link LintContext.workflows}. Supplied by the
@@ -868,6 +1865,13 @@ interface LintContext {
868
1865
  * nothing.
869
1866
  */
870
1867
  workflows?: ReadonlyArray<AdvisorWorkflow>;
1868
+ /**
1869
+ * Committed `wrangler.jsonc` `vars` entries holding plaintext secrets — the
1870
+ * input for the `plaintext_secret_in_wrangler_vars` lint. Supplied by
1871
+ * `@lunora/config` (which reads `wrangler.jsonc`) via the codegen pass-through;
1872
+ * absent for runtime callers, where the lint finds nothing.
1873
+ */
1874
+ wranglerVariables?: ReadonlyArray<AdvisorWranglerVariable>;
871
1875
  }
872
1876
  /**
873
1877
  * A single advisory rule. `run` is pure over its {@link LintContext} so lints are
@@ -1036,6 +2040,23 @@ declare const hotShard: Lint;
1036
2040
  */
1037
2041
  declare const indexUtilization: Lint;
1038
2042
  /**
2043
+ * Flags an action's `ctx.fetch(url, …)` whose URL is derived from the handler's
2044
+ * `args` — a server-side request forgery (SSRF) vector.
2045
+ *
2046
+ * `ctx.fetch` is the action-only outbound-request escape hatch, and it applies no
2047
+ * host allowlist: whatever URL it is handed, it fetches. When that URL comes from
2048
+ * request input (`ctx.fetch(args.url)`, a template embedding `args.*`, or a URL
2049
+ * built one hop earlier from `args`), a caller can point the worker at the cloud
2050
+ * metadata endpoint (`169.254.169.254`) or an internal service and read the
2051
+ * response — classic SSRF. The fix is to validate the URL against an allowlist of
2052
+ * expected hosts before fetching, and to reject private / link-local targets.
2053
+ *
2054
+ * Runs only when the codegen feeder supplies fetch-taint evidence
2055
+ * (`context.argumentDerivedFetches`); a runtime caller flags nothing. One finding per
2056
+ * arg-derived `ctx.fetch` call.
2057
+ */
2058
+ declare const actionFetchSsrf: Lint;
2059
+ /**
1039
2060
  * Flags an `httpRoute` on an admin/privileged-looking path whose handler shows no
1040
2061
  * auth/admin guard.
1041
2062
  *
@@ -1052,6 +2073,91 @@ declare const indexUtilization: Lint;
1052
2073
  */
1053
2074
  declare const adminRouteWithoutGuard: Lint;
1054
2075
  /**
2076
+ * Flags a `ctx.ai.run(model, …)` call whose model-id argument is derived from
2077
+ * the handler's `args` with no server-side scoping — arbitrary model
2078
+ * selection that bypasses the typed AI-SDK layer.
2079
+ *
2080
+ * `ctx.ai.run` is the raw Workers AI binding passthrough (void-style
2081
+ * `ai.run`), bypassing `ctx.ai.model(...)` plus the AI SDK functions
2082
+ * (`generateText`, `streamText`, …) entirely — no output cap, no schema. When
2083
+ * the model id comes straight from request input (`ctx.ai.run(args.model,
2084
+ * …)`, or one built one hop earlier from `args`), any caller can pick which
2085
+ * model runs, sidestepping whatever the typed path would have enforced. Only
2086
+ * the model argument (`arguments[0]`) is inspected; an arg-derived `inputs`
2087
+ * (`arguments[1]`) is normal, expected usage and is never flagged. A model
2088
+ * scoped by a server-trusted `ctx.*` value is treated as scoped and not
2089
+ * flagged.
2090
+ *
2091
+ * Runs only when the codegen feeder supplies raw-run evidence
2092
+ * (`context.aiRawRuns`); a runtime caller flags nothing. One finding per
2093
+ * arg-derived, unscoped `ctx.ai.run` call.
2094
+ */
2095
+ declare const aiRawRunEscapeHatch: Lint;
2096
+ /**
2097
+ * Flags a `generateText` / `streamText` call whose model input is user-derived
2098
+ * **and** whose model-callable `tools` reach a privileged side effect.
2099
+ *
2100
+ * The AI SDK lets the model call a `tool({ execute })` to take an action. When
2101
+ * that tool's `execute` performs a real side effect — a DB write, a function
2102
+ * dispatch (`ctx.run`), or an outbound send (fetch / mail / queue) — and the
2103
+ * model's prompt / messages carry user-supplied text, an injected instruction in
2104
+ * that text can steer the model into firing the side effect. The model becomes a
2105
+ * confused deputy: attacker-authored words drive privileged actions. This is the
2106
+ * canonical LLM prompt-injection-to-tool-call hazard.
2107
+ *
2108
+ * Runs only when the codegen feeder supplies generation evidence
2109
+ * (`context.aiToolSideEffects`); a runtime caller flags nothing. Fires only when
2110
+ * the model input is derived from the handler's `args` — a fully server-authored
2111
+ * prompt driving a side-effecting tool is not flagged. Deliberately narrow (an
2112
+ * inherently heuristic rule): one finding per matching call.
2113
+ */
2114
+ declare const aiToolSideEffectPromptInjection: Lint;
2115
+ /**
2116
+ * Flags a public procedure that runs an AI text/object generation
2117
+ * (`generateText` / `streamText` / `generateObject` / `streamObject`) with no
2118
+ * `maxOutputTokens` bound in its config.
2119
+ *
2120
+ * Each generation call bills against the account's Workers AI / provider budget
2121
+ * in proportion to the tokens produced. Left unbounded and reachable from a
2122
+ * `.public()` procedure, an anonymous caller can request arbitrarily long
2123
+ * completions in a loop — a denial-of-wallet vector — and can also tie up worker
2124
+ * CPU/time on long streams. The fix is to cap output with `maxOutputTokens` (and
2125
+ * ideally rate-limit the entry point).
2126
+ *
2127
+ * Only a call whose config is a visible object literal is judged; a hoisted or
2128
+ * spread config is statically opaque and left un-flagged (fail-open) to avoid a
2129
+ * false positive. Runs only when the codegen feeder supplies procedure-protection
2130
+ * evidence (`context.procedureProtections`); a runtime caller flags nothing.
2131
+ */
2132
+ declare const aiUnboundedGenerationPublic: Lint;
2133
+ /**
2134
+ * Flags an app that opts into `allowUnauthenticatedShardAccess: true` while its
2135
+ * schema has an RLS gap (no `.rls("required")`, or a `.public()` table).
2136
+ *
2137
+ * `allowUnauthenticatedShardAccess` (a `WorkerOptions` field consumed by
2138
+ * `createWorker(...)`) turns off the fail-closed default that denies a shard
2139
+ * lookup for a request with no verified identity. That is a deliberate, opt-in
2140
+ * posture switch — appropriate for a public/anonymous-first shard resolver — but
2141
+ * combined with a schema that never enforces `.rls("required")` (or that leaves
2142
+ * a table `.public()`, i.e. exempt from it), an unauthenticated caller can shard-hop
2143
+ * and read another tenant's rows with no row-security guard behind the door.
2144
+ *
2145
+ * **Evidence and coverage gap**: this reads `context.configCalls`, fed by the
2146
+ * codegen `discover-config-calls.ts` feeder's `.extend(fn)` callback-shape
2147
+ * support — it only sees the setting when a `lunora/`-local file calls the
2148
+ * generated `defineApp()...extend(() => ({ allowUnauthenticatedShardAccess:
2149
+ * true }))` escape hatch (the pattern the `nuxt` / `analog` templates use in
2150
+ * `lunora/server.ts`). An app that sets the same field via `@lunora/vite`'s
2151
+ * `LunoraPluginOptions` (`vite.config.ts`) or a hand-authored worker entry
2152
+ * outside `lunora/` (the `sveltekit` / `astro` / `react-router` /
2153
+ * `tanstack-start` template style) is invisible to this lint — a coverage gap,
2154
+ * not a false negative this lint claims to catch.
2155
+ *
2156
+ * Runs only when the codegen feeder supplies config-call evidence; a runtime
2157
+ * caller flags nothing. One finding per opted-in `.extend(...)` call site.
2158
+ */
2159
+ declare const allowUnauthenticatedShardAccessEnabled: Lint;
2160
+ /**
1055
2161
  * Flags a `ctx.authApi.&lt;method>(...)` call whose argument object omits `headers`.
1056
2162
  *
1057
2163
  * `@lunora/auth`'s `withAuthPlugins` middleware attaches the full privileged
@@ -1069,6 +2175,135 @@ declare const adminRouteWithoutGuard: Lint;
1069
2175
  */
1070
2176
  declare const authApiCallWithoutHeaders: Lint;
1071
2177
  /**
2178
+ * Flags a `createAuth({...})` call whose `advanced.disableCSRFCheck` is
2179
+ * explicitly `true`.
2180
+ *
2181
+ * better-auth's CSRF check validates the request's origin against
2182
+ * `trustedOrigins` before applying a state-changing auth mutation (sign-in,
2183
+ * sign-up, session revocation, …). `disableCSRFCheck: true` turns that check
2184
+ * off outright, so a cross-site request riding the browser's ambient auth
2185
+ * cookie is processed the same as a same-origin one — the standard CSRF
2186
+ * exposure.
2187
+ *
2188
+ * Runs only when the codegen feeder supplies auth-config evidence
2189
+ * (`context.authConfigs`), and only for an analyzable config (a static,
2190
+ * spread-free object literal); an opaque config could set the key elsewhere
2191
+ * and is skipped rather than guessed at. One finding per matching `createAuth`
2192
+ * call.
2193
+ */
2194
+ declare const authCsrfCheckDisabled: Lint;
2195
+ /**
2196
+ * Flags a `createAuth({...})` call with `emailAndPassword.enabled: true` and no
2197
+ * `emailAndPassword.requireEmailVerification: true`.
2198
+ *
2199
+ * better-auth defaults `requireEmailVerification` off, so an email/password
2200
+ * account is usable — signed in, able to act — the moment it's created, before
2201
+ * the caller has proven ownership of the email address. That lets an attacker
2202
+ * sign up with a victim's email (or an address they don't control) and operate
2203
+ * the account immediately, and it weakens any downstream flow (password reset,
2204
+ * account recovery) that assumes a verified address.
2205
+ *
2206
+ * Runs only when the codegen feeder supplies auth-config evidence
2207
+ * (`context.authConfigs`), and only for an analyzable config (a static,
2208
+ * spread-free object literal); an opaque config could set the key elsewhere
2209
+ * and is skipped rather than guessed at. One finding per matching `createAuth`
2210
+ * call.
2211
+ */
2212
+ declare const authEmailVerificationDisabled: Lint;
2213
+ /**
2214
+ * Flags a `createAuth({...})` call whose `advanced.useSecureCookies` is
2215
+ * explicitly `false`.
2216
+ *
2217
+ * `@lunora/auth` defaults `useSecureCookies` ON unless the deployment's
2218
+ * `baseURL` is provably plain `http://` (a local dev origin) — see
2219
+ * `hardenAuthOptions` in `packages/auth/src/create-auth.ts`. An explicit
2220
+ * `useSecureCookies: false` overrides that secure-by-default posture, so the
2221
+ * session cookie ships without the `Secure` attribute even on an HTTPS
2222
+ * deployment — it is then sent over any plaintext connection an attacker can
2223
+ * coerce (mixed-content requests, a downgraded subdomain), exposing the
2224
+ * session.
2225
+ *
2226
+ * Runs only when the codegen feeder supplies auth-config evidence
2227
+ * (`context.authConfigs`), and only for an analyzable config (a static,
2228
+ * spread-free object literal); an opaque config could set the key elsewhere
2229
+ * and is skipped rather than guessed at. One finding per matching `createAuth`
2230
+ * call.
2231
+ */
2232
+ declare const authSecureCookiesDisabled: Lint;
2233
+ /**
2234
+ * Flags a `createAuth({...})` call whose `session.freshAge` is explicitly the
2235
+ * literal `0`.
2236
+ *
2237
+ * `freshAge` is the window better-auth treats a session as "recently
2238
+ * re-authenticated" for sensitive operations (changing the password, adding a
2239
+ * passkey, revoking other sessions, …) that gate on a fresh session rather than
2240
+ * merely a valid one. Setting it to `0` disables that recent-reauth check
2241
+ * entirely — every sensitive operation is treated as fresh regardless of how
2242
+ * old the session is, so a long-lived stolen session (or token) can perform
2243
+ * them without ever proving the caller still controls the credentials.
2244
+ *
2245
+ * Runs only when the codegen feeder supplies auth-config evidence
2246
+ * (`context.authConfigs`), and only for an analyzable config (a static,
2247
+ * spread-free object literal); an opaque config could set the key elsewhere
2248
+ * and is skipped rather than guessed at. One finding per matching `createAuth`
2249
+ * call.
2250
+ */
2251
+ declare const authSessionFreshageZero: Lint;
2252
+ /**
2253
+ * Flags a `createAuth({...})` call whose `trustedOrigins` array literal
2254
+ * contains a `"*"` entry.
2255
+ *
2256
+ * better-auth's `trustedOrigins` is the allowlist its CSRF/origin validation
2257
+ * checks every state-changing request against. A `"*"` entry disables that
2258
+ * check entirely — any origin is accepted, which is exactly the protection
2259
+ * Lunora leans on to keep cross-site requests from riding an authenticated
2260
+ * cookie.
2261
+ *
2262
+ * Runs only when the codegen feeder supplies auth-config evidence
2263
+ * (`context.authConfigs`), and only for an analyzable config (a static,
2264
+ * spread-free object literal); an opaque config could set `trustedOrigins`
2265
+ * elsewhere and is skipped rather than guessed at. One finding per matching
2266
+ * `createAuth` call.
2267
+ */
2268
+ declare const authTrustedOriginsWildcard: Lint;
2269
+ /**
2270
+ * Flags a `createBrowser({ allowPrivateTargets: true })`.
2271
+ *
2272
+ * `@lunora/browser` blocks navigation to private / internal / loopback addresses
2273
+ * by default — that guard is what stops a browser action from being turned into a
2274
+ * server-side request forgery (SSRF) tool that reaches cloud metadata endpoints
2275
+ * (`169.254.169.254`), internal services, or `localhost`. Setting
2276
+ * `allowPrivateTargets: true` disables it wholesale. Combined with a
2277
+ * request-supplied URL that is the classic SSRF-to-metadata exfiltration path.
2278
+ *
2279
+ * Runs only when the codegen feeder supplies config-call evidence
2280
+ * (`context.configCalls`); a runtime caller flags nothing. One finding per
2281
+ * opted-out browser.
2282
+ */
2283
+ declare const browserAllowPrivateTargets: Lint;
2284
+ /**
2285
+ * Flags a `ctx.browser.&lt;method>(url, …)` call whose navigation URL is derived
2286
+ * from the handler's `args` with no server-side scoping — and no hardened
2287
+ * `createBrowser` allowlist to contain it.
2288
+ *
2289
+ * `@lunora/browser` blocks navigation to private/internal/loopback addresses by
2290
+ * default, but that guard only stops SSRF to *internal* targets. A
2291
+ * request-supplied *public* URL still turns the headless browser into an
2292
+ * open-proxy / request-forgery tool: any caller can make the deployment fetch
2293
+ * an arbitrary third-party URL (SSRF to public cloud APIs that trust the egress
2294
+ * IP, data exfiltration through the fetched URL), and — without pinned DNS — a
2295
+ * public hostname can rebind to an internal address after the guard's check.
2296
+ * The containment is an `allowedHosts` allowlist on `createBrowser`, or a
2297
+ * pinned `resolveDns`. This lint therefore suppresses all findings when the
2298
+ * config-call evidence shows a `createBrowser` hardened with either key; only
2299
+ * an unhardened browser reaching an arg-derived URL is flagged.
2300
+ *
2301
+ * Runs only when the codegen feeder supplies browser URL-access evidence
2302
+ * (`context.browserUrlAccesses`); a runtime caller flags nothing. One finding
2303
+ * per arg-derived, unscoped `ctx.browser` navigation.
2304
+ */
2305
+ declare const browserUserUrlWithoutAllowlist: Lint;
2306
+ /**
1072
2307
  * Detect FK cycles in the declared relation graph via a DFS.
1073
2308
  *
1074
2309
  * A "circular FK" exists when a chain of `one` relations forms a loop — for
@@ -1096,6 +2331,26 @@ declare const authApiCallWithoutHeaders: Lint;
1096
2331
  */
1097
2332
  declare const circularFk: Lint;
1098
2333
  /**
2334
+ * Flags a `ctx.containers.&lt;exportName>.get(name, …)` call whose instance key
2335
+ * is derived from the handler's `args` with no server-side scoping — a
2336
+ * cross-tenant container IDOR.
2337
+ *
2338
+ * A container definition's `.get(name)` accessor routes to one Durable
2339
+ * Object-backed container instance per `name` — one container per entity
2340
+ * (user, room, job…). When the key comes straight from request input
2341
+ * (`ctx.containers.app.get(args.id)`, a template embedding `args.*`, or a key
2342
+ * built one hop earlier from `args`), any caller can hand in another tenant's
2343
+ * key and reach that tenant's container instance. The fix is to derive the
2344
+ * key from a server-trusted identity (`` `${ctx.auth.userId}` ``) or a record
2345
+ * the caller owns — a key that references `ctx` is treated as scoped and is
2346
+ * not flagged. `.any()`/`.pool()` are not sinks (they take no key).
2347
+ *
2348
+ * Runs only when the codegen feeder supplies container key-access evidence
2349
+ * (`context.containerKeyAccesses`); a runtime caller flags nothing. One
2350
+ * finding per arg-derived, unscoped `ctx.containers.*.get` call.
2351
+ */
2352
+ declare const containerInstanceKeyFromUserInput: Lint;
2353
+ /**
1099
2354
  * Flags a container declared on a large instance type. The big `standard-3` /
1100
2355
  * `standard-4` sizes (and large custom shapes) are billed on their provisioned
1101
2356
  * memory + disk for the whole time an instance runs, so an over-provisioned
@@ -1116,6 +2371,8 @@ declare const containerOversizedInstance: Lint;
1116
2371
  * alone.
1117
2372
  */
1118
2373
  declare const containerPublicInternet: Lint;
2374
+ declare const containerRuntimeEgressRelaxation: Lint;
2375
+ declare const containerStartEnableInternetOverride: Lint;
1119
2376
  /**
1120
2377
  * Lunora port of splinter's `0009_duplicate_index`.
1121
2378
  *
@@ -1188,6 +2445,25 @@ declare const externalSourceUnscoped: Lint;
1188
2445
  */
1189
2446
  declare const filterWithoutIndex: Lint;
1190
2447
  /**
2448
+ * Flags a `ctx.flags.boolean(key, default)` read on a security-shaped key whose
2449
+ * fail-open default selects the *permissive* branch.
2450
+ *
2451
+ * OpenFeature returns the caller-supplied default when the provider errors, so a
2452
+ * flag read is a security decision that fails to its default. When the key names
2453
+ * a protection (`enforce*`/`rls*`/`gate*`/`lockdown*`) and defaults `false`, or
2454
+ * names a permission/bypass (`allow*`/`permit*`/`bypass*`) and defaults `true`,
2455
+ * a flag-backend outage silently disables the protection or grants the
2456
+ * permission for every request.
2457
+ *
2458
+ * Runs only when the codegen feeder supplies flag-default evidence
2459
+ * (`context.flagSecurityDefaults`); a runtime caller flags nothing. Deliberately
2460
+ * narrow — matched on security-shaped key tokens with an unambiguous polarity
2461
+ * plus a boolean-literal default; keys whose polarity is indeterminate (a bare
2462
+ * `auth`/`admin`) or contradictory are skipped to keep the false-positive rate
2463
+ * low. One finding per read.
2464
+ */
2465
+ declare const flagGatesSecurityWithUnsafeDefault: Lint;
2466
+ /**
1191
2467
  * Flags a secret-shaped string literal checked into the lunora source.
1192
2468
  *
1193
2469
  * A live API key, access key, private key, or high-entropy token committed to the
@@ -1203,6 +2479,50 @@ declare const filterWithoutIndex: Lint;
1203
2479
  */
1204
2480
  declare const hardcodedSecret: Lint;
1205
2481
  /**
2482
+ * Flags an `httpAction`/`httpRoute` handler that performs a side effect
2483
+ * (`ctx.runMutation` / `ctx.runAction` / a `ctx.db` write) but never reads
2484
+ * `ctx.auth`.
2485
+ *
2486
+ * Unlike `query`/`mutation`/`action` procedures — which run under a resolved
2487
+ * identity and RLS — a raw HTTP handler is reached directly from the public
2488
+ * internet with no framework-supplied auth step. `HttpActionCtx` still exposes
2489
+ * `ctx.auth` (`getIdentity()` / `userId`), but nothing forces the handler to
2490
+ * consult it. A handler that mutates state or dispatches an action without ever
2491
+ * touching `ctx.auth` is an unauthenticated write endpoint: any anonymous caller
2492
+ * can drive the side effect, and the downstream `runMutation`/`runAction`/`db`
2493
+ * write runs with whatever ambient authority the handler carries — bypassing the
2494
+ * identity/RLS checks the rest of the app relies on. Distinct from
2495
+ * `admin_route_without_guard`, which covers Studio/admin-path routes.
2496
+ *
2497
+ * Runs only when the codegen feeder supplies HTTP-handler evidence
2498
+ * (`context.httpActionGuards`); a runtime caller flags nothing. The feeder only
2499
+ * records handlers that already perform a side effect and whose `ctx` binding was
2500
+ * statically resolvable (a named-function or wrapped handler is skipped,
2501
+ * fail-safe), so this lint just filters to those that never read `ctx.auth`. One
2502
+ * finding per handler.
2503
+ */
2504
+ declare const httpActionMissingAuthGuard: Lint;
2505
+ /**
2506
+ * Flags an `httpAction` handler that writes a response-header value derived from
2507
+ * raw request input (`request.headers`, `request.url`/query, `await
2508
+ * request.json()`) with no CR/LF sanitizer.
2509
+ *
2510
+ * A `Request`-derived string placed verbatim into a response header lets a caller
2511
+ * smuggle carriage-return/line-feed sequences (`\r\n`) into the response — injecting
2512
+ * additional headers (`Set-Cookie`, `Location`, CORS) or splitting the response body
2513
+ * (HTTP response splitting / header injection). Unlike `query`/`mutation` handlers,
2514
+ * a raw `httpAction` builds its own `Response`, so nothing forces the value through
2515
+ * the framework's `isSafeHeaderValue` CR/LF guard.
2516
+ *
2517
+ * Runs only when the codegen feeder supplies header-write evidence
2518
+ * (`context.httpHeaderWrites`); a runtime caller flags nothing. The feeder records
2519
+ * a site only when its value is request-tainted AND unguarded — a value routed
2520
+ * through `isSafeHeaderValue`, `encodeURIComponent`/`encodeURI`, a numeric coercion
2521
+ * (`Number`/`parseInt`/`parseFloat`), or `btoa` is treated as safe and never
2522
+ * recorded. One finding per unsafe header write.
2523
+ */
2524
+ declare const httpActionResponseHeaderInjection: Lint;
2525
+ /**
1206
2526
  * Flags a Hyperdrive `ctx.sql` access inside a `query(...)` or `mutation(...)`
1207
2527
  * handler body.
1208
2528
  *
@@ -1227,6 +2547,42 @@ declare const hardcodedSecret: Lint;
1227
2547
  */
1228
2548
  declare const hyperdriveOutsideAction: Lint;
1229
2549
  /**
2550
+ * Flags an authorization read of an identity claim that is **not** in the app's
2551
+ * declared `defineIdentity({ ... })` contract.
2552
+ *
2553
+ * `defineIdentity` is the trust boundary for `ctx.auth.identity`: the worker
2554
+ * validates a resolver's returned claims against the *declared* validators, but
2555
+ * — by design — forwards any **undeclared** claims through verbatim, unchecked.
2556
+ * So a policy predicate or authorize hook that reads `auth.identity.&lt;key>` for a
2557
+ * `&lt;key>` the contract never declares is trusting a value the runtime never
2558
+ * validated — a claim an attacker's token can carry with an arbitrary value.
2559
+ * Reading `userId` (always declared) or any declared claim is fine.
2560
+ *
2561
+ * Runs only when the codegen feeder supplies claim-read evidence
2562
+ * (`context.identityClaimReads`) — which it does only when a resolvable
2563
+ * `defineIdentity` contract exists — so an app with no typed identity contract,
2564
+ * or a runtime caller, flags nothing. One finding per undeclared read.
2565
+ */
2566
+ declare const identityUndeclaredClaimTrusted: Lint;
2567
+ /**
2568
+ * Flags a `buildImageDeliveryUrl({ key, … })` call (`@lunora/bindings/images`)
2569
+ * whose `key` is derived from the handler's `args` with no server-side scoping.
2570
+ *
2571
+ * `key` is the CDN transform's source image — an absolute URL, or an
2572
+ * origin-relative key under the account's own store — that `buildImageDeliveryUrl`
2573
+ * splices into the `/cdn-cgi/image/…` delivery URL. `ctx.images.transform`/`info`
2574
+ * take image *bytes*, never a URL, so they carry no equivalent risk and are not
2575
+ * flagged. An arg-derived `key` lets any caller point the CDN's on-the-fly
2576
+ * transform at an attacker-chosen origin (SSRF / open proxy against whatever
2577
+ * that origin trusts the CDN's egress IP for) or at an arbitrary key under the
2578
+ * account's own store.
2579
+ *
2580
+ * Runs only when the codegen feeder supplies image-delivery-URL evidence
2581
+ * (`context.imageDeliveryUrlAccesses`); a runtime caller flags nothing. One
2582
+ * finding per arg-derived, unscoped `key`.
2583
+ */
2584
+ declare const imagesUrlSourceFromUserInput: Lint;
2585
+ /**
1230
2586
  * A correctness lint with no splinter analogue — it exploits Lunora's static
1231
2587
  * edge: the schema is fully declared, so a typo'd index column is catchable at
1232
2588
  * codegen time rather than surfacing as a runtime error or a silently
@@ -1239,6 +2595,77 @@ declare const hyperdriveOutsideAction: Lint;
1239
2595
  */
1240
2596
  declare const indexReferencesUnknownField: Lint;
1241
2597
  /**
2598
+ * Flags a public procedure whose handler calls `ctx.db.insertManyUnsafe(...)`.
2599
+ *
2600
+ * `insertManyUnsafe` is the bulk-insert escape hatch: it writes rows straight to
2601
+ * storage, bypassing the per-row argument validators AND the schema's insert
2602
+ * triggers (which is where server-trusted columns, ownership stamping, and RLS
2603
+ * write checks live). That is acceptable for a seed script or an internal import
2604
+ * fed server-trusted rows — but on a `.public()` procedure the rows are shaped
2605
+ * from request input, so the bypass lets a caller write columns they should never
2606
+ * control and skip every trigger-enforced invariant. The fix is to use the
2607
+ * validated `ctx.db.insert(...)` path, or keep the unsafe bulk write in an
2608
+ * internal function fed only server-built rows.
2609
+ *
2610
+ * Runs only when the codegen feeder supplies procedure-protection evidence
2611
+ * (`context.procedureProtections`); a runtime caller flags nothing. One finding
2612
+ * per public procedure using the unsafe bulk insert.
2613
+ */
2614
+ declare const insertManyUnsafeUserData: Lint;
2615
+ /**
2616
+ * Flags a `ctx.kv` read/write whose namespace key is derived from the handler's
2617
+ * `args` with no server-side scoping — a namespace-level insecure direct object
2618
+ * reference (IDOR).
2619
+ *
2620
+ * Workers KV is a single flat namespace with no per-caller isolation. When a key
2621
+ * comes straight from request input (`ctx.kv.get(args.key)`, a template embedding
2622
+ * `args.*`, or a key built one hop earlier from `args`), any caller can hand in
2623
+ * another user's key and read, overwrite, or delete that user's entry. The fix is
2624
+ * to prefix every key with a server-trusted identity (`` `${ctx.auth.userId}:…` ``)
2625
+ * so a caller can only ever address their own entries — a key that references
2626
+ * `ctx` is treated as scoped and is not flagged. `list` is not a sink (it takes a
2627
+ * prefix, not a per-entry key).
2628
+ *
2629
+ * Runs only when the codegen feeder supplies KV key-access evidence
2630
+ * (`context.kvKeyAccesses`); a runtime caller flags nothing. One finding per
2631
+ * arg-derived, unscoped `ctx.kv` call.
2632
+ */
2633
+ declare const kvUnscopedUserKeyIdor: Lint;
2634
+ /**
2635
+ * Flags a `createInboundEmailHandler({...})` built without a `verify` hook.
2636
+ *
2637
+ * An inbound email handler receives mail from the public internet, where the
2638
+ * `from` address is trivially spoofable and the DKIM/SPF/DMARC verdicts are only
2639
+ * meaningful if the handler actually checks them. The `verify` hook is where that
2640
+ * check belongs. Omit it and the handler trusts every message it receives — and
2641
+ * when the handler dispatches into a Lunora function (which runs under the admin
2642
+ * bearer, with RLS disabled), a forged sender can drive privileged writes: a
2643
+ * confused-deputy escalation reachable by anyone who can send an email.
2644
+ *
2645
+ * Runs only when the codegen feeder supplies config-call evidence
2646
+ * (`context.configCalls`); a runtime caller flags nothing. Skips calls whose
2647
+ * config wasn't a static object literal. One finding per unverified handler.
2648
+ */
2649
+ declare const mailInboundDispatchWithoutVerify: Lint;
2650
+ /**
2651
+ * Flags a `ctx.mail`/`ctx.email` `send`/`queue` call whose recipient field
2652
+ * (to/cc/bcc) is derived from the handler's `args` with no server-side
2653
+ * scoping.
2654
+ *
2655
+ * A recipient derived straight from request input turns the deployment into
2656
+ * an open relay / spam amplifier — any caller can direct mail to an arbitrary
2657
+ * address just by supplying it as an argument. The fix is to derive
2658
+ * recipients from server-trusted state (e.g. the authenticated user's own
2659
+ * record via `ctx.auth`), never straight from `args`; if user-chosen
2660
+ * recipients are a genuine product requirement, gate the path behind
2661
+ * authentication and rate limiting rather than leaving it open to any caller.
2662
+ *
2663
+ * Runs only when the codegen feeder supplies mail recipient-access evidence
2664
+ * (`context.mailRecipientAccesses`); a runtime caller flags nothing. One
2665
+ * finding per offending `ctx.mail`/`ctx.email` call — not per recipient field.
2666
+ */
2667
+ declare const mailRecipientFromRequestInput: Lint;
2668
+ /**
1242
2669
  * Flags a public procedure that reads a table for which at least one other
1243
2670
  * procedure declares a column mask (evidence the developer decided that table
1244
2671
  * carries sensitive columns), but whose own builder chain does NOT include
@@ -1277,6 +2704,45 @@ declare const indexReferencesUnknownField: Lint;
1277
2704
  */
1278
2705
  declare const maskUncoveredPiiColumn: Lint;
1279
2706
  /**
2707
+ * Flags a `mask(policies)` column whose strategy is the literal `"hash"` and
2708
+ * whose column name matches a PII heuristic (`email`, `ssn`, `phone`, …).
2709
+ *
2710
+ * Lunora's `"hash"` mask strategy is an unsalted 32-bit FNV-1a digest — a
2711
+ * stable pseudonym for grouping/joining, deliberately **not** a confidentiality
2712
+ * control. Its narrow (~2^32) output space makes it brute-force-recoverable by
2713
+ * the very caller it is meant to mask from, and identical inputs always
2714
+ * produce identical tokens, so it also leaks cross-row/cross-tenant equality.
2715
+ * Applying it to a PII column reads as protection but isn't; `"redact"` (drop
2716
+ * to `null`) is the strategy that actually hides the value.
2717
+ *
2718
+ * Runs only when the codegen feeder supplies strategy evidence
2719
+ * (`context.maskStrategies`); a runtime caller with no evidence flags nothing.
2720
+ * A `MaskFn` (custom, non-literal) strategy carries no static signal and is
2721
+ * never recorded by the feeder, so it never reaches this lint either.
2722
+ */
2723
+ declare const maskWeakHashStrategyOnPii: Lint;
2724
+ /**
2725
+ * Flags a public read that hydrates a masked table's rows in the clear through a
2726
+ * `with` relation.
2727
+ *
2728
+ * Column masking (`.use(mask(...))`) is applied per-procedure to the *top-level*
2729
+ * rows of the table named in a read. It does **not** descend into relations
2730
+ * hydrated via `with` — `ctx.db.posts.findMany({ with: { author: true } })`
2731
+ * returns each `author` fully unmasked even when the `users` table is masked
2732
+ * elsewhere. So a table whose columns you carefully mask on its own reads is
2733
+ * still served in the clear whenever an unprotected parent read pulls it in as a
2734
+ * relation.
2735
+ *
2736
+ * INFO, near-zero false positives by construction: it fires only when all of
2737
+ * (1) the enclosing read is public, (2) the read declares `with: { &lt;rel> }`,
2738
+ * (3) `&lt;rel>` resolves through the schema to a real target table, and (4) that
2739
+ * target table actually has masked columns (per the discovered mask evidence).
2740
+ * Absent any mask usage the lint is a no-op. Runs only when the codegen feeder
2741
+ * supplies `context.relationLoads`; a runtime caller flags nothing. One finding
2742
+ * per `(read, masked relation)` pair.
2743
+ */
2744
+ declare const maskedRelationLeakViaWith: Lint;
2745
+ /**
1280
2746
  * Flags a custom mutator whose authoritative `server` impl writes a row with
1281
2747
  * `ctx.db.replace(id, document)` — a whole-document overwrite.
1282
2748
  *
@@ -1321,6 +2787,132 @@ declare const mutatorFullRowReplace: Lint;
1321
2787
  */
1322
2788
  declare const nondeterministicQueryMutation: Lint;
1323
2789
  /**
2790
+ * Flags a public `query`/`mutation` whose handler gates a `ctx.db.get`/`patch`/`delete`
2791
+ * on a null-checked `ctx.db.normalizeId(table, id)` result, with no intervening
2792
+ * ownership predicate and no RLS coverage.
2793
+ *
2794
+ * `normalizeId` performs pure structural validation — it checks that a string is
2795
+ * shaped like a valid id for `table` and returns the branded id, but it **never reads
2796
+ * the database**. A non-null result therefore proves only that the id is well-formed,
2797
+ * never that the row exists or that the caller owns it. Treating "normalizeId returned
2798
+ * non-null" as authorization is an IDOR: any caller who supplies a syntactically valid
2799
+ * id of another user's row reaches it. This is an INFO-level nudge — the handler may be
2800
+ * intentionally public — it flags a place where the shape check is doing load-bearing
2801
+ * work it can't actually do.
2802
+ *
2803
+ * **Negative-proof gates** (bias toward silence — a false negative is cheaper than a
2804
+ * false positive that trains users to ignore the advisor): the feeder records a row
2805
+ * only when a null-gated normalized id reaches an id-first sink, and this lint
2806
+ * additionally requires (1) `visibility === "public"` (an internal procedure trusts
2807
+ * its server caller for authorization), (2) no `.use(rls(...))` on the builder chain,
2808
+ * (3) no ownership/identity mention anywhere in the handler (`mentionsOwnership` — any
2809
+ * `ctx.auth`/`ctx.identity` read or ownership-named identifier suppresses), and (4) the
2810
+ * table not covered by schema-required RLS. A handler that compares the loaded row's
2811
+ * `userId` to `ctx.auth.userId`, or a schema in `.rls("required")` mode, is never
2812
+ * flagged.
2813
+ *
2814
+ * Runs only when the codegen feeder supplies `context.normalizeIdAuthorizations`; a
2815
+ * runtime caller flags nothing.
2816
+ */
2817
+ declare const normalizeIdUsedAsAuthorization: Lint;
2818
+ /**
2819
+ * Nudges a `.public()` `query` whose handler returns raw table rows — with no
2820
+ * `.output(...)` projection and no `.use(mask(...))` — when that table carries
2821
+ * PII-named columns (`email`, `phone`, `ssn`, …).
2822
+ *
2823
+ * A public query is reachable by any client. Returning a table row verbatim ships
2824
+ * every column it holds — including PII the caller never needed — and silently
2825
+ * widens the exposed surface every time a column is added to the table later. An
2826
+ * explicit `.output(v.object({ … }))` projection (or a `.use(mask(...))` policy)
2827
+ * makes the exposed shape intentional and stops the next-added column from leaking
2828
+ * by default. This is an INFO-level nudge, not a defect: the query may be perfectly
2829
+ * fine — it flags a place worth a deliberate projection decision.
2830
+ *
2831
+ * **Low-FP gates**: the feeder records a row only when the handler returns the raw
2832
+ * read result itself (a hand-built object / array / `.map(...)` projection is not
2833
+ * recorded), and this lint additionally requires (1) `visibility === "public"`,
2834
+ * (2) no `.output(...)` and no `.use(mask(...))` on the builder chain, and (3) the
2835
+ * returned table to declare at least one PII-named column. A public query returning
2836
+ * a non-PII lookup table (`emojis`, `countries`) is never flagged.
2837
+ *
2838
+ * Runs only when the codegen feeder supplies `context.rawRowReturns`; a runtime
2839
+ * caller flags nothing.
2840
+ */
2841
+ declare const outputProjectionMissingOnPublicRead: Lint;
2842
+ /**
2843
+ * Flags a `ctx.db` write (`insert` / `replace` / `patch` / `insertManyUnsafe`)
2844
+ * that sets an ownership / identity column — `userId`, `ownerId`, `tenantId`, and
2845
+ * the like — from the handler's `args` instead of the server-trusted identity.
2846
+ *
2847
+ * The ownership column decides *who a row belongs to*. When its value comes from
2848
+ * request input (`ctx.db.insert("posts", { userId: args.userId })`), any caller
2849
+ * can claim to be anyone: pass a different `userId` / `tenantId` and the write
2850
+ * lands a row owned by another user or tenant — the classic act-as-any-user /
2851
+ * cross-tenant IDOR. The fix is to stamp the ownership column from `ctx.auth` /
2852
+ * `ctx.identity` on the server and never read it from `args`. A column set from
2853
+ * `ctx.*`, or to a fixed literal, is correct and not flagged.
2854
+ *
2855
+ * Runs only when the codegen feeder supplies owner-write evidence
2856
+ * (`context.ownerFieldWrites`); a runtime caller flags nothing. One finding per
2857
+ * offending identity-column write.
2858
+ */
2859
+ declare const ownerFieldFromArgsNotAuth: Lint;
2860
+ /**
2861
+ * Flags a `createPayment({...})` constructed without an `authorize` callback.
2862
+ *
2863
+ * The `authorize(referenceId)` hook is `@lunora/payment`'s access-control gate: it
2864
+ * runs before every charge/refund/subscription operation and decides whether the
2865
+ * current caller may act on that payment reference. Omit it and the guard is
2866
+ * effectively open — any caller who can reach a reference id (often a
2867
+ * client-supplied string) can drive money movement against someone else's
2868
+ * payment, a broken-access-control (IDOR) escalation on the most sensitive
2869
+ * surface an app has.
2870
+ *
2871
+ * The context accessor `ctx.payments` is authorization-scoped by default; this
2872
+ * lint targets the direct `createPayment(...)` factory, where the gate is
2873
+ * opt-in. Runs only when the codegen feeder supplies config-call evidence
2874
+ * (`context.configCalls`); a runtime caller flags nothing. Skips calls whose
2875
+ * config wasn't a static object literal (the key may be set on a config built
2876
+ * elsewhere). One finding per unguarded call.
2877
+ */
2878
+ declare const paymentCreateWithoutAuthorize: Lint;
2879
+ /**
2880
+ * Flags a payment webhook adapter (`createStripeAdapter` / `createPolarAdapter`)
2881
+ * configured with an implausibly wide `webhookToleranceSeconds` replay window.
2882
+ *
2883
+ * The adapters reject a webhook whose signed timestamp is more than
2884
+ * `webhookToleranceSeconds` from now, so a captured-then-replayed signed payload
2885
+ * is refused once it ages past the window. The default (300s) is the recommended
2886
+ * clock-skew allowance; widening it to hours or days keeps stale, replayable
2887
+ * signed events valid long after capture, defeating the timestamp check and
2888
+ * re-opening the replay window the signature scheme exists to close.
2889
+ *
2890
+ * Runs only when the codegen feeder supplies adapter evidence
2891
+ * (`context.paymentWebhooks`); a runtime caller flags nothing. Fires only on a
2892
+ * statically-known numeric `webhookToleranceSeconds` literal above the ceiling —
2893
+ * a computed or env-sourced value is not evaluated, to keep the false-positive
2894
+ * rate low. One finding per matching adapter.
2895
+ */
2896
+ declare const paymentWebhookWideTolerance: Lint;
2897
+ /**
2898
+ * Flags a plaintext secret committed to `wrangler.jsonc`'s `vars` block.
2899
+ *
2900
+ * `vars` are **plaintext environment variables**: Wrangler bakes them into the
2901
+ * deployed Worker's bundle in cleartext, and `wrangler.jsonc` is checked into
2902
+ * source control — so a real API key, access key, private key, or token placed
2903
+ * there leaks two ways at once (every reader of the repo and the deployed bundle)
2904
+ * and rotating it means editing tracked config plus a redeploy. Secrets belong in
2905
+ * a Secrets Store binding (`ctx.secrets.get(name)`) or `wrangler secret put`, never
2906
+ * `vars`. The evidence comes from `@lunora/config`, which reads `wrangler.jsonc`
2907
+ * and applies the same secret-shape heuristics as `hardcoded_secret`, plus a
2908
+ * secret-suggestive key-name rule (`*_KEY` / `*_SECRET` / `*_TOKEN` / `*_PASSWORD`
2909
+ * / `*_DSN`), while skipping placeholders and public/publishable keys.
2910
+ *
2911
+ * Runs only when the config feeder supplies wrangler-variable evidence
2912
+ * (`context.wranglerVariables`); a runtime caller flags nothing. One finding per var.
2913
+ */
2914
+ declare const plaintextSecretInWranglerVariables: Lint;
2915
+ /**
1324
2916
  * Flags an RLS policy whose `table` names a table that does not exist in the
1325
2917
  * schema.
1326
2918
  *
@@ -1344,6 +2936,50 @@ declare const nondeterministicQueryMutation: Lint;
1344
2936
  */
1345
2937
  declare const policyReferencesUnknownTable: Lint;
1346
2938
  /**
2939
+ * Flags a `ctx.run`/`context.run` back into a Lunora function from inside a
2940
+ * `defineQueue` push handler or a `defineWorkflow` handler, when the dispatch's
2941
+ * args reference the handler's untrusted payload (`context.params` for a
2942
+ * workflow, a `for (… of batch.messages)` body for a queue) **and** the target
2943
+ * enforces row-level security.
2944
+ *
2945
+ * A queue/workflow handler runs under the deployment's **system identity** with
2946
+ * end-user RLS disabled — that is by design, so the handler can touch any row.
2947
+ * But the payload it receives is attacker-influenced: a queue body is whatever
2948
+ * was enqueued (often straight from a public mutation's `args`), and a
2949
+ * workflow's `params` are set by the `.create({ params })` caller. Forwarding
2950
+ * that payload into a function whose own protection is a *row policy* is a
2951
+ * confused-deputy: the policy that would have rejected the caller's request is
2952
+ * skipped because the handler, not the user, is now the principal. Any field
2953
+ * the payload controls that the target's RLS keys on (owner id, tenant id, row
2954
+ * id) becomes an act-as-any-user / cross-tenant write.
2955
+ *
2956
+ * The lint is deliberately narrow to stay false-positive-free: it fires **only**
2957
+ * when the resolved target (`api.&lt;file>.&lt;export>`) is found in the
2958
+ * RLS-procedure evidence with `usesRls: true`. A dispatch into a function that
2959
+ * does its own arg validation and carries no row policy (the common, correct
2960
+ * case — e.g. a welcome-message mutation with no `rls`) is not flagged. Runs
2961
+ * only when the codegen feeder supplies dispatch evidence
2962
+ * (`context.privilegedDispatches`); a runtime caller flags nothing.
2963
+ */
2964
+ declare const privilegedDispatchUnvalidatedPayload: Lint;
2965
+ /**
2966
+ * Flags a public procedure whose handler fans work out to a privileged,
2967
+ * cost-bearing dispatch surface without a rate-limit guard.
2968
+ *
2969
+ * `ctx.scheduler.runAfter` / `runAt`, a `ctx.queues.&lt;name>` producer send, and
2970
+ * `ctx.workflows.&lt;name>.create` all enqueue work that runs later under the
2971
+ * system identity (RLS disabled) and bills against the account. Triggered from a
2972
+ * `.public()` procedure with no rate limit, an anonymous caller can drive that
2973
+ * dispatch in a loop — a cost-amplification / denial-of-wallet vector, and a way
2974
+ * to flood a privileged async surface. The fix is to gate the public entry point
2975
+ * with a rate limit (or make it internal and trigger it from a guarded path).
2976
+ *
2977
+ * Runs only when the codegen feeder supplies procedure-protection evidence
2978
+ * (`context.procedureProtections`); a runtime caller flags nothing. One finding
2979
+ * per unguarded public fan-out procedure.
2980
+ */
2981
+ declare const privilegedFanoutFromPublicProcedure: Lint;
2982
+ /**
1347
2983
  * Flags a `v.any()` argument on a public procedure.
1348
2984
  *
1349
2985
  * `v.any()` disables validation: the field accepts arbitrary, untyped,
@@ -1374,6 +3010,31 @@ declare const publicArgumentUsesAny: Lint;
1374
3010
  */
1375
3011
  declare const publicMutationWithoutRatelimit: Lint;
1376
3012
  /**
3013
+ * Flags a `.public()` table that carries ownership/tenancy- or PII-named
3014
+ * columns, on a schema that requires RLS (`.rls("required")`).
3015
+ *
3016
+ * `.public()`'s name is misleading: it does NOT mean "this table holds public
3017
+ * data" — it means the OPPOSITE of that from an enforcement standpoint. It opts
3018
+ * one table OUT of the schema-wide `.rls("required")` enforcement, so its
3019
+ * `ctx.db` write path is never denied for missing RLS coverage. A table named
3020
+ * `.public()` that also carries `userId` / `email` / `ssn`-shaped columns reads
3021
+ * as "safe to expose" but is actually "exempt from the row-security guard" —
3022
+ * exactly the confusion the method name invites.
3023
+ *
3024
+ * **Low-FP gate**: only flagged when (1) the schema opted into
3025
+ * `.rls("required")` at all (`.public()` is a documented no-op otherwise — see
3026
+ * {@link https://lunora.sh}'s `.public()` docs), and (2) the table's declared
3027
+ * columns match the ownership/PII heuristic ({@link ownershipOrPiiColumns}). A
3028
+ * genuinely public lookup table (e.g. `emojis`, `countries`) with no such
3029
+ * columns is not flagged.
3030
+ *
3031
+ * **Pure schema evidence**: reads only `context.schema` — both `isPublic` and
3032
+ * `rlsMode` are forwarded by the runtime `fromServerSchema` and the codegen
3033
+ * `toAdvisorSchema` paths, so this lint runs identically from a live shard and
3034
+ * from codegen, with no feeder required.
3035
+ */
3036
+ declare const publicTableRlsOptoutConfusion: Lint;
3037
+ /**
1377
3038
  * Flags an R2 SQL `ctx.r2sql` access inside a `query(...)` or `mutation(...)`
1378
3039
  * handler body.
1379
3040
  *
@@ -1399,6 +3060,62 @@ declare const publicMutationWithoutRatelimit: Lint;
1399
3060
  */
1400
3061
  declare const r2sqlOutsideAction: Lint;
1401
3062
  /**
3063
+ * Flags a `new RateLimiter({...})` constructed without an explicit `store`.
3064
+ *
3065
+ * The default store is per-instance in-memory. On Cloudflare Workers each request
3066
+ * can land on a different isolate, so an in-memory counter never sums across
3067
+ * them: the limiter silently under-counts and, under real traffic, is close to a
3068
+ * no-op. A rate limit that doesn't actually limit gives a false sense of
3069
+ * protection against brute-force, enumeration, and cost-abuse — exactly the
3070
+ * attacks it was added to stop. The fix is a shared, durable store (a Durable
3071
+ * Object or KV-backed one) so every isolate reads and writes the same bucket.
3072
+ *
3073
+ * Runs only when the codegen feeder supplies config-call evidence
3074
+ * (`context.configCalls`); a runtime caller flags nothing. Skips calls whose
3075
+ * config wasn't a static object literal. One finding per limiter.
3076
+ */
3077
+ declare const ratelimitDefaultMemoryStore: Lint;
3078
+ /**
3079
+ * Flags a `rateLimit`/`dbRateLimit` middleware call (`@lunora/ratelimit`) whose
3080
+ * `key` selector is derived from the handler's `args` with no server-side
3081
+ * scoping.
3082
+ *
3083
+ * The middleware's `key` is `(ctx) => string | undefined` — a sub-key that
3084
+ * isolates the limit per caller. When the selector reads straight from `args`
3085
+ * (an email, a client-supplied id, …) instead of a server-trusted identity
3086
+ * (`ctx.auth.userId`) or the server-trusted `ctx.ip`, an attacker can rotate the
3087
+ * key on every request and never share a bucket with themselves, defeating the
3088
+ * limit entirely. A selector with no `args` reference at all — a fixed/global
3089
+ * bucket, including simply omitting `key` — is a *different*, fuzzier problem
3090
+ * (one caller can still exhaust a shared global bucket for everyone) and is
3091
+ * deliberately **not** flagged here, to keep this lint's false-positive rate
3092
+ * low: a global bucket is a legitimate choice for some limits (e.g. a
3093
+ * deployment-wide cost cap), so its absence alone is not a reliable signal.
3094
+ *
3095
+ * Runs only when the codegen feeder supplies rate-limit key-selector evidence
3096
+ * (`context.ratelimitKeySelectors`); a runtime caller flags nothing. One finding
3097
+ * per arg-derived, unscoped selector.
3098
+ */
3099
+ declare const ratelimitKeySpoofableOrGlobal: Lint;
3100
+ /**
3101
+ * Flags a `rateLimit`/`dbRateLimit`/`verifyTurnstileMiddleware` guard configured
3102
+ * `failOpen: true` on an auth/payment-sensitive procedure.
3103
+ *
3104
+ * `@lunora/ratelimit`'s `rateLimit`/`dbRateLimit` and `@lunora/auth`'s
3105
+ * `verifyTurnstileMiddleware` fail **closed** by default — a store outage or a
3106
+ * failed Turnstile siteverify rejects the request (503). Passing `failOpen: true`
3107
+ * inverts that: the middleware swallows the failure and admits the request. On a
3108
+ * sign-in / account-creation / password-reset / OTP / payment endpoint that turns
3109
+ * a transient limiter outage into an unthrottled brute-force / abuse window.
3110
+ *
3111
+ * Runs only when the codegen feeder supplies fail-open-guard evidence
3112
+ * (`context.failOpenGuards`); a runtime caller flags nothing. Deliberately narrow
3113
+ * — fires only when the options literal provably set `failOpen: true` AND the
3114
+ * guarded procedure's export name or rate-limit `name` matches an auth/payment
3115
+ * token, keeping the false-positive rate low. One finding per guard.
3116
+ */
3117
+ declare const ratelimitMiddlewareFailOpen: Lint;
3118
+ /**
1402
3119
  * A correctness lint covering the columns a relation wires together: the FK
1403
3120
  * `field` and the `references` column must each exist on their respective
1404
3121
  * tables, or the join can never resolve. Caught here at codegen time rather
@@ -1495,6 +3212,28 @@ declare const shapeTargetsGlobalTable: Lint;
1495
3212
  */
1496
3213
  declare const shapeUnknownTable: Lint;
1497
3214
  /**
3215
+ * Flags a public read that resurfaces soft-deleted rows via `includeDeleted` —
3216
+ * either hardcoded `true` or wired from the handler's `args`.
3217
+ *
3218
+ * A `.softDelete()` table hides deleted rows from list reads (`findMany` /
3219
+ * `findFirst`) unless the call passes `includeDeleted: true`. That opt-out is a
3220
+ * deliberate, privileged escape hatch (an admin trash view, a restore flow). On
3221
+ * a `.public()` read it becomes a leak: `includeDeleted: true` returns
3222
+ * soft-deleted rows to *every* caller, and `includeDeleted: args.showDeleted`
3223
+ * lets *any* caller flip the toggle per request — either way the "deleted" rows
3224
+ * a user believes are gone (and that your UI hides) are served straight back.
3225
+ *
3226
+ * INFO, near-zero false positives by construction: it fires only when all of
3227
+ * (1) the enclosing procedure is public, (2) the read's target is a schema table
3228
+ * that actually declares `.softDelete()`, and (3) `includeDeleted` is a hardcoded
3229
+ * `true` or arg-derived. A literal `false`, or an `includeDeleted` gated by a
3230
+ * server-trusted `ctx.*` value, is never recorded by the feeder, so a correct
3231
+ * admin-gated read is not flagged. Runs only when the codegen feeder supplies
3232
+ * `context.softDeleteReads`; a runtime caller flags nothing. One finding per
3233
+ * matching read.
3234
+ */
3235
+ declare const softDeleteIncludeDeletedFromArgs: Lint;
3236
+ /**
1498
3237
  * Flags a `ctx.sql` tagged-template that splices an unparameterized
1499
3238
  * string-building expression into the query.
1500
3239
  *
@@ -1511,6 +3250,107 @@ declare const shapeUnknownTable: Lint;
1511
3250
  */
1512
3251
  declare const sqlInjectionRisk: Lint;
1513
3252
  /**
3253
+ * Flags a `ctx.storage.generateUploadUrl(key, …)` call whose options argument
3254
+ * omits `contentType`.
3255
+ *
3256
+ * `generateUploadUrl` mints a signed `PUT` URL the *client* uploads directly
3257
+ * to R2, bypassing `upload()`/`store()` entirely — including their
3258
+ * `allowedContentTypes`/`maxSize` guards, which this alias never sees. The one
3259
+ * guard `generateUploadUrl` itself offers is `contentType`: passing it pins
3260
+ * the `Content-Type` into the signature, so the signed URL only authorizes a
3261
+ * PUT with exactly that content-type. Omit it and the minted URL accepts any
3262
+ * content-type/size the client chooses, entirely unchecked server-side.
3263
+ *
3264
+ * Runs only when the codegen feeder supplies storage-upload evidence
3265
+ * (`context.storageUploads`); a runtime caller flags nothing. Skips calls
3266
+ * whose options argument wasn't statically analyzable (a variable, call
3267
+ * result, or a spread) — the key may be set on an object built elsewhere. One
3268
+ * finding per unpinned call.
3269
+ */
3270
+ declare const storageGenerateUploadUrlNoContentTypePin: Lint;
3271
+ /**
3272
+ * Flags a `ctx.storage.&lt;bucket>.&lt;method>(key, …)` whose R2 object key is derived
3273
+ * from the handler's `args` with no server-side scoping — an object-level IDOR.
3274
+ *
3275
+ * The bucket read/write/URL/delete methods (`get`, `put`, `delete`, `download`,
3276
+ * `store`, `getSignedUrl`, …) take the object key as their first argument. When
3277
+ * that key comes straight from request input (`ctx.storage.docs.get(args.key)`, or
3278
+ * a key built one hop earlier from `args`), any caller can name any object — reading,
3279
+ * overwriting, or deleting another user's file. The fix is to prefix the key with a
3280
+ * server-trusted identity (`` `${ctx.auth.userId}/…` ``) or to resolve the object
3281
+ * through a record the caller is known to own; a key that references `ctx` is treated
3282
+ * as scoped and is not flagged.
3283
+ *
3284
+ * Runs only when the codegen feeder supplies storage-key evidence
3285
+ * (`context.storageKeyAccesses`); a runtime caller flags nothing. One finding per
3286
+ * offending call.
3287
+ */
3288
+ declare const storageKeyFromUserArgs: Lint;
3289
+ /**
3290
+ * Flags a `ctx.storage.getPresignedUrl(...)` call, or a `getPresignedUrl`/
3291
+ * `getSignedUrl` call whose `expiresInSeconds` sits near the shared 7-day
3292
+ * signing ceiling.
3293
+ *
3294
+ * `getPresignedUrl` mints a native S3 SigV4 URL that resolves directly
3295
+ * against R2's S3 endpoint — the holder reaches the object straight off R2,
3296
+ * **bypassing the Worker entirely**, so any auth/RLS/rate-limit gate the app
3297
+ * enforces in its own handlers never runs for that request. That's the right
3298
+ * trade for genuinely public or bulk content where the app has no per-request
3299
+ * gating to apply; it's the wrong choice for private, per-user, or
3300
+ * policy-gated content, where `getSignedUrl` (worker-signed, resolves back
3301
+ * through the app) is the fit. Separately, either signer minting a long TTL
3302
+ * near the shared 7-day ceiling hands out a bearer credential that stays
3303
+ * valid almost as long as the platform allows — a leaked link (referrer,
3304
+ * logs, browser history) then grants access for nearly a week.
3305
+ *
3306
+ * Runs only when the codegen feeder supplies storage-upload evidence
3307
+ * (`context.storageUploads`); a runtime caller flags nothing. The
3308
+ * near-ceiling check only fires on a statically-known numeric
3309
+ * `expiresInSeconds` literal — a variable or computed expression is not
3310
+ * evaluated, to keep the false-positive rate low. One finding per matching
3311
+ * call.
3312
+ */
3313
+ declare const storagePresignedUrlForPrivateContent: Lint;
3314
+ /**
3315
+ * Flags a `ctx.storage.upload`/`store` call whose options argument omits
3316
+ * `allowedContentTypes`.
3317
+ *
3318
+ * `@lunora/storage`'s `upload`/`store` accept an `allowedContentTypes`
3319
+ * allowlist that, when set, rejects a mismatched (or missing) `contentType` —
3320
+ * the control that stops an uploader from storing `text/html` or
3321
+ * `image/svg+xml` and having it served back from `publicBaseUrl`, a classic
3322
+ * stored-XSS path against your own origin. Omitting the option leaves any
3323
+ * content-type acceptable. `generateUploadUrl`'s signed PUT has no
3324
+ * `allowedContentTypes` option at all (it bypasses `upload()`'s guards
3325
+ * entirely) — that gap is `storage_generate_upload_url_no_content_type_pin`'s
3326
+ * concern, not this lint's.
3327
+ *
3328
+ * Runs only when the codegen feeder supplies storage-upload evidence
3329
+ * (`context.storageUploads`); a runtime caller flags nothing. Skips calls
3330
+ * whose options argument wasn't statically analyzable (a variable, call
3331
+ * result, or a spread) — the key may be set on an object built elsewhere. One
3332
+ * finding per unguarded call.
3333
+ */
3334
+ declare const storageUploadWithoutContentTypeAllowlist: Lint;
3335
+ /**
3336
+ * Flags a `ctx.storage.upload`/`store` call whose options argument omits
3337
+ * `maxSize`.
3338
+ *
3339
+ * `@lunora/storage`'s `upload`/`store` accept a `maxSize` byte ceiling that
3340
+ * rejects an oversized `ArrayBuffer`/`Blob` up front, and pipes a
3341
+ * `ReadableStream` through a counting `TransformStream` that aborts once the
3342
+ * limit is exceeded — without it, a caller can push an unbounded body through
3343
+ * the Worker straight into R2, exhausting storage/billing (and, for a
3344
+ * streamed body, worker CPU/time) with no cap.
3345
+ *
3346
+ * Runs only when the codegen feeder supplies storage-upload evidence
3347
+ * (`context.storageUploads`); a runtime caller flags nothing. Skips calls
3348
+ * whose options argument wasn't statically analyzable (a variable, call
3349
+ * result, or a spread) — the key may be set on an object built elsewhere. One
3350
+ * finding per unbounded call.
3351
+ */
3352
+ declare const storageUploadWithoutMaxSize: Lint;
3353
+ /**
1514
3354
  * Flags a declared table that no function inserts into.
1515
3355
  *
1516
3356
  * Using `@lunora/codegen`'s write-side discovery (the analog of the read
@@ -1597,6 +3437,25 @@ declare const unindexedRelationTarget: Lint;
1597
3437
  */
1598
3438
  declare const userCreatingMutationWithoutCaptcha: Lint;
1599
3439
  /**
3440
+ * Flags a `ctx.vectors.query`/`upsert`/`upsertMany` call whose `namespace`
3441
+ * input is derived from the handler's `args` with no server-side scoping — a
3442
+ * tenant-partition escape.
3443
+ *
3444
+ * Vectorize namespaces partition a single index into isolated sub-collections
3445
+ * (typically one per tenant/user). When a namespace comes straight from
3446
+ * request input (`ctx.vectors.query(idx, { namespace: args.tenant })`, or a
3447
+ * value built one hop earlier from `args`), any caller can hand in another
3448
+ * tenant's namespace and read or poison that tenant's vectors. The fix is to
3449
+ * derive the namespace from a server-trusted identity (`` `${ctx.auth.orgId}` ``)
3450
+ * so a caller can only ever address their own partition — a namespace that
3451
+ * references `ctx` is treated as scoped and is not flagged.
3452
+ *
3453
+ * Runs only when the codegen feeder supplies vector-namespace evidence
3454
+ * (`context.vectorNamespaceAccesses`); a runtime caller flags nothing. One
3455
+ * finding per arg-derived, unscoped `ctx.vectors` call.
3456
+ */
3457
+ declare const vectorsNamespaceFromUserInput: Lint;
3458
+ /**
1600
3459
  * Flags a durable step name reused within one workflow.
1601
3460
  *
1602
3461
  * Cloudflare Workflows memoizes every `step.do` / `step.sleep` / `step.sleepUntil`
@@ -1677,4 +3536,4 @@ interface RunAdvisorOptions {
1677
3536
  * `static` lints at build time and defer `runtime` lints to a live shard.
1678
3537
  */
1679
3538
  declare const runAdvisor: (context: LintContext, options?: RunAdvisorOptions) => Finding[];
1680
- export { AE_METRIC_EVENTS, ALL_LINTS, type AdvisorAdminRoute, type AdvisorArgumentValidator, type AdvisorAuthApiCall, type AdvisorContainer, type AdvisorHyperdriveCall, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorMaskProcedure, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorR2sqlCall, type AdvisorRelation, type AdvisorRlsProcedure, type AdvisorSchema, type AdvisorSecretLiteral, type AdvisorShape, type AdvisorShardTraffic, type AdvisorSqlInterpolation, type AdvisorTable, type AdvisorTableSample, type AdvisorTableScan, type AdvisorWorkflow, type AdvisorWorkflowCall, type AnalyticsMetricsOptions, type AnalyticsMetricsSource, type AnalyticsRuntimeMetrics, type Category, type Facing, type Finding, type Level, type Lint, type LintContext, type LintSource, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, adminRouteWithoutGuard, authApiCallWithoutHeaders, circularFk, constraintValidator, containerOversizedInstance, containerPublicInternet, duplicateIndex, emptyIndex, externalSourceOnGlobal, externalSourceUnscoped, filterWithoutIndex, fromServerSchema, hardcodedSecret, hotShard, hyperdriveOutsideAction, indexReferencesUnknownField, indexUtilization, loadAnalyticsRuntimeMetrics, maskUncoveredPiiColumn, mutatorFullRowReplace, nondeterministicQueryMutation, policyReferencesUnknownTable, publicArgumentUsesAny, publicMutationWithoutRatelimit, r2sqlOutsideAction, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, sqlInjectionRisk, tableWithoutInsert, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, userCreatingMutationWithoutCaptcha, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };
3539
+ export { AE_METRIC_EVENTS, ALL_LINTS, type AdvisorAdminRoute, type AdvisorAiRawRun, type AdvisorAiToolSideEffect, type AdvisorArgumentDerivedFetch, type AdvisorArgumentValidator, type AdvisorAuthApiCall, type AdvisorAuthConfig, type AdvisorBrowserUrlAccess, type AdvisorConfigCall, type AdvisorContainer, type AdvisorContainerKeyAccess, type AdvisorContainerOverride, type AdvisorFailOpenGuard, type AdvisorFlagSecurityDefault, type AdvisorHttpActionGuard, type AdvisorHttpHeaderWrite, type AdvisorHyperdriveCall, type AdvisorIdentityClaimRead, type AdvisorImageDeliveryUrlAccess, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorKvKeyAccess, type AdvisorMailRecipientAccess, type AdvisorMaskProcedure, type AdvisorMaskStrategy, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorNormalizeIdAuthorization, type AdvisorOwnerFieldWrite, type AdvisorPaymentWebhook, type AdvisorPrivilegedDispatch, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorR2sqlCall, type AdvisorRatelimitKeySelector, type AdvisorRawRowReturn, type AdvisorRelation, type AdvisorRelationLoad, type AdvisorRlsProcedure, type AdvisorSchema, type AdvisorSecretLiteral, type AdvisorShape, type AdvisorShardTraffic, type AdvisorSoftDeleteRead, type AdvisorSqlInterpolation, type AdvisorStorageKeyAccess, type AdvisorStorageUpload, type AdvisorTable, type AdvisorTableSample, type AdvisorTableScan, type AdvisorVectorNamespaceAccess, type AdvisorWorkflow, type AdvisorWorkflowCall, type AdvisorWranglerVariable, type AnalyticsMetricsOptions, type AnalyticsMetricsSource, type AnalyticsRuntimeMetrics, type Category, type Facing, type Finding, type Level, type Lint, type LintContext, type LintSource, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, actionFetchSsrf, adminRouteWithoutGuard, aiRawRunEscapeHatch, aiToolSideEffectPromptInjection, aiUnboundedGenerationPublic, allowUnauthenticatedShardAccessEnabled, authApiCallWithoutHeaders, authCsrfCheckDisabled, authEmailVerificationDisabled, authSecureCookiesDisabled, authSessionFreshageZero, authTrustedOriginsWildcard, browserAllowPrivateTargets, browserUserUrlWithoutAllowlist, circularFk, constraintValidator, containerInstanceKeyFromUserInput, containerOversizedInstance, containerPublicInternet, containerRuntimeEgressRelaxation, containerStartEnableInternetOverride, duplicateIndex, emptyIndex, externalSourceOnGlobal, externalSourceUnscoped, filterWithoutIndex, flagGatesSecurityWithUnsafeDefault, fromServerSchema, hardcodedSecret, hotShard, httpActionMissingAuthGuard, httpActionResponseHeaderInjection, hyperdriveOutsideAction, identityUndeclaredClaimTrusted, imagesUrlSourceFromUserInput, indexReferencesUnknownField, indexUtilization, insertManyUnsafeUserData, kvUnscopedUserKeyIdor, loadAnalyticsRuntimeMetrics, mailInboundDispatchWithoutVerify, mailRecipientFromRequestInput, maskUncoveredPiiColumn, maskWeakHashStrategyOnPii, maskedRelationLeakViaWith, mutatorFullRowReplace, nondeterministicQueryMutation, normalizeIdUsedAsAuthorization, outputProjectionMissingOnPublicRead, ownerFieldFromArgsNotAuth, paymentCreateWithoutAuthorize, paymentWebhookWideTolerance, plaintextSecretInWranglerVariables, policyReferencesUnknownTable, privilegedDispatchUnvalidatedPayload, privilegedFanoutFromPublicProcedure, publicArgumentUsesAny, publicMutationWithoutRatelimit, publicTableRlsOptoutConfusion, r2sqlOutsideAction, ratelimitDefaultMemoryStore, ratelimitKeySpoofableOrGlobal, ratelimitMiddlewareFailOpen, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, softDeleteIncludeDeletedFromArgs, sqlInjectionRisk, storageGenerateUploadUrlNoContentTypePin, storageKeyFromUserArgs, storagePresignedUrlForPrivateContent, storageUploadWithoutContentTypeAllowlist, storageUploadWithoutMaxSize, tableWithoutInsert, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, userCreatingMutationWithoutCaptcha, vectorsNamespaceFromUserInput, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };