@lunora/advisor 1.0.0-alpha.197 → 1.0.0-alpha.199

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2885,11 +2885,12 @@ declare const browserAllowPrivateTargets: Lint;
2885
2885
  * an arbitrary third-party URL (SSRF to public cloud APIs that trust the egress
2886
2886
  * IP, data exfiltration through the fetched URL), and — without pinned DNS — a
2887
2887
  * public hostname can rebind to an internal address after the guard's check.
2888
- * The containment is an `allowedHosts` allowlist on `createBrowser`, or a
2889
- * pinned `resolveDns: true`. This lint therefore suppresses all findings when
2890
- * the config-call evidence shows a `createBrowser` hardened with either; only an
2891
- * unhardened browser reaching an arg-derived URL is flagged. `resolveDns: false`
2892
- * is NOT hardening — it turns the DoH re-check off — so it does not suppress.
2888
+ * The containment is an `allowedHosts` allowlist on `createBrowser`, which
2889
+ * Browser Run enforces on the session itself; it is the supported production
2890
+ * posture. Without it the guard is a best-effort Worker-side check (the DoH
2891
+ * re-check included, `resolveDns: true` or not), so this lint suppresses its
2892
+ * findings only when the config-call evidence shows a `createBrowser` with
2893
+ * `allowedHosts`.
2893
2894
  *
2894
2895
  * Runs only when the codegen feeder supplies browser URL-access evidence
2895
2896
  * (`context.browserUrlAccesses`); a runtime caller flags nothing. One finding
package/dist/index.d.ts CHANGED
@@ -2885,11 +2885,12 @@ declare const browserAllowPrivateTargets: Lint;
2885
2885
  * an arbitrary third-party URL (SSRF to public cloud APIs that trust the egress
2886
2886
  * IP, data exfiltration through the fetched URL), and — without pinned DNS — a
2887
2887
  * public hostname can rebind to an internal address after the guard's check.
2888
- * The containment is an `allowedHosts` allowlist on `createBrowser`, or a
2889
- * pinned `resolveDns: true`. This lint therefore suppresses all findings when
2890
- * the config-call evidence shows a `createBrowser` hardened with either; only an
2891
- * unhardened browser reaching an arg-derived URL is flagged. `resolveDns: false`
2892
- * is NOT hardening — it turns the DoH re-check off — so it does not suppress.
2888
+ * The containment is an `allowedHosts` allowlist on `createBrowser`, which
2889
+ * Browser Run enforces on the session itself; it is the supported production
2890
+ * posture. Without it the guard is a best-effort Worker-side check (the DoH
2891
+ * re-check included, `resolveDns: true` or not), so this lint suppresses its
2892
+ * findings only when the config-call evidence shows a `createBrowser` with
2893
+ * `allowedHosts`.
2893
2894
  *
2894
2895
  * Runs only when the codegen feeder supplies browser URL-access evidence
2895
2896
  * (`context.browserUrlAccesses`); a runtime caller flags nothing. One finding
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{dedupeCacheKeys as c}from"./packem_shared/dedupeCacheKeys-DtBOHffV.mjs";import d from"./packem_shared/fanOutBreadth-CBtmZnoh.mjs";import u from"./packem_shared/hotShard-BwGYZ3Tq.mjs";import h from"./packem_shared/indexUtilization-CkVPZcVe.mjs";import g from"./packem_shared/actionFetchSsrf-B4ZaOBlW.mjs";import b from"./packem_shared/actionWithoutErrorHandling-4GCBT0_z.mjs";import y from"./packem_shared/adminRouteWithoutGuard-DPE7LuNh.mjs";import S from"./packem_shared/aiRawRunEscapeHatch-B5980eT9.mjs";import w from"./packem_shared/aiRunWithoutLogging-CvHHtEN9.mjs";import v from"./packem_shared/aiToolSideEffectPromptInjection-_3MrX9Ul.mjs";import A from"./packem_shared/aiUnboundedGenerationPublic-C17h6sMV.mjs";import R from"./packem_shared/allowUnauthenticatedShardAccessEnabled-BQufF5Kb.mjs";import U from"./packem_shared/authApiCallWithoutHeaders-D8U1hv8s.mjs";import W from"./packem_shared/authCsrfCheckDisabled-C6bxME5y.mjs";import T from"./packem_shared/authEmailVerificationDisabled-yROPDgn-.mjs";import I from"./packem_shared/authScimWithoutTransactions-w9qb3iBe.mjs";import k from"./packem_shared/authSecureCookiesDisabled-qrCktlch.mjs";import N from"./packem_shared/authSessionFreshageZero-BMisjIIS.mjs";import x from"./packem_shared/authTrustedOriginsWildcard-DFDpfN84.mjs";import C from"./packem_shared/browserAllowPrivateTargets-Cj5sizhv.mjs";import F from"./packem_shared/browserUserUrlWithoutAllowlist-DDNC_W-2.mjs";import M from"./packem_shared/circularFk-DtcWFJxK.mjs";import O from"./packem_shared/commitOrderedHardDelete-BPdwOKA7.mjs";import D from"./packem_shared/containerInstanceKeyFromUserInput-DBdjUnQb.mjs";import $ from"./packem_shared/containerOversizedInstance-Bx89uR7E.mjs";import E from"./packem_shared/containerPublicInternet-BFfZf_P4.mjs";import P from"./packem_shared/containerRuntimeEgressRelaxation-CioCA2zY.mjs";import K from"./packem_shared/containerStartEnableInternetOverride-C6dbznku.mjs";import q from"./packem_shared/crossModuleTableWrite-DjiVTAwK.mjs";import L from"./packem_shared/duplicateIndex-Cip6-Rpu.mjs";import G from"./packem_shared/emptyIndex-BnHDcXza.mjs";import _ from"./packem_shared/errorWithoutCatalog-BTfvaXHR.mjs";import z from"./packem_shared/exportSinkMisconfigured-JfbAx9AI.mjs";import H from"./packem_shared/externalSourceIncrementalNoDeletePath-BCzm3HzF.mjs";import B from"./packem_shared/externalSourceOnGlobal-CH7xbJ49.mjs";import j from"./packem_shared/externalSourceUnscoped-BxU2uSXk.mjs";import V from"./packem_shared/filterOnPrimaryKey-DbFriOZA.mjs";import Q from"./packem_shared/filterWithoutIndex-Dc7Nn0y2.mjs";import X from"./packem_shared/flagGatesSecurityWithUnsafeDefault-DB9M6hLM.mjs";import Z from"./packem_shared/flagReadInSubscription-DabIhYGD.mjs";import J from"./packem_shared/geoIndexFieldNotGeopoint-CDMNbAfp.mjs";import Y from"./packem_shared/geoIndexUnused-D7C9Qr4U.mjs";import oo from"./packem_shared/globalTableNearColumnLimit-BFbBBd6A.mjs";import eo from"./packem_shared/hardcodedSecret-Bw_4FYrs.mjs";import ro from"./packem_shared/httpActionMissingAuthGuard-BhvcmkwW.mjs";import to from"./packem_shared/httpActionResponseHeaderInjection-DKz2SlCa.mjs";import io from"./packem_shared/hyperdriveOutsideAction-CPDdGP2g.mjs";import no from"./packem_shared/identityUndeclaredClaimTrusted-CAUagXkJ.mjs";import ao from"./packem_shared/imagesUrlSourceFromUserInput-C2CJTTCI.mjs";import mo from"./packem_shared/indexReferencesUnknownField-Dm8SL4Tp.mjs";import lo from"./packem_shared/insertManyUnsafeUserData-DWE8d_DF.mjs";import so from"./packem_shared/kvUnscopedUserKeyIdor-CXFKAyM2.mjs";import po from"./packem_shared/mailInboundDispatchWithoutVerify-CWwqXyPX.mjs";import fo from"./packem_shared/mailRecipientFromRequestInput-CQZeOsP9.mjs";import co from"./packem_shared/maskUncoveredPiiColumn-axEka4nd.mjs";import uo from"./packem_shared/maskWeakHashStrategyOnPii-njstapQY.mjs";import ho from"./packem_shared/maskedRelationLeakViaWith-CIFij6vE.mjs";import{e as a}from"./packem_shared/finding-NrKO8idM.mjs";import go from"./packem_shared/mutatorFullRowReplace-BzRpZ47r.mjs";import bo from"./packem_shared/mutatorWithoutOwnerScope-BoS81ns0.mjs";import yo from"./packem_shared/nondeterministicQueryMutation-sxmixc0l.mjs";import So from"./packem_shared/normalizeIdUsedAsAuthorization-BXN-Can6.mjs";import wo from"./packem_shared/notifyMissingPushConfig-DeQMoNwm.mjs";import vo from"./packem_shared/notifySendOutsideAction-BJrDkr4h.mjs";import Ao from"./packem_shared/outputProjectionMissingOnPublicRead-DHivs_73.mjs";import Ro from"./packem_shared/ownerFieldFromArgsNotAuth-BFNc023N.mjs";import Uo from"./packem_shared/paymentCreateWithoutAuthorize-CICGmRFR.mjs";import Wo from"./packem_shared/paymentWebhookWideTolerance-CtZb2AVA.mjs";import To from"./packem_shared/plaintextSecretInWranglerVariables-bNkqmNqV.mjs";import Io from"./packem_shared/policyReferencesUnknownTable-CIKuRZ5Y.mjs";import ko from"./packem_shared/privilegedDispatchUnvalidatedPayload-BJNC9DrB.mjs";import No from"./packem_shared/privilegedFanoutFromPublicProcedure-DV188gHQ.mjs";import xo from"./packem_shared/procedureWithoutStructuredEvent-CZ_B23nM.mjs";import Co from"./packem_shared/publicArgumentUsesAny-BDEvMA8Q.mjs";import Fo from"./packem_shared/publicMutationWithoutRatelimit-BeYapu1F.mjs";import Mo from"./packem_shared/publicTableRlsOptoutConfusion-BFmh1kH0.mjs";import Oo from"./packem_shared/queueWithoutDlq-BvHz3Opg.mjs";import Do from"./packem_shared/r2sqlOutsideAction-BdLiLOAX.mjs";import $o from"./packem_shared/ratelimitDefaultMemoryStore-Dj0Kk7t9.mjs";import Eo from"./packem_shared/ratelimitKeySpoofableOrGlobal-DlvJfSXs.mjs";import Po from"./packem_shared/ratelimitMiddlewareFailOpen-DGtyt-pc.mjs";import Ko from"./packem_shared/relationReferencesUnknownField-CqGEJD57.mjs";import qo from"./packem_shared/relationReferencesUnknownTable-CP4aWtAJ.mjs";import Lo from"./packem_shared/rlsUncoveredTable-CZ4ie4gX.mjs";import Go from"./packem_shared/shapeTargetsGlobalTable-Bu3eEDic.mjs";import _o from"./packem_shared/shapeUnknownTable-CREfNnWi.mjs";import zo from"./packem_shared/signupMutationWithoutDisposableGating-CFtFMJz8.mjs";import Ho from"./packem_shared/softDeleteIncludeDeletedFromArgs-C7Ugg4zb.mjs";import Bo from"./packem_shared/sqlInjectionRisk-y-7c46LJ.mjs";import jo from"./packem_shared/storageGenerateUploadUrlNoContentTypePin-Bx9oGOjM.mjs";import Vo from"./packem_shared/storageKeyFromUserArgs-BryKJJM-.mjs";import Qo from"./packem_shared/storagePresignedUrlForPrivateContent-lqE6LvNu.mjs";import Xo from"./packem_shared/storageUploadWithoutContentTypeAllowlist-DMr7w29r.mjs";import Zo from"./packem_shared/storageUploadWithoutMaxSize-rSNFNb2l.mjs";import Jo from"./packem_shared/tableWithoutInsert-ClJp_jDr.mjs";import Yo from"./packem_shared/topicTooManySubscriptions-CiZhFm9r.mjs";import oe from"./packem_shared/ttlFieldNotTimestamp-Dxa-6RfM.mjs";import{s as ee,q as re,c as te}from"./packem_shared/helpers-BmppB5nL.mjs";import ie from"./packem_shared/unboundedStringArgument-jZnCbwB0.mjs";import ne from"./packem_shared/unindexedForeignKey-Dypgn8uH.mjs";import ae from"./packem_shared/unindexedRelationTarget-CSqRJWYZ.mjs";import me from"./packem_shared/unrestrictedWhereBranch-CcIBmHik.mjs";import le from"./packem_shared/userCreatingMutationWithoutCaptcha-C8yaqIIj.mjs";import se from"./packem_shared/vectorsNamespaceFromUserInput-7I_Kwxvp.mjs";import pe from"./packem_shared/workflowDuplicateStepName-B6eAJzwA.mjs";import fe from"./packem_shared/workflowUnknownTarget-Cm1hfTTs.mjs";import ce from"./packem_shared/workflowUnused-DHwwE-1P.mjs";import{callSiteCallers as vt,callSiteDescription as At,callSiteLabel as Rt,callSiteMetadata as Ut,helperRole as Wt,isReachableSite as Tt,readCallSiteCallers as It}from"./packem_shared/callSiteCallers-DArHfQSU.mjs";import{compareToBaseline as Nt,parseAdvisorMap as xt}from"./packem_shared/compareToBaseline-CUG59IOy.mjs";import{gradeFromScore as Ft}from"./packem_shared/gradeFromScore-KSt58rj1.mjs";import{MAP_VERSION as Ot,byCodepoint as Dt,scoreAdvisor as $t}from"./packem_shared/MAP_VERSION-MQ5W2B6n.mjs";import{default as Pt}from"./packem_shared/classifySensitivity-JnjaTGYi.mjs";import{fromServerSchema as qt}from"./packem_shared/fromServerSchema-fAymN8o2.mjs";const de={convex:"migrating/from-convex",firebase:"migrating/from-firebase",supabase:"migrating/from-supabase"},m={categories:["SCHEMA"],description:"A migrated-away platform's SDK is still imported from `lunora/` source. The code compiles and typechecks, so a half-finished port keeps reading from the old platform at runtime and the two stores silently drift apart.",facing:"INTERNAL",level:"WARN",name:"migration_stale_import",remediation:"Replace the call with its Lunora equivalent and drop the dependency. If the import is deliberate — a second data source you still read from — move it out of `lunora/` so it is not mistaken for an unfinished migration.",run:r=>r.staleMigrationImports===void 0?[]:r.staleMigrationImports.map(o=>a(m,{cacheKey:`migration_stale_import:${o.file}:${o.line.toString()}:${o.moduleSpecifier}`,detail:`\`${o.file}\` (line ${o.line.toString()}) still imports \`${o.moduleSpecifier}\`. Finish the port — see \`${de[o.platform]}\` — or move the import out of \`lunora/\` if you genuinely still read from ${o.platform}.`,metadata:{file:o.file,line:o.line,moduleSpecifier:o.moduleSpecifier,platform:o.platform}})),source:"static",title:"Stale migration import"},ue=new Map([["global",{level:"WARN",scope:r=>`it reads the whole D1 table "${r}" over a cross-region round trip`}],["root",{level:"WARN",scope:r=>`it loads every row of "${r}" from the root Durable Object's SQLite into memory`}],["shardBy",{level:"INFO",scope:r=>`"${r}" is \`.shardBy()\`, so this collects one shard's rows rather than the whole table — bounded by a single tenant's row count`}]]),he={level:"WARN",scope:r=>`it loads every row of "${r}"`},l={categories:["PERFORMANCE"],description:"A query calls `.collect()` with no `.withIndex()` and no `.filter()`, so it materializes every row of the table. Any live subscription over it also re-sends that whole result to every subscribed client on every write to the table.",facing:"EXTERNAL",level:"WARN",name:"unbounded_collect",remediation:'Narrow the read with `.withIndex("name", (q) => q.eq(...))`, cap it with `.take(n)`, or page it with `.paginate(args.paginationOpts)` so neither the scan nor the subscription payload grows with the table.',run:r=>{const o=[],i=ee(r.schema);for(const e of r.queries??[]){if(e.terminal!=="collect"||e.hasIndex||e.table===""||e.hasFilter)continue;const t=i.get(e.table),{level:n,scope:s}=ue.get(t??"")??he,p=re(e),f=n==="WARN"?` A live subscription over this query records a whole-table dependency, so every write to "${e.table}" re-runs it and re-sends the full result to each subscribed socket.`:" Cap it with `.take(n)` if that count can grow.";o.push(a(l,{cacheKey:`unbounded_collect:${e.file}:${e.line.toString()}:${e.table}`,detail:`Query on "${e.table}" at ${p} calls .collect() with no index and no filter — ${s(e.table)}.${f}`,level:n,metadata:{...te(e),shardKind:t??"unknown",table:e.table}}))}return o},source:"static",title:"Unbounded collect"},ge=[mo,qo,Ko,fe,pe,_o,H,B,j,G,oo,_,J,Y,z,oe,O,M,q,ne,ae,L,Jo,ce,Oo,Yo,V,Q,l,Go,go,bo,yo,io,Do,U,Io,Lo,co,uo,$,E,Fo,me,le,zo,Co,ie,eo,Bo,y,Uo,po,$o,C,No,xo,lo,A,g,b,Ro,Vo,so,D,S,w,se,fo,F,ko,K,P,I,x,W,k,T,N,ao,Eo,Mo,R,Xo,Zo,jo,Qo,ro,to,Po,X,Z,v,no,Wo,Ho,ho,Ao,So,vo,wo,To,m],be=[u,h,d],ye=[...ge,...be],yt=(r,o={})=>{const i=o.lints??ye,e=[];for(const t of i)o.source!==void 0&&t.source!==o.source||e.push(...t.run(r));return c(e)};export{ye as ALL_LINTS,Ot as MAP_VERSION,be as RUNTIME_LINTS,ge as STATIC_LINTS,g as actionFetchSsrf,b as actionWithoutErrorHandling,y as adminRouteWithoutGuard,S as aiRawRunEscapeHatch,w as aiRunWithoutLogging,v as aiToolSideEffectPromptInjection,A as aiUnboundedGenerationPublic,R as allowUnauthenticatedShardAccessEnabled,U as authApiCallWithoutHeaders,W as authCsrfCheckDisabled,T as authEmailVerificationDisabled,I as authScimWithoutTransactions,k as authSecureCookiesDisabled,N as authSessionFreshageZero,x as authTrustedOriginsWildcard,C as browserAllowPrivateTargets,F as browserUserUrlWithoutAllowlist,Dt as byCodepoint,vt as callSiteCallers,At as callSiteDescription,Rt as callSiteLabel,Ut as callSiteMetadata,M as circularFk,Pt as classifySensitivity,O as commitOrderedHardDelete,Nt as compareToBaseline,D as containerInstanceKeyFromUserInput,$ as containerOversizedInstance,E as containerPublicInternet,P as containerRuntimeEgressRelaxation,K as containerStartEnableInternetOverride,q as crossModuleTableWrite,c as dedupeCacheKeys,L as duplicateIndex,G as emptyIndex,_ as errorWithoutCatalog,z as exportSinkMisconfigured,H as externalSourceIncrementalNoDeletePath,B as externalSourceOnGlobal,j as externalSourceUnscoped,d as fanOutBreadth,V as filterOnPrimaryKey,Q as filterWithoutIndex,X as flagGatesSecurityWithUnsafeDefault,Z as flagReadInSubscription,qt as fromServerSchema,J as geoIndexFieldNotGeopoint,Y as geoIndexUnused,oo as globalTableNearColumnLimit,Ft as gradeFromScore,eo as hardcodedSecret,Wt as helperRole,u as hotShard,ro as httpActionMissingAuthGuard,to as httpActionResponseHeaderInjection,io as hyperdriveOutsideAction,no as identityUndeclaredClaimTrusted,ao as imagesUrlSourceFromUserInput,mo as indexReferencesUnknownField,h as indexUtilization,lo as insertManyUnsafeUserData,Tt as isReachableSite,so as kvUnscopedUserKeyIdor,po as mailInboundDispatchWithoutVerify,fo as mailRecipientFromRequestInput,co as maskUncoveredPiiColumn,uo as maskWeakHashStrategyOnPii,ho as maskedRelationLeakViaWith,go as mutatorFullRowReplace,bo as mutatorWithoutOwnerScope,yo as nondeterministicQueryMutation,So as normalizeIdUsedAsAuthorization,wo as notifyMissingPushConfig,vo as notifySendOutsideAction,Ao as outputProjectionMissingOnPublicRead,Ro as ownerFieldFromArgsNotAuth,xt as parseAdvisorMap,Uo as paymentCreateWithoutAuthorize,Wo as paymentWebhookWideTolerance,To as plaintextSecretInWranglerVariables,Io as policyReferencesUnknownTable,ko as privilegedDispatchUnvalidatedPayload,No as privilegedFanoutFromPublicProcedure,xo as procedureWithoutStructuredEvent,Co as publicArgumentUsesAny,Fo as publicMutationWithoutRatelimit,Mo as publicTableRlsOptoutConfusion,Oo as queueWithoutDlq,Do as r2sqlOutsideAction,$o as ratelimitDefaultMemoryStore,Eo as ratelimitKeySpoofableOrGlobal,Po as ratelimitMiddlewareFailOpen,It as readCallSiteCallers,Ko as relationReferencesUnknownField,qo as relationReferencesUnknownTable,Lo as rlsUncoveredTable,yt as runAdvisor,$t as scoreAdvisor,Go as shapeTargetsGlobalTable,_o as shapeUnknownTable,zo as signupMutationWithoutDisposableGating,Ho as softDeleteIncludeDeletedFromArgs,Bo as sqlInjectionRisk,jo as storageGenerateUploadUrlNoContentTypePin,Vo as storageKeyFromUserArgs,Qo as storagePresignedUrlForPrivateContent,Xo as storageUploadWithoutContentTypeAllowlist,Zo as storageUploadWithoutMaxSize,Jo as tableWithoutInsert,Yo as topicTooManySubscriptions,oe as ttlFieldNotTimestamp,ie as unboundedStringArgument,ne as unindexedForeignKey,ae as unindexedRelationTarget,me as unrestrictedWhereBranch,le as userCreatingMutationWithoutCaptcha,se as vectorsNamespaceFromUserInput,pe as workflowDuplicateStepName,fe as workflowUnknownTarget,ce as workflowUnused};
1
+ import{dedupeCacheKeys as c}from"./packem_shared/dedupeCacheKeys-DtBOHffV.mjs";import d from"./packem_shared/fanOutBreadth-CBtmZnoh.mjs";import u from"./packem_shared/hotShard-BwGYZ3Tq.mjs";import h from"./packem_shared/indexUtilization-CkVPZcVe.mjs";import g from"./packem_shared/actionFetchSsrf-B4ZaOBlW.mjs";import b from"./packem_shared/actionWithoutErrorHandling-4GCBT0_z.mjs";import y from"./packem_shared/adminRouteWithoutGuard-DPE7LuNh.mjs";import S from"./packem_shared/aiRawRunEscapeHatch-B5980eT9.mjs";import w from"./packem_shared/aiRunWithoutLogging-CvHHtEN9.mjs";import v from"./packem_shared/aiToolSideEffectPromptInjection-_3MrX9Ul.mjs";import A from"./packem_shared/aiUnboundedGenerationPublic-C17h6sMV.mjs";import R from"./packem_shared/allowUnauthenticatedShardAccessEnabled-BQufF5Kb.mjs";import U from"./packem_shared/authApiCallWithoutHeaders-D8U1hv8s.mjs";import W from"./packem_shared/authCsrfCheckDisabled-C6bxME5y.mjs";import T from"./packem_shared/authEmailVerificationDisabled-yROPDgn-.mjs";import I from"./packem_shared/authScimWithoutTransactions-w9qb3iBe.mjs";import k from"./packem_shared/authSecureCookiesDisabled-qrCktlch.mjs";import N from"./packem_shared/authSessionFreshageZero-BMisjIIS.mjs";import x from"./packem_shared/authTrustedOriginsWildcard-DFDpfN84.mjs";import C from"./packem_shared/browserAllowPrivateTargets-Cj5sizhv.mjs";import F from"./packem_shared/browserUserUrlWithoutAllowlist-CcK27rvt.mjs";import M from"./packem_shared/circularFk-DtcWFJxK.mjs";import O from"./packem_shared/commitOrderedHardDelete-BPdwOKA7.mjs";import D from"./packem_shared/containerInstanceKeyFromUserInput-DBdjUnQb.mjs";import $ from"./packem_shared/containerOversizedInstance-Bx89uR7E.mjs";import E from"./packem_shared/containerPublicInternet-BFfZf_P4.mjs";import P from"./packem_shared/containerRuntimeEgressRelaxation-CioCA2zY.mjs";import K from"./packem_shared/containerStartEnableInternetOverride-C6dbznku.mjs";import q from"./packem_shared/crossModuleTableWrite-DjiVTAwK.mjs";import L from"./packem_shared/duplicateIndex-Cip6-Rpu.mjs";import G from"./packem_shared/emptyIndex-BnHDcXza.mjs";import _ from"./packem_shared/errorWithoutCatalog-BTfvaXHR.mjs";import z from"./packem_shared/exportSinkMisconfigured-JfbAx9AI.mjs";import H from"./packem_shared/externalSourceIncrementalNoDeletePath-BCzm3HzF.mjs";import B from"./packem_shared/externalSourceOnGlobal-CH7xbJ49.mjs";import j from"./packem_shared/externalSourceUnscoped-BxU2uSXk.mjs";import V from"./packem_shared/filterOnPrimaryKey-DbFriOZA.mjs";import Q from"./packem_shared/filterWithoutIndex-Dc7Nn0y2.mjs";import X from"./packem_shared/flagGatesSecurityWithUnsafeDefault-DB9M6hLM.mjs";import Z from"./packem_shared/flagReadInSubscription-DabIhYGD.mjs";import J from"./packem_shared/geoIndexFieldNotGeopoint-CDMNbAfp.mjs";import Y from"./packem_shared/geoIndexUnused-D7C9Qr4U.mjs";import oo from"./packem_shared/globalTableNearColumnLimit-BFbBBd6A.mjs";import eo from"./packem_shared/hardcodedSecret-Bw_4FYrs.mjs";import ro from"./packem_shared/httpActionMissingAuthGuard-BhvcmkwW.mjs";import to from"./packem_shared/httpActionResponseHeaderInjection-DKz2SlCa.mjs";import io from"./packem_shared/hyperdriveOutsideAction-CPDdGP2g.mjs";import no from"./packem_shared/identityUndeclaredClaimTrusted-CAUagXkJ.mjs";import ao from"./packem_shared/imagesUrlSourceFromUserInput-C2CJTTCI.mjs";import mo from"./packem_shared/indexReferencesUnknownField-Dm8SL4Tp.mjs";import lo from"./packem_shared/insertManyUnsafeUserData-DWE8d_DF.mjs";import so from"./packem_shared/kvUnscopedUserKeyIdor-CXFKAyM2.mjs";import po from"./packem_shared/mailInboundDispatchWithoutVerify-CWwqXyPX.mjs";import fo from"./packem_shared/mailRecipientFromRequestInput-CQZeOsP9.mjs";import co from"./packem_shared/maskUncoveredPiiColumn-axEka4nd.mjs";import uo from"./packem_shared/maskWeakHashStrategyOnPii-njstapQY.mjs";import ho from"./packem_shared/maskedRelationLeakViaWith-CIFij6vE.mjs";import{e as a}from"./packem_shared/finding-NrKO8idM.mjs";import go from"./packem_shared/mutatorFullRowReplace-BzRpZ47r.mjs";import bo from"./packem_shared/mutatorWithoutOwnerScope-BoS81ns0.mjs";import yo from"./packem_shared/nondeterministicQueryMutation-sxmixc0l.mjs";import So from"./packem_shared/normalizeIdUsedAsAuthorization-BXN-Can6.mjs";import wo from"./packem_shared/notifyMissingPushConfig-DeQMoNwm.mjs";import vo from"./packem_shared/notifySendOutsideAction-BJrDkr4h.mjs";import Ao from"./packem_shared/outputProjectionMissingOnPublicRead-DHivs_73.mjs";import Ro from"./packem_shared/ownerFieldFromArgsNotAuth-BFNc023N.mjs";import Uo from"./packem_shared/paymentCreateWithoutAuthorize-CICGmRFR.mjs";import Wo from"./packem_shared/paymentWebhookWideTolerance-CtZb2AVA.mjs";import To from"./packem_shared/plaintextSecretInWranglerVariables-bNkqmNqV.mjs";import Io from"./packem_shared/policyReferencesUnknownTable-CIKuRZ5Y.mjs";import ko from"./packem_shared/privilegedDispatchUnvalidatedPayload-DhXa36mM.mjs";import No from"./packem_shared/privilegedFanoutFromPublicProcedure-DV188gHQ.mjs";import xo from"./packem_shared/procedureWithoutStructuredEvent-CZ_B23nM.mjs";import Co from"./packem_shared/publicArgumentUsesAny-BDEvMA8Q.mjs";import Fo from"./packem_shared/publicMutationWithoutRatelimit-BeYapu1F.mjs";import Mo from"./packem_shared/publicTableRlsOptoutConfusion-BFmh1kH0.mjs";import Oo from"./packem_shared/queueWithoutDlq-BvHz3Opg.mjs";import Do from"./packem_shared/r2sqlOutsideAction-BdLiLOAX.mjs";import $o from"./packem_shared/ratelimitDefaultMemoryStore-Dj0Kk7t9.mjs";import Eo from"./packem_shared/ratelimitKeySpoofableOrGlobal-DlvJfSXs.mjs";import Po from"./packem_shared/ratelimitMiddlewareFailOpen-DGtyt-pc.mjs";import Ko from"./packem_shared/relationReferencesUnknownField-CqGEJD57.mjs";import qo from"./packem_shared/relationReferencesUnknownTable-CP4aWtAJ.mjs";import Lo from"./packem_shared/rlsUncoveredTable-CZ4ie4gX.mjs";import Go from"./packem_shared/shapeTargetsGlobalTable-Bu3eEDic.mjs";import _o from"./packem_shared/shapeUnknownTable-CREfNnWi.mjs";import zo from"./packem_shared/signupMutationWithoutDisposableGating-CFtFMJz8.mjs";import Ho from"./packem_shared/softDeleteIncludeDeletedFromArgs-C7Ugg4zb.mjs";import Bo from"./packem_shared/sqlInjectionRisk-y-7c46LJ.mjs";import jo from"./packem_shared/storageGenerateUploadUrlNoContentTypePin-Bx9oGOjM.mjs";import Vo from"./packem_shared/storageKeyFromUserArgs-BryKJJM-.mjs";import Qo from"./packem_shared/storagePresignedUrlForPrivateContent-lqE6LvNu.mjs";import Xo from"./packem_shared/storageUploadWithoutContentTypeAllowlist-DMr7w29r.mjs";import Zo from"./packem_shared/storageUploadWithoutMaxSize-rSNFNb2l.mjs";import Jo from"./packem_shared/tableWithoutInsert-ClJp_jDr.mjs";import Yo from"./packem_shared/topicTooManySubscriptions-CiZhFm9r.mjs";import oe from"./packem_shared/ttlFieldNotTimestamp-Dxa-6RfM.mjs";import{s as ee,q as re,c as te}from"./packem_shared/helpers-BmppB5nL.mjs";import ie from"./packem_shared/unboundedStringArgument-jZnCbwB0.mjs";import ne from"./packem_shared/unindexedForeignKey-Dypgn8uH.mjs";import ae from"./packem_shared/unindexedRelationTarget-CSqRJWYZ.mjs";import me from"./packem_shared/unrestrictedWhereBranch-CcIBmHik.mjs";import le from"./packem_shared/userCreatingMutationWithoutCaptcha-C8yaqIIj.mjs";import se from"./packem_shared/vectorsNamespaceFromUserInput-7I_Kwxvp.mjs";import pe from"./packem_shared/workflowDuplicateStepName-B6eAJzwA.mjs";import fe from"./packem_shared/workflowUnknownTarget-Cm1hfTTs.mjs";import ce from"./packem_shared/workflowUnused-DHwwE-1P.mjs";import{callSiteCallers as vt,callSiteDescription as At,callSiteLabel as Rt,callSiteMetadata as Ut,helperRole as Wt,isReachableSite as Tt,readCallSiteCallers as It}from"./packem_shared/callSiteCallers-DArHfQSU.mjs";import{compareToBaseline as Nt,parseAdvisorMap as xt}from"./packem_shared/compareToBaseline-CUG59IOy.mjs";import{gradeFromScore as Ft}from"./packem_shared/gradeFromScore-KSt58rj1.mjs";import{MAP_VERSION as Ot,byCodepoint as Dt,scoreAdvisor as $t}from"./packem_shared/MAP_VERSION-MQ5W2B6n.mjs";import{default as Pt}from"./packem_shared/classifySensitivity-JnjaTGYi.mjs";import{fromServerSchema as qt}from"./packem_shared/fromServerSchema-fAymN8o2.mjs";const de={convex:"migrating/from-convex",firebase:"migrating/from-firebase",supabase:"migrating/from-supabase"},m={categories:["SCHEMA"],description:"A migrated-away platform's SDK is still imported from `lunora/` source. The code compiles and typechecks, so a half-finished port keeps reading from the old platform at runtime and the two stores silently drift apart.",facing:"INTERNAL",level:"WARN",name:"migration_stale_import",remediation:"Replace the call with its Lunora equivalent and drop the dependency. If the import is deliberate — a second data source you still read from — move it out of `lunora/` so it is not mistaken for an unfinished migration.",run:r=>r.staleMigrationImports===void 0?[]:r.staleMigrationImports.map(o=>a(m,{cacheKey:`migration_stale_import:${o.file}:${o.line.toString()}:${o.moduleSpecifier}`,detail:`\`${o.file}\` (line ${o.line.toString()}) still imports \`${o.moduleSpecifier}\`. Finish the port — see \`${de[o.platform]}\` — or move the import out of \`lunora/\` if you genuinely still read from ${o.platform}.`,metadata:{file:o.file,line:o.line,moduleSpecifier:o.moduleSpecifier,platform:o.platform}})),source:"static",title:"Stale migration import"},ue=new Map([["global",{level:"WARN",scope:r=>`it reads the whole D1 table "${r}" over a cross-region round trip`}],["root",{level:"WARN",scope:r=>`it loads every row of "${r}" from the root Durable Object's SQLite into memory`}],["shardBy",{level:"INFO",scope:r=>`"${r}" is \`.shardBy()\`, so this collects one shard's rows rather than the whole table — bounded by a single tenant's row count`}]]),he={level:"WARN",scope:r=>`it loads every row of "${r}"`},l={categories:["PERFORMANCE"],description:"A query calls `.collect()` with no `.withIndex()` and no `.filter()`, so it materializes every row of the table. Any live subscription over it also re-sends that whole result to every subscribed client on every write to the table.",facing:"EXTERNAL",level:"WARN",name:"unbounded_collect",remediation:'Narrow the read with `.withIndex("name", (q) => q.eq(...))`, cap it with `.take(n)`, or page it with `.paginate(args.paginationOpts)` so neither the scan nor the subscription payload grows with the table.',run:r=>{const o=[],i=ee(r.schema);for(const e of r.queries??[]){if(e.terminal!=="collect"||e.hasIndex||e.table===""||e.hasFilter)continue;const t=i.get(e.table),{level:n,scope:s}=ue.get(t??"")??he,p=re(e),f=n==="WARN"?` A live subscription over this query records a whole-table dependency, so every write to "${e.table}" re-runs it and re-sends the full result to each subscribed socket.`:" Cap it with `.take(n)` if that count can grow.";o.push(a(l,{cacheKey:`unbounded_collect:${e.file}:${e.line.toString()}:${e.table}`,detail:`Query on "${e.table}" at ${p} calls .collect() with no index and no filter — ${s(e.table)}.${f}`,level:n,metadata:{...te(e),shardKind:t??"unknown",table:e.table}}))}return o},source:"static",title:"Unbounded collect"},ge=[mo,qo,Ko,fe,pe,_o,H,B,j,G,oo,_,J,Y,z,oe,O,M,q,ne,ae,L,Jo,ce,Oo,Yo,V,Q,l,Go,go,bo,yo,io,Do,U,Io,Lo,co,uo,$,E,Fo,me,le,zo,Co,ie,eo,Bo,y,Uo,po,$o,C,No,xo,lo,A,g,b,Ro,Vo,so,D,S,w,se,fo,F,ko,K,P,I,x,W,k,T,N,ao,Eo,Mo,R,Xo,Zo,jo,Qo,ro,to,Po,X,Z,v,no,Wo,Ho,ho,Ao,So,vo,wo,To,m],be=[u,h,d],ye=[...ge,...be],yt=(r,o={})=>{const i=o.lints??ye,e=[];for(const t of i)o.source!==void 0&&t.source!==o.source||e.push(...t.run(r));return c(e)};export{ye as ALL_LINTS,Ot as MAP_VERSION,be as RUNTIME_LINTS,ge as STATIC_LINTS,g as actionFetchSsrf,b as actionWithoutErrorHandling,y as adminRouteWithoutGuard,S as aiRawRunEscapeHatch,w as aiRunWithoutLogging,v as aiToolSideEffectPromptInjection,A as aiUnboundedGenerationPublic,R as allowUnauthenticatedShardAccessEnabled,U as authApiCallWithoutHeaders,W as authCsrfCheckDisabled,T as authEmailVerificationDisabled,I as authScimWithoutTransactions,k as authSecureCookiesDisabled,N as authSessionFreshageZero,x as authTrustedOriginsWildcard,C as browserAllowPrivateTargets,F as browserUserUrlWithoutAllowlist,Dt as byCodepoint,vt as callSiteCallers,At as callSiteDescription,Rt as callSiteLabel,Ut as callSiteMetadata,M as circularFk,Pt as classifySensitivity,O as commitOrderedHardDelete,Nt as compareToBaseline,D as containerInstanceKeyFromUserInput,$ as containerOversizedInstance,E as containerPublicInternet,P as containerRuntimeEgressRelaxation,K as containerStartEnableInternetOverride,q as crossModuleTableWrite,c as dedupeCacheKeys,L as duplicateIndex,G as emptyIndex,_ as errorWithoutCatalog,z as exportSinkMisconfigured,H as externalSourceIncrementalNoDeletePath,B as externalSourceOnGlobal,j as externalSourceUnscoped,d as fanOutBreadth,V as filterOnPrimaryKey,Q as filterWithoutIndex,X as flagGatesSecurityWithUnsafeDefault,Z as flagReadInSubscription,qt as fromServerSchema,J as geoIndexFieldNotGeopoint,Y as geoIndexUnused,oo as globalTableNearColumnLimit,Ft as gradeFromScore,eo as hardcodedSecret,Wt as helperRole,u as hotShard,ro as httpActionMissingAuthGuard,to as httpActionResponseHeaderInjection,io as hyperdriveOutsideAction,no as identityUndeclaredClaimTrusted,ao as imagesUrlSourceFromUserInput,mo as indexReferencesUnknownField,h as indexUtilization,lo as insertManyUnsafeUserData,Tt as isReachableSite,so as kvUnscopedUserKeyIdor,po as mailInboundDispatchWithoutVerify,fo as mailRecipientFromRequestInput,co as maskUncoveredPiiColumn,uo as maskWeakHashStrategyOnPii,ho as maskedRelationLeakViaWith,go as mutatorFullRowReplace,bo as mutatorWithoutOwnerScope,yo as nondeterministicQueryMutation,So as normalizeIdUsedAsAuthorization,wo as notifyMissingPushConfig,vo as notifySendOutsideAction,Ao as outputProjectionMissingOnPublicRead,Ro as ownerFieldFromArgsNotAuth,xt as parseAdvisorMap,Uo as paymentCreateWithoutAuthorize,Wo as paymentWebhookWideTolerance,To as plaintextSecretInWranglerVariables,Io as policyReferencesUnknownTable,ko as privilegedDispatchUnvalidatedPayload,No as privilegedFanoutFromPublicProcedure,xo as procedureWithoutStructuredEvent,Co as publicArgumentUsesAny,Fo as publicMutationWithoutRatelimit,Mo as publicTableRlsOptoutConfusion,Oo as queueWithoutDlq,Do as r2sqlOutsideAction,$o as ratelimitDefaultMemoryStore,Eo as ratelimitKeySpoofableOrGlobal,Po as ratelimitMiddlewareFailOpen,It as readCallSiteCallers,Ko as relationReferencesUnknownField,qo as relationReferencesUnknownTable,Lo as rlsUncoveredTable,yt as runAdvisor,$t as scoreAdvisor,Go as shapeTargetsGlobalTable,_o as shapeUnknownTable,zo as signupMutationWithoutDisposableGating,Ho as softDeleteIncludeDeletedFromArgs,Bo as sqlInjectionRisk,jo as storageGenerateUploadUrlNoContentTypePin,Vo as storageKeyFromUserArgs,Qo as storagePresignedUrlForPrivateContent,Xo as storageUploadWithoutContentTypeAllowlist,Zo as storageUploadWithoutMaxSize,Jo as tableWithoutInsert,Yo as topicTooManySubscriptions,oe as ttlFieldNotTimestamp,ie as unboundedStringArgument,ne as unindexedForeignKey,ae as unindexedRelationTarget,me as unrestrictedWhereBranch,le as userCreatingMutationWithoutCaptcha,se as vectorsNamespaceFromUserInput,pe as workflowDuplicateStepName,fe as workflowUnknownTarget,ce as workflowUnused};
@@ -0,0 +1 @@
1
+ import{m as t}from"./argument-derived-sink-DLXFC79t.mjs";import{c as s,a as o}from"./helpers-BmppB5nL.mjs";const n=t({cacheKey:e=>`browser_user_url_without_allowlist:${e.file}:${e.line.toString()}`,categories:["SECURITY"],description:"A `ctx.browser.<method>(url, …)` call navigates to a URL derived from the handler's `args` with no server-side scoping, and no `createBrowser` allowlist contains it. The default guard blocks private targets but not arbitrary public URLs, so any caller can make the headless browser an open-proxy / SSRF tool (fetch arbitrary third-party URLs, DNS-rebind to internal hosts).",detail:e=>`\`ctx.browser.${e.method}\` in ${o(e)} navigates to a URL derived from \`args\` with no server-side scoping, and no \`createBrowser\` allowlist contains it — the default guard blocks private targets but not arbitrary public URLs, so any caller can turn the headless browser into an open-proxy / SSRF tool. Pin \`allowedHosts\` on \`createBrowser({...})\` (Browser Run enforces it on the session), and derive the URL from server-trusted state where possible.`,facing:"EXTERNAL",getAccesses:e=>e.browserUrlAccesses,level:"WARN",metadata:e=>({...s(e),method:e.method}),name:"browser_user_url_without_allowlist",remediation:"Pin the browser with an `allowedHosts` allowlist on `createBrowser({...})` — Browser Run enforces it on the session, which makes it the supported production posture — and derive the navigation URL from server-trusted state where possible rather than passing `args` straight to `ctx.browser`.",suppressWhen:e=>(e.configCalls??[]).some(r=>r.callee==="createBrowser"&&r.analyzable&&r.presentKeys.includes("allowedHosts")),title:"Browser navigates to arg-derived URL with no allowlist"});export{n as default};
@@ -0,0 +1 @@
1
+ import{callSiteMetadata as n}from"./callSiteCallers-DArHfQSU.mjs";import{e as l}from"./finding-NrKO8idM.mjs";import{a as d}from"./helpers-BmppB5nL.mjs";const u=/\/index$/u,h=/[^\dA-Za-z]/gu,i=t=>t.replace(u,"").replaceAll(h,"_"),c={categories:["SECURITY"],description:"A `defineQueue`/`defineWorkflow` handler forwards its untrusted payload (queue body / workflow params) straight into a `ctx.run` dispatch whose target is RLS-gated. The handler runs under the system identity with RLS disabled, so the target's row policy — the only thing guarding it — is bypassed, letting a caller act as any user / write across tenants.",facing:"EXTERNAL",level:"ERROR",name:"privileged_dispatch_unvalidated_payload",remediation:"Don't forward an unchecked queue body / workflow param into an RLS-gated function. Re-derive the ownership/identity keys from server-trusted state (or an argument you validate against it) before dispatching, or route the work through a function that re-checks the caller's identity rather than relying on the row policy the privileged handler skips.",run:t=>{if(t.privilegedDispatches===void 0)return[];const s=t.rlsProcedures??[],o=(e,a)=>s.some(r=>r.usesRls&&i(r.file)===i(e)&&r.exportName===a);return t.privilegedDispatches.filter(e=>o(e.targetFile,e.targetExport)).map(e=>{const a=e.dispatchKind==="queue"?"queue":"workflow",r=e.dispatchKind==="queue"?"queue message body":"workflow params";return l(c,{cacheKey:`privileged_dispatch_unvalidated_payload:${e.file}:${e.line.toString()}`,detail:`The ${a} handler ${d(e)} forwards its untrusted ${r} straight into \`${e.targetFile}.${e.targetExport}\`, which is guarded by \`.use(rls(...))\`. The handler runs under the system identity with RLS disabled, so the target's row policy is bypassed — any ownership/identity field the payload controls lets a caller act as another user or write across tenants. Re-derive the identity keys from server-trusted state before dispatching, or route through a function that re-checks the caller.`,metadata:{dispatchKind:e.dispatchKind,file:e.file,...n(e.scope),line:e.line,targetExport:e.targetExport,targetFile:e.targetFile}})})},source:"static",title:"Privileged handler forwards untrusted payload into an RLS-gated function"};export{c as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/advisor",
3
- "version": "1.0.0-alpha.197",
3
+ "version": "1.0.0-alpha.199",
4
4
  "description": "Schema & query lints (splinter-style advisors) for Lunora, feeding the Studio Advisors view",
5
5
  "keywords": [
6
6
  "advisor",
@@ -46,8 +46,8 @@
46
46
  "access": "public"
47
47
  },
48
48
  "dependencies": {
49
- "@lunora/errors": "1.0.0-alpha.50",
50
- "@lunora/server": "1.0.0-alpha.184"
49
+ "@lunora/errors": "1.0.0-alpha.51",
50
+ "@lunora/server": "1.0.0-alpha.185"
51
51
  },
52
52
  "engines": {
53
53
  "node": "^22.15.0 || >=24.11.0"
@@ -1 +0,0 @@
1
- import{m as t}from"./argument-derived-sink-DLXFC79t.mjs";import{c as s,a as o}from"./helpers-BmppB5nL.mjs";const l=t({cacheKey:e=>`browser_user_url_without_allowlist:${e.file}:${e.line.toString()}`,categories:["SECURITY"],description:"A `ctx.browser.<method>(url, …)` call navigates to a URL derived from the handler's `args` with no server-side scoping, and no `createBrowser` allowlist contains it. The default guard blocks private targets but not arbitrary public URLs, so any caller can make the headless browser an open-proxy / SSRF tool (fetch arbitrary third-party URLs, DNS-rebind to internal hosts).",detail:e=>`\`ctx.browser.${e.method}\` in ${o(e)} navigates to a URL derived from \`args\` with no server-side scoping, and no \`createBrowser\` allowlist contains it — the default guard blocks private targets but not arbitrary public URLs, so any caller can turn the headless browser into an open-proxy / SSRF tool. Pin \`allowedHosts\` (and/or \`resolveDns\`) on \`createBrowser({...})\`, and derive the URL from server-trusted state where possible.`,facing:"EXTERNAL",getAccesses:e=>e.browserUrlAccesses,level:"WARN",metadata:e=>({...s(e),method:e.method}),name:"browser_user_url_without_allowlist",remediation:"Pin the browser with an `allowedHosts` allowlist (and/or `resolveDns`) on `createBrowser({...})`, and derive the navigation URL from server-trusted state where possible rather than passing `args` straight to `ctx.browser`.",suppressWhen:e=>(e.configCalls??[]).some(r=>r.callee==="createBrowser"&&r.analyzable&&(r.presentKeys.includes("allowedHosts")||r.trueKeys.includes("resolveDns"))),title:"Browser navigates to arg-derived URL with no allowlist"});export{l as default};
@@ -1 +0,0 @@
1
- import{callSiteMetadata as o}from"./callSiteCallers-DArHfQSU.mjs";import{e as n}from"./finding-NrKO8idM.mjs";import{a as l}from"./helpers-BmppB5nL.mjs";const d={categories:["SECURITY"],description:"A `defineQueue`/`defineWorkflow` handler forwards its untrusted payload (queue body / workflow params) straight into a `ctx.run` dispatch whose target is RLS-gated. The handler runs under the system identity with RLS disabled, so the target's row policy — the only thing guarding it — is bypassed, letting a caller act as any user / write across tenants.",facing:"EXTERNAL",level:"ERROR",name:"privileged_dispatch_unvalidated_payload",remediation:"Don't forward an unchecked queue body / workflow param into an RLS-gated function. Re-derive the ownership/identity keys from server-trusted state (or an argument you validate against it) before dispatching, or route the work through a function that re-checks the caller's identity rather than relying on the row policy the privileged handler skips.",run:r=>{if(r.privilegedDispatches===void 0)return[];const i=r.rlsProcedures??[],s=(e,a)=>i.some(t=>t.usesRls&&t.file===e&&t.exportName===a);return r.privilegedDispatches.filter(e=>s(e.targetFile,e.targetExport)).map(e=>{const a=e.dispatchKind==="queue"?"queue":"workflow",t=e.dispatchKind==="queue"?"queue message body":"workflow params";return n(d,{cacheKey:`privileged_dispatch_unvalidated_payload:${e.file}:${e.line.toString()}`,detail:`The ${a} handler ${l(e)} forwards its untrusted ${t} straight into \`${e.targetFile}.${e.targetExport}\`, which is guarded by \`.use(rls(...))\`. The handler runs under the system identity with RLS disabled, so the target's row policy is bypassed — any ownership/identity field the payload controls lets a caller act as another user or write across tenants. Re-derive the identity keys from server-trusted state before dispatching, or route through a function that re-checks the caller.`,metadata:{dispatchKind:e.dispatchKind,file:e.file,...o(e.scope),line:e.line,targetExport:e.targetExport,targetFile:e.targetFile}})})},source:"static",title:"Privileged handler forwards untrusted payload into an RLS-gated function"};export{d as default};