@lunora/advisor 1.0.0-alpha.56 → 1.0.0-alpha.58
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 +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/filterOnPrimaryKey-CPPa7fog.mjs +1 -0
- package/dist/packem_shared/filterWithoutIndex-DYLs-Jf2.mjs +1 -0
- package/dist/packem_shared/ownerFieldFromArgsNotAuth-D4K-_0aD.mjs +1 -0
- package/package.json +2 -2
- package/dist/packem_shared/filterWithoutIndex-yd1N-GQ0.mjs +0 -1
- package/dist/packem_shared/ownerFieldFromArgsNotAuth-BoR9vvst.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -813,6 +813,13 @@ interface AdvisorOwnerFieldWrite {
|
|
|
813
813
|
line: number;
|
|
814
814
|
/** The `ctx.db` write method (`insert` / `replace` / `patch` / `insertManyUnsafe`). */
|
|
815
815
|
method: string;
|
|
816
|
+
/**
|
|
817
|
+
* Visibility of the enclosing procedure. `internal` procedures are not
|
|
818
|
+
* reachable by a caller, so the "any caller can act as any user" premise
|
|
819
|
+
* does not hold there and the finding drops to `INFO`. `undefined` when the
|
|
820
|
+
* feeder could not attribute the write to a registered procedure.
|
|
821
|
+
*/
|
|
822
|
+
visibility?: "internal" | "public";
|
|
816
823
|
}
|
|
817
824
|
/**
|
|
818
825
|
* One payment webhook-adapter construction (`createStripeAdapter` /
|
|
@@ -950,6 +957,13 @@ interface AdvisorQueryRead {
|
|
|
950
957
|
exportName?: string;
|
|
951
958
|
/** Source file the read appears in (relative to the lunora dir, no extension). */
|
|
952
959
|
file: string;
|
|
960
|
+
/**
|
|
961
|
+
* True when the chain's `.filter()` predicate compares `_id`
|
|
962
|
+
* (`(d) => d._id === args.id`) — a full scan for a row that `ctx.db.get`
|
|
963
|
+
* addresses directly. Optional so a feeder predating this field still
|
|
964
|
+
* typechecks; absent is treated as "not a primary-key filter".
|
|
965
|
+
*/
|
|
966
|
+
filtersPrimaryKey?: boolean;
|
|
953
967
|
/** True when the chain calls `.filter(...)`. */
|
|
954
968
|
hasFilter: boolean;
|
|
955
969
|
/** True when the chain narrows with `.withIndex(...)` or `.withSearchIndex(...)`. */
|
|
@@ -2842,6 +2856,26 @@ declare const externalSourceOnGlobal: Lint;
|
|
|
2842
2856
|
* sourced declaration, or one not sharded, is skipped.
|
|
2843
2857
|
*/
|
|
2844
2858
|
declare const externalSourceUnscoped: Lint;
|
|
2859
|
+
/**
|
|
2860
|
+
* Flags `ctx.db.query("t").filter((d) => d._id === x)` — a full scan for a row
|
|
2861
|
+
* that is directly addressable.
|
|
2862
|
+
*
|
|
2863
|
+
* Unlike `filter_without_index`, this is never a judgement call. `_id` is the
|
|
2864
|
+
* primary key: `ctx.db.get(x)` fetches the row by rowid, while the filter form
|
|
2865
|
+
* walks the table comparing every `_id` until it matches. There is no schema
|
|
2866
|
+
* shape, table size, or access pattern under which the scan is the right
|
|
2867
|
+
* choice, so the fix is mechanical and the finding needs no triage.
|
|
2868
|
+
*
|
|
2869
|
+
* Split out from `filter_without_index` because that rule fires on a spectrum —
|
|
2870
|
+
* some of its findings are fine, some want an index, and the reader has to
|
|
2871
|
+
* decide. Folding an always-wrong case into a sometimes-wrong rule buries it
|
|
2872
|
+
* (found while reviewing eight `filter_without_index`
|
|
2873
|
+
* findings, one of which was this and strictly worse than the rest).
|
|
2874
|
+
*
|
|
2875
|
+
* Runs only when the codegen feeder supplies query evidence; a runtime caller
|
|
2876
|
+
* flags nothing.
|
|
2877
|
+
*/
|
|
2878
|
+
declare const filterOnPrimaryKey: Lint;
|
|
2845
2879
|
/**
|
|
2846
2880
|
* Flags a query read that calls `.filter()` without first narrowing with
|
|
2847
2881
|
* `.withIndex()` / `.withSearchIndex()`. Such a read loads *every* row of the
|
|
@@ -4349,4 +4383,4 @@ interface RunAdvisorOptions {
|
|
|
4349
4383
|
* `static` lints at build time and defer `runtime` lints to a live shard.
|
|
4350
4384
|
*/
|
|
4351
4385
|
declare const runAdvisor: (context: LintContext, options?: RunAdvisorOptions) => Finding[];
|
|
4352
|
-
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 AdvisorExportSink, type AdvisorFailOpenGuard, type AdvisorFlagSecurityDefault, type AdvisorGeoIndexUsage, type AdvisorHttpActionGuard, type AdvisorHttpHeaderWrite, type AdvisorHyperdriveCall, type AdvisorIdentityClaimRead, type AdvisorImageDeliveryUrlAccess, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorKvKeyAccess, type AdvisorMailRecipientAccess, type AdvisorMap, type AdvisorMaskProcedure, type AdvisorMaskStrategy, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorNormalizeIdAuthorization, type AdvisorNotifyCall, type AdvisorNotifyConfig, type AdvisorOwnerFieldWrite, type AdvisorPaymentWebhook, type AdvisorPrivilegedDispatch, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorQueue, type AdvisorQueueTuning, 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 BaselineComparison, type Category, type CheckResult, type Coverage, type Facing, type Finding, type Grade, type Level, type Lint, type LintContext, type LintSource, MAP_VERSION, type MapSummary, type ProcedureDelta, type ProcedureScore, type ProjectScore, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, type ScoreAdvisorOptions, type Sensitivity, type SensitivityLevel, actionFetchSsrf, actionWithoutErrorHandling, adminRouteWithoutGuard, aiRawRunEscapeHatch, aiRunWithoutLogging, aiToolSideEffectPromptInjection, aiUnboundedGenerationPublic, allowUnauthenticatedShardAccessEnabled, authApiCallWithoutHeaders, authCsrfCheckDisabled, authEmailVerificationDisabled, authScimWithoutTransactions, authSecureCookiesDisabled, authSessionFreshageZero, authTrustedOriginsWildcard, browserAllowPrivateTargets, browserUserUrlWithoutAllowlist, byCodepoint, circularFk, classifySensitivity, compareToBaseline, constraintValidator, containerInstanceKeyFromUserInput, containerOversizedInstance, containerPublicInternet, containerRuntimeEgressRelaxation, containerStartEnableInternetOverride, dedupeCacheKeys, duplicateIndex, emptyIndex, errorWithoutCatalog, exportSinkMisconfigured, externalSourceIncrementalNoDeletePath, externalSourceOnGlobal, externalSourceUnscoped, filterWithoutIndex, flagGatesSecurityWithUnsafeDefault, fromServerSchema, geoIndexFieldNotGeopoint, geoIndexUnused, gradeFromScore, hardcodedSecret, hotShard, httpActionMissingAuthGuard, httpActionResponseHeaderInjection, hyperdriveOutsideAction, identityUndeclaredClaimTrusted, imagesUrlSourceFromUserInput, indexReferencesUnknownField, indexUtilization, insertManyUnsafeUserData, kvUnscopedUserKeyIdor, loadAnalyticsRuntimeMetrics, mailInboundDispatchWithoutVerify, mailRecipientFromRequestInput, maskUncoveredPiiColumn, maskWeakHashStrategyOnPii, maskedRelationLeakViaWith, mutatorFullRowReplace, nondeterministicQueryMutation, normalizeIdUsedAsAuthorization, notifyMissingPushConfig, notifySendOutsideAction, outputProjectionMissingOnPublicRead, ownerFieldFromArgsNotAuth, parseAdvisorMap, paymentCreateWithoutAuthorize, paymentWebhookWideTolerance, plaintextSecretInWranglerVariables, policyReferencesUnknownTable, privilegedDispatchUnvalidatedPayload, privilegedFanoutFromPublicProcedure, procedureWithoutStructuredEvent, publicArgumentUsesAny, publicMutationWithoutRatelimit, publicTableRlsOptoutConfusion, queueWithoutDlq, r2sqlOutsideAction, ratelimitDefaultMemoryStore, ratelimitKeySpoofableOrGlobal, ratelimitMiddlewareFailOpen, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, scoreAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, signupMutationWithoutDisposableGating, softDeleteIncludeDeletedFromArgs, sqlInjectionRisk, storageGenerateUploadUrlNoContentTypePin, storageKeyFromUserArgs, storagePresignedUrlForPrivateContent, storageUploadWithoutContentTypeAllowlist, storageUploadWithoutMaxSize, tableWithoutInsert, ttlFieldNotTimestamp, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, unrestrictedWhereBranch, userCreatingMutationWithoutCaptcha, vectorsNamespaceFromUserInput, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };
|
|
4386
|
+
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 AdvisorExportSink, type AdvisorFailOpenGuard, type AdvisorFlagSecurityDefault, type AdvisorGeoIndexUsage, type AdvisorHttpActionGuard, type AdvisorHttpHeaderWrite, type AdvisorHyperdriveCall, type AdvisorIdentityClaimRead, type AdvisorImageDeliveryUrlAccess, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorKvKeyAccess, type AdvisorMailRecipientAccess, type AdvisorMap, type AdvisorMaskProcedure, type AdvisorMaskStrategy, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorNormalizeIdAuthorization, type AdvisorNotifyCall, type AdvisorNotifyConfig, type AdvisorOwnerFieldWrite, type AdvisorPaymentWebhook, type AdvisorPrivilegedDispatch, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorQueue, type AdvisorQueueTuning, 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 BaselineComparison, type Category, type CheckResult, type Coverage, type Facing, type Finding, type Grade, type Level, type Lint, type LintContext, type LintSource, MAP_VERSION, type MapSummary, type ProcedureDelta, type ProcedureScore, type ProjectScore, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, type ScoreAdvisorOptions, type Sensitivity, type SensitivityLevel, actionFetchSsrf, actionWithoutErrorHandling, adminRouteWithoutGuard, aiRawRunEscapeHatch, aiRunWithoutLogging, aiToolSideEffectPromptInjection, aiUnboundedGenerationPublic, allowUnauthenticatedShardAccessEnabled, authApiCallWithoutHeaders, authCsrfCheckDisabled, authEmailVerificationDisabled, authScimWithoutTransactions, authSecureCookiesDisabled, authSessionFreshageZero, authTrustedOriginsWildcard, browserAllowPrivateTargets, browserUserUrlWithoutAllowlist, byCodepoint, circularFk, classifySensitivity, compareToBaseline, constraintValidator, containerInstanceKeyFromUserInput, containerOversizedInstance, containerPublicInternet, containerRuntimeEgressRelaxation, containerStartEnableInternetOverride, dedupeCacheKeys, duplicateIndex, emptyIndex, errorWithoutCatalog, exportSinkMisconfigured, externalSourceIncrementalNoDeletePath, externalSourceOnGlobal, externalSourceUnscoped, filterOnPrimaryKey, filterWithoutIndex, flagGatesSecurityWithUnsafeDefault, fromServerSchema, geoIndexFieldNotGeopoint, geoIndexUnused, gradeFromScore, hardcodedSecret, hotShard, httpActionMissingAuthGuard, httpActionResponseHeaderInjection, hyperdriveOutsideAction, identityUndeclaredClaimTrusted, imagesUrlSourceFromUserInput, indexReferencesUnknownField, indexUtilization, insertManyUnsafeUserData, kvUnscopedUserKeyIdor, loadAnalyticsRuntimeMetrics, mailInboundDispatchWithoutVerify, mailRecipientFromRequestInput, maskUncoveredPiiColumn, maskWeakHashStrategyOnPii, maskedRelationLeakViaWith, mutatorFullRowReplace, nondeterministicQueryMutation, normalizeIdUsedAsAuthorization, notifyMissingPushConfig, notifySendOutsideAction, outputProjectionMissingOnPublicRead, ownerFieldFromArgsNotAuth, parseAdvisorMap, paymentCreateWithoutAuthorize, paymentWebhookWideTolerance, plaintextSecretInWranglerVariables, policyReferencesUnknownTable, privilegedDispatchUnvalidatedPayload, privilegedFanoutFromPublicProcedure, procedureWithoutStructuredEvent, publicArgumentUsesAny, publicMutationWithoutRatelimit, publicTableRlsOptoutConfusion, queueWithoutDlq, r2sqlOutsideAction, ratelimitDefaultMemoryStore, ratelimitKeySpoofableOrGlobal, ratelimitMiddlewareFailOpen, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, scoreAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, signupMutationWithoutDisposableGating, softDeleteIncludeDeletedFromArgs, sqlInjectionRisk, storageGenerateUploadUrlNoContentTypePin, storageKeyFromUserArgs, storagePresignedUrlForPrivateContent, storageUploadWithoutContentTypeAllowlist, storageUploadWithoutMaxSize, tableWithoutInsert, ttlFieldNotTimestamp, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, unrestrictedWhereBranch, userCreatingMutationWithoutCaptcha, vectorsNamespaceFromUserInput, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };
|
package/dist/index.d.ts
CHANGED
|
@@ -813,6 +813,13 @@ interface AdvisorOwnerFieldWrite {
|
|
|
813
813
|
line: number;
|
|
814
814
|
/** The `ctx.db` write method (`insert` / `replace` / `patch` / `insertManyUnsafe`). */
|
|
815
815
|
method: string;
|
|
816
|
+
/**
|
|
817
|
+
* Visibility of the enclosing procedure. `internal` procedures are not
|
|
818
|
+
* reachable by a caller, so the "any caller can act as any user" premise
|
|
819
|
+
* does not hold there and the finding drops to `INFO`. `undefined` when the
|
|
820
|
+
* feeder could not attribute the write to a registered procedure.
|
|
821
|
+
*/
|
|
822
|
+
visibility?: "internal" | "public";
|
|
816
823
|
}
|
|
817
824
|
/**
|
|
818
825
|
* One payment webhook-adapter construction (`createStripeAdapter` /
|
|
@@ -950,6 +957,13 @@ interface AdvisorQueryRead {
|
|
|
950
957
|
exportName?: string;
|
|
951
958
|
/** Source file the read appears in (relative to the lunora dir, no extension). */
|
|
952
959
|
file: string;
|
|
960
|
+
/**
|
|
961
|
+
* True when the chain's `.filter()` predicate compares `_id`
|
|
962
|
+
* (`(d) => d._id === args.id`) — a full scan for a row that `ctx.db.get`
|
|
963
|
+
* addresses directly. Optional so a feeder predating this field still
|
|
964
|
+
* typechecks; absent is treated as "not a primary-key filter".
|
|
965
|
+
*/
|
|
966
|
+
filtersPrimaryKey?: boolean;
|
|
953
967
|
/** True when the chain calls `.filter(...)`. */
|
|
954
968
|
hasFilter: boolean;
|
|
955
969
|
/** True when the chain narrows with `.withIndex(...)` or `.withSearchIndex(...)`. */
|
|
@@ -2842,6 +2856,26 @@ declare const externalSourceOnGlobal: Lint;
|
|
|
2842
2856
|
* sourced declaration, or one not sharded, is skipped.
|
|
2843
2857
|
*/
|
|
2844
2858
|
declare const externalSourceUnscoped: Lint;
|
|
2859
|
+
/**
|
|
2860
|
+
* Flags `ctx.db.query("t").filter((d) => d._id === x)` — a full scan for a row
|
|
2861
|
+
* that is directly addressable.
|
|
2862
|
+
*
|
|
2863
|
+
* Unlike `filter_without_index`, this is never a judgement call. `_id` is the
|
|
2864
|
+
* primary key: `ctx.db.get(x)` fetches the row by rowid, while the filter form
|
|
2865
|
+
* walks the table comparing every `_id` until it matches. There is no schema
|
|
2866
|
+
* shape, table size, or access pattern under which the scan is the right
|
|
2867
|
+
* choice, so the fix is mechanical and the finding needs no triage.
|
|
2868
|
+
*
|
|
2869
|
+
* Split out from `filter_without_index` because that rule fires on a spectrum —
|
|
2870
|
+
* some of its findings are fine, some want an index, and the reader has to
|
|
2871
|
+
* decide. Folding an always-wrong case into a sometimes-wrong rule buries it
|
|
2872
|
+
* (found while reviewing eight `filter_without_index`
|
|
2873
|
+
* findings, one of which was this and strictly worse than the rest).
|
|
2874
|
+
*
|
|
2875
|
+
* Runs only when the codegen feeder supplies query evidence; a runtime caller
|
|
2876
|
+
* flags nothing.
|
|
2877
|
+
*/
|
|
2878
|
+
declare const filterOnPrimaryKey: Lint;
|
|
2845
2879
|
/**
|
|
2846
2880
|
* Flags a query read that calls `.filter()` without first narrowing with
|
|
2847
2881
|
* `.withIndex()` / `.withSearchIndex()`. Such a read loads *every* row of the
|
|
@@ -4349,4 +4383,4 @@ interface RunAdvisorOptions {
|
|
|
4349
4383
|
* `static` lints at build time and defer `runtime` lints to a live shard.
|
|
4350
4384
|
*/
|
|
4351
4385
|
declare const runAdvisor: (context: LintContext, options?: RunAdvisorOptions) => Finding[];
|
|
4352
|
-
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 AdvisorExportSink, type AdvisorFailOpenGuard, type AdvisorFlagSecurityDefault, type AdvisorGeoIndexUsage, type AdvisorHttpActionGuard, type AdvisorHttpHeaderWrite, type AdvisorHyperdriveCall, type AdvisorIdentityClaimRead, type AdvisorImageDeliveryUrlAccess, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorKvKeyAccess, type AdvisorMailRecipientAccess, type AdvisorMap, type AdvisorMaskProcedure, type AdvisorMaskStrategy, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorNormalizeIdAuthorization, type AdvisorNotifyCall, type AdvisorNotifyConfig, type AdvisorOwnerFieldWrite, type AdvisorPaymentWebhook, type AdvisorPrivilegedDispatch, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorQueue, type AdvisorQueueTuning, 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 BaselineComparison, type Category, type CheckResult, type Coverage, type Facing, type Finding, type Grade, type Level, type Lint, type LintContext, type LintSource, MAP_VERSION, type MapSummary, type ProcedureDelta, type ProcedureScore, type ProjectScore, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, type ScoreAdvisorOptions, type Sensitivity, type SensitivityLevel, actionFetchSsrf, actionWithoutErrorHandling, adminRouteWithoutGuard, aiRawRunEscapeHatch, aiRunWithoutLogging, aiToolSideEffectPromptInjection, aiUnboundedGenerationPublic, allowUnauthenticatedShardAccessEnabled, authApiCallWithoutHeaders, authCsrfCheckDisabled, authEmailVerificationDisabled, authScimWithoutTransactions, authSecureCookiesDisabled, authSessionFreshageZero, authTrustedOriginsWildcard, browserAllowPrivateTargets, browserUserUrlWithoutAllowlist, byCodepoint, circularFk, classifySensitivity, compareToBaseline, constraintValidator, containerInstanceKeyFromUserInput, containerOversizedInstance, containerPublicInternet, containerRuntimeEgressRelaxation, containerStartEnableInternetOverride, dedupeCacheKeys, duplicateIndex, emptyIndex, errorWithoutCatalog, exportSinkMisconfigured, externalSourceIncrementalNoDeletePath, externalSourceOnGlobal, externalSourceUnscoped, filterWithoutIndex, flagGatesSecurityWithUnsafeDefault, fromServerSchema, geoIndexFieldNotGeopoint, geoIndexUnused, gradeFromScore, hardcodedSecret, hotShard, httpActionMissingAuthGuard, httpActionResponseHeaderInjection, hyperdriveOutsideAction, identityUndeclaredClaimTrusted, imagesUrlSourceFromUserInput, indexReferencesUnknownField, indexUtilization, insertManyUnsafeUserData, kvUnscopedUserKeyIdor, loadAnalyticsRuntimeMetrics, mailInboundDispatchWithoutVerify, mailRecipientFromRequestInput, maskUncoveredPiiColumn, maskWeakHashStrategyOnPii, maskedRelationLeakViaWith, mutatorFullRowReplace, nondeterministicQueryMutation, normalizeIdUsedAsAuthorization, notifyMissingPushConfig, notifySendOutsideAction, outputProjectionMissingOnPublicRead, ownerFieldFromArgsNotAuth, parseAdvisorMap, paymentCreateWithoutAuthorize, paymentWebhookWideTolerance, plaintextSecretInWranglerVariables, policyReferencesUnknownTable, privilegedDispatchUnvalidatedPayload, privilegedFanoutFromPublicProcedure, procedureWithoutStructuredEvent, publicArgumentUsesAny, publicMutationWithoutRatelimit, publicTableRlsOptoutConfusion, queueWithoutDlq, r2sqlOutsideAction, ratelimitDefaultMemoryStore, ratelimitKeySpoofableOrGlobal, ratelimitMiddlewareFailOpen, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, scoreAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, signupMutationWithoutDisposableGating, softDeleteIncludeDeletedFromArgs, sqlInjectionRisk, storageGenerateUploadUrlNoContentTypePin, storageKeyFromUserArgs, storagePresignedUrlForPrivateContent, storageUploadWithoutContentTypeAllowlist, storageUploadWithoutMaxSize, tableWithoutInsert, ttlFieldNotTimestamp, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, unrestrictedWhereBranch, userCreatingMutationWithoutCaptcha, vectorsNamespaceFromUserInput, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };
|
|
4386
|
+
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 AdvisorExportSink, type AdvisorFailOpenGuard, type AdvisorFlagSecurityDefault, type AdvisorGeoIndexUsage, type AdvisorHttpActionGuard, type AdvisorHttpHeaderWrite, type AdvisorHyperdriveCall, type AdvisorIdentityClaimRead, type AdvisorImageDeliveryUrlAccess, type AdvisorIndex, type AdvisorIndexHit, type AdvisorInsertWrite, type AdvisorKvKeyAccess, type AdvisorMailRecipientAccess, type AdvisorMap, type AdvisorMaskProcedure, type AdvisorMaskStrategy, type AdvisorMutatorWrite, type AdvisorNondeterministicCall, type AdvisorNormalizeIdAuthorization, type AdvisorNotifyCall, type AdvisorNotifyConfig, type AdvisorOwnerFieldWrite, type AdvisorPaymentWebhook, type AdvisorPrivilegedDispatch, type AdvisorProcedureProtection, type AdvisorQueryRead, type AdvisorQueue, type AdvisorQueueTuning, 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 BaselineComparison, type Category, type CheckResult, type Coverage, type Facing, type Finding, type Grade, type Level, type Lint, type LintContext, type LintSource, MAP_VERSION, type MapSummary, type ProcedureDelta, type ProcedureScore, type ProjectScore, RUNTIME_LINTS, RunAdvisorOptions, STATIC_LINTS, type ScoreAdvisorOptions, type Sensitivity, type SensitivityLevel, actionFetchSsrf, actionWithoutErrorHandling, adminRouteWithoutGuard, aiRawRunEscapeHatch, aiRunWithoutLogging, aiToolSideEffectPromptInjection, aiUnboundedGenerationPublic, allowUnauthenticatedShardAccessEnabled, authApiCallWithoutHeaders, authCsrfCheckDisabled, authEmailVerificationDisabled, authScimWithoutTransactions, authSecureCookiesDisabled, authSessionFreshageZero, authTrustedOriginsWildcard, browserAllowPrivateTargets, browserUserUrlWithoutAllowlist, byCodepoint, circularFk, classifySensitivity, compareToBaseline, constraintValidator, containerInstanceKeyFromUserInput, containerOversizedInstance, containerPublicInternet, containerRuntimeEgressRelaxation, containerStartEnableInternetOverride, dedupeCacheKeys, duplicateIndex, emptyIndex, errorWithoutCatalog, exportSinkMisconfigured, externalSourceIncrementalNoDeletePath, externalSourceOnGlobal, externalSourceUnscoped, filterOnPrimaryKey, filterWithoutIndex, flagGatesSecurityWithUnsafeDefault, fromServerSchema, geoIndexFieldNotGeopoint, geoIndexUnused, gradeFromScore, hardcodedSecret, hotShard, httpActionMissingAuthGuard, httpActionResponseHeaderInjection, hyperdriveOutsideAction, identityUndeclaredClaimTrusted, imagesUrlSourceFromUserInput, indexReferencesUnknownField, indexUtilization, insertManyUnsafeUserData, kvUnscopedUserKeyIdor, loadAnalyticsRuntimeMetrics, mailInboundDispatchWithoutVerify, mailRecipientFromRequestInput, maskUncoveredPiiColumn, maskWeakHashStrategyOnPii, maskedRelationLeakViaWith, mutatorFullRowReplace, nondeterministicQueryMutation, normalizeIdUsedAsAuthorization, notifyMissingPushConfig, notifySendOutsideAction, outputProjectionMissingOnPublicRead, ownerFieldFromArgsNotAuth, parseAdvisorMap, paymentCreateWithoutAuthorize, paymentWebhookWideTolerance, plaintextSecretInWranglerVariables, policyReferencesUnknownTable, privilegedDispatchUnvalidatedPayload, privilegedFanoutFromPublicProcedure, procedureWithoutStructuredEvent, publicArgumentUsesAny, publicMutationWithoutRatelimit, publicTableRlsOptoutConfusion, queueWithoutDlq, r2sqlOutsideAction, ratelimitDefaultMemoryStore, ratelimitKeySpoofableOrGlobal, ratelimitMiddlewareFailOpen, relationReferencesUnknownField, relationReferencesUnknownTable, rlsUncoveredTable, runAdvisor, scoreAdvisor, shapeTargetsGlobalTable, shapeUnknownTable, signupMutationWithoutDisposableGating, softDeleteIncludeDeletedFromArgs, sqlInjectionRisk, storageGenerateUploadUrlNoContentTypePin, storageKeyFromUserArgs, storagePresignedUrlForPrivateContent, storageUploadWithoutContentTypeAllowlist, storageUploadWithoutMaxSize, tableWithoutInsert, ttlFieldNotTimestamp, unboundedStringArgument, unindexedForeignKey, unindexedRelationTarget, unrestrictedWhereBranch, userCreatingMutationWithoutCaptcha, vectorsNamespaceFromUserInput, workflowDuplicateStepName, workflowUnknownTarget, workflowUnused };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dedupeCacheKeys as a}from"./packem_shared/dedupeCacheKeys-7JgxaQWV.mjs";import m from"./packem_shared/constraintValidator-N339mfyx.mjs";import s from"./packem_shared/hotShard-DVs_U17R.mjs";import n from"./packem_shared/indexUtilization-QfbIH_w4.mjs";import p from"./packem_shared/actionFetchSsrf-BbWxy1Yf.mjs";import f from"./packem_shared/actionWithoutErrorHandling-D1DqSPpg.mjs";import l from"./packem_shared/adminRouteWithoutGuard-DSo4t9j4.mjs";import u from"./packem_shared/aiRawRunEscapeHatch-DfhjYm43.mjs";import d from"./packem_shared/aiRunWithoutLogging-CMvQPNBr.mjs";import c from"./packem_shared/aiToolSideEffectPromptInjection-DnWQOoKi.mjs";import $ from"./packem_shared/aiUnboundedGenerationPublic-D3HZrh5_.mjs";import h from"./packem_shared/allowUnauthenticatedShardAccessEnabled-D4aMNBb0.mjs";import g from"./packem_shared/authApiCallWithoutHeaders-BItMMdZP.mjs";import b from"./packem_shared/authCsrfCheckDisabled-De9ammtV.mjs";import U from"./packem_shared/authEmailVerificationDisabled-BFKdJcx4.mjs";import S from"./packem_shared/authScimWithoutTransactions-DCtLXzks.mjs";import I from"./packem_shared/authSecureCookiesDisabled-B4WIzvMm.mjs";import A from"./packem_shared/authSessionFreshageZero-Bpcaf_Pe.mjs";import y from"./packem_shared/authTrustedOriginsWildcard-DjU9NXEm.mjs";import T from"./packem_shared/browserAllowPrivateTargets-Dxyeh6lg.mjs";import W from"./packem_shared/browserUserUrlWithoutAllowlist-BHBS6b0N.mjs";import R from"./packem_shared/circularFk-BMuJKmuZ.mjs";import w from"./packem_shared/containerInstanceKeyFromUserInput-C8S4T3ty.mjs";import x from"./packem_shared/containerOversizedInstance-B9wW_sU5.mjs";import k from"./packem_shared/containerPublicInternet-Bx2J7tha.mjs";import F from"./packem_shared/containerRuntimeEgressRelaxation-BQ2ZD1aV.mjs";import v from"./packem_shared/containerStartEnableInternetOverride-B62WUura.mjs";import C from"./packem_shared/duplicateIndex-DFT7qLQD.mjs";import M from"./packem_shared/emptyIndex-BiXEfyfN.mjs";import P from"./packem_shared/errorWithoutCatalog-DTDVKU4b.mjs";import D from"./packem_shared/exportSinkMisconfigured-DvpAaa6j.mjs";import E from"./packem_shared/externalSourceIncrementalNoDeletePath-DnoL64YY.mjs";import N from"./packem_shared/externalSourceOnGlobal-DNPLoNUg.mjs";import O from"./packem_shared/externalSourceUnscoped-DqBp5jYr.mjs";import G from"./packem_shared/filterWithoutIndex-yd1N-GQ0.mjs";import L from"./packem_shared/flagGatesSecurityWithUnsafeDefault-DPGFEHTt.mjs";import V from"./packem_shared/geoIndexFieldNotGeopoint-DAGLZtaH.mjs";import z from"./packem_shared/geoIndexUnused-BgDE6_AR.mjs";import K from"./packem_shared/hardcodedSecret-rIRc3aNk.mjs";import _ from"./packem_shared/httpActionMissingAuthGuard-BZDdeW_D.mjs";import j from"./packem_shared/httpActionResponseHeaderInjection-D063rB7U.mjs";import q from"./packem_shared/hyperdriveOutsideAction-CRmOQz67.mjs";import H from"./packem_shared/identityUndeclaredClaimTrusted-BYRYGQ74.mjs";import B from"./packem_shared/imagesUrlSourceFromUserInput-Cy5pc_dA.mjs";import Q from"./packem_shared/indexReferencesUnknownField-r3QHlaz6.mjs";import Z from"./packem_shared/insertManyUnsafeUserData-DrH7PdRs.mjs";import J from"./packem_shared/kvUnscopedUserKeyIdor-B4lGxRxh.mjs";import X from"./packem_shared/mailInboundDispatchWithoutVerify-BivYJ5F9.mjs";import Y from"./packem_shared/mailRecipientFromRequestInput-BR_oSh65.mjs";import oo from"./packem_shared/maskUncoveredPiiColumn-DqPfZM2O.mjs";import ro from"./packem_shared/maskWeakHashStrategyOnPii-CEiiGgT7.mjs";import to from"./packem_shared/maskedRelationLeakViaWith-CxYk0MDW.mjs";import io from"./packem_shared/mutatorFullRowReplace-CEgecSGm.mjs";import eo from"./packem_shared/nondeterministicQueryMutation-BaMfbAk_.mjs";import ao from"./packem_shared/normalizeIdUsedAsAuthorization-FjISSXJm.mjs";import mo from"./packem_shared/notifyMissingPushConfig-C_GbVw3S.mjs";import so from"./packem_shared/notifySendOutsideAction-B0jZuUP3.mjs";import no from"./packem_shared/outputProjectionMissingOnPublicRead-9Pm9766s.mjs";import po from"./packem_shared/ownerFieldFromArgsNotAuth-BoR9vvst.mjs";import fo from"./packem_shared/paymentCreateWithoutAuthorize-CurtqN8K.mjs";import lo from"./packem_shared/paymentWebhookWideTolerance-I7ingfR8.mjs";import uo from"./packem_shared/plaintextSecretInWranglerVariables-DXjKIm8H.mjs";import co from"./packem_shared/policyReferencesUnknownTable-D3WelAQa.mjs";import $o from"./packem_shared/privilegedDispatchUnvalidatedPayload-74GuGye1.mjs";import ho from"./packem_shared/privilegedFanoutFromPublicProcedure-C2j2GSUN.mjs";import go from"./packem_shared/procedureWithoutStructuredEvent-D4Qi2vH7.mjs";import bo from"./packem_shared/publicArgumentUsesAny-BJb4cTqL.mjs";import Uo from"./packem_shared/publicMutationWithoutRatelimit-D9phluHW.mjs";import So from"./packem_shared/publicTableRlsOptoutConfusion-CaWtPGAn.mjs";import Io from"./packem_shared/queueWithoutDlq-BLY3iy9Q.mjs";import Ao from"./packem_shared/r2sqlOutsideAction-CKK_I1Ms.mjs";import yo from"./packem_shared/ratelimitDefaultMemoryStore-mOdI3Jmb.mjs";import To from"./packem_shared/ratelimitKeySpoofableOrGlobal-DaGId_Fh.mjs";import Wo from"./packem_shared/ratelimitMiddlewareFailOpen-CTWVosEc.mjs";import Ro from"./packem_shared/relationReferencesUnknownField-clqyB69Y.mjs";import wo from"./packem_shared/relationReferencesUnknownTable-CLdrhkmS.mjs";import xo from"./packem_shared/rlsUncoveredTable-DYHgnoos.mjs";import ko from"./packem_shared/shapeTargetsGlobalTable-Blz-aSkg.mjs";import Fo from"./packem_shared/shapeUnknownTable-DFxtyFio.mjs";import vo from"./packem_shared/signupMutationWithoutDisposableGating-BNzlsE0F.mjs";import Co from"./packem_shared/softDeleteIncludeDeletedFromArgs-DgxpQHRA.mjs";import Mo from"./packem_shared/sqlInjectionRisk-D2NaT-5c.mjs";import Po from"./packem_shared/storageGenerateUploadUrlNoContentTypePin-C9cjl6Jh.mjs";import Do from"./packem_shared/storageKeyFromUserArgs-BeS5cp56.mjs";import Eo from"./packem_shared/storagePresignedUrlForPrivateContent-j7VhwIdu.mjs";import No from"./packem_shared/storageUploadWithoutContentTypeAllowlist-oxKLecuf.mjs";import Oo from"./packem_shared/storageUploadWithoutMaxSize-DUDxPutk.mjs";import Go from"./packem_shared/tableWithoutInsert-D3AhaNzR.mjs";import Lo from"./packem_shared/ttlFieldNotTimestamp-BFiRkSZD.mjs";import Vo from"./packem_shared/unboundedStringArgument-AkkIcr-S.mjs";import zo from"./packem_shared/unindexedForeignKey-DK4eWXkb.mjs";import Ko from"./packem_shared/unindexedRelationTarget-B5fFq1E8.mjs";import _o from"./packem_shared/unrestrictedWhereBranch-YKiydie4.mjs";import jo from"./packem_shared/userCreatingMutationWithoutCaptcha-iDjRkUFO.mjs";import qo from"./packem_shared/vectorsNamespaceFromUserInput-Cyq5B2kF.mjs";import Ho from"./packem_shared/workflowDuplicateStepName-cXF6Rpvg.mjs";import Bo from"./packem_shared/workflowUnknownTarget-JF8rITLP.mjs";import Qo from"./packem_shared/workflowUnused-Dx_FQwGE.mjs";import{AE_METRIC_EVENTS as qt,loadAnalyticsRuntimeMetrics as Ht}from"./packem_shared/AE_METRIC_EVENTS-LP_0D7Uw.mjs";import{compareToBaseline as Qt,parseAdvisorMap as Zt}from"./packem_shared/compareToBaseline-T1_kl8VY.mjs";import{gradeFromScore as Xt}from"./packem_shared/gradeFromScore-DW82YDVY.mjs";import{MAP_VERSION as oi,byCodepoint as ri,scoreAdvisor as ti}from"./packem_shared/MAP_VERSION-BS08jBkS.mjs";import{default as ei}from"./packem_shared/classifySensitivity-DjswRYWd.mjs";import{fromServerSchema as mi}from"./packem_shared/fromServerSchema-CJ-AQ2kw.mjs";const Zo=[Q,wo,Ro,Bo,Ho,Fo,E,N,O,M,P,V,z,D,Lo,R,zo,Ko,C,Go,Qo,Io,G,ko,io,eo,q,Ao,g,co,xo,oo,ro,x,k,Uo,_o,jo,vo,bo,Vo,K,Mo,l,fo,X,yo,T,ho,go,Z,$,p,f,po,Do,J,w,u,d,qo,Y,W,$o,v,F,S,y,b,I,U,A,B,To,So,h,No,Oo,Po,Eo,_,j,Wo,L,c,H,lo,Co,to,no,ao,so,mo,uo],Jo=[s,n,m],Xo=[...Zo,...Jo],Kt=(i,o={})=>{const e=o.lints??Xo,r=[];for(const t of e)o.source!==void 0&&t.source!==o.source||r.push(...t.run(i));return a(r)};export{qt as AE_METRIC_EVENTS,Xo as ALL_LINTS,oi as MAP_VERSION,Jo as RUNTIME_LINTS,Zo as STATIC_LINTS,p as actionFetchSsrf,f as actionWithoutErrorHandling,l as adminRouteWithoutGuard,u as aiRawRunEscapeHatch,d as aiRunWithoutLogging,c as aiToolSideEffectPromptInjection,$ as aiUnboundedGenerationPublic,h as allowUnauthenticatedShardAccessEnabled,g as authApiCallWithoutHeaders,b as authCsrfCheckDisabled,U as authEmailVerificationDisabled,S as authScimWithoutTransactions,I as authSecureCookiesDisabled,A as authSessionFreshageZero,y as authTrustedOriginsWildcard,T as browserAllowPrivateTargets,W as browserUserUrlWithoutAllowlist,ri as byCodepoint,R as circularFk,ei as classifySensitivity,Qt as compareToBaseline,m as constraintValidator,w as containerInstanceKeyFromUserInput,x as containerOversizedInstance,k as containerPublicInternet,F as containerRuntimeEgressRelaxation,v as containerStartEnableInternetOverride,a as dedupeCacheKeys,C as duplicateIndex,M as emptyIndex,P as errorWithoutCatalog,D as exportSinkMisconfigured,E as externalSourceIncrementalNoDeletePath,N as externalSourceOnGlobal,O as externalSourceUnscoped,G as filterWithoutIndex,L as flagGatesSecurityWithUnsafeDefault,mi as fromServerSchema,V as geoIndexFieldNotGeopoint,z as geoIndexUnused,Xt as gradeFromScore,K as hardcodedSecret,s as hotShard,_ as httpActionMissingAuthGuard,j as httpActionResponseHeaderInjection,q as hyperdriveOutsideAction,H as identityUndeclaredClaimTrusted,B as imagesUrlSourceFromUserInput,Q as indexReferencesUnknownField,n as indexUtilization,Z as insertManyUnsafeUserData,J as kvUnscopedUserKeyIdor,Ht as loadAnalyticsRuntimeMetrics,X as mailInboundDispatchWithoutVerify,Y as mailRecipientFromRequestInput,oo as maskUncoveredPiiColumn,ro as maskWeakHashStrategyOnPii,to as maskedRelationLeakViaWith,io as mutatorFullRowReplace,eo as nondeterministicQueryMutation,ao as normalizeIdUsedAsAuthorization,mo as notifyMissingPushConfig,so as notifySendOutsideAction,no as outputProjectionMissingOnPublicRead,po as ownerFieldFromArgsNotAuth,Zt as parseAdvisorMap,fo as paymentCreateWithoutAuthorize,lo as paymentWebhookWideTolerance,uo as plaintextSecretInWranglerVariables,co as policyReferencesUnknownTable,$o as privilegedDispatchUnvalidatedPayload,ho as privilegedFanoutFromPublicProcedure,go as procedureWithoutStructuredEvent,bo as publicArgumentUsesAny,Uo as publicMutationWithoutRatelimit,So as publicTableRlsOptoutConfusion,Io as queueWithoutDlq,Ao as r2sqlOutsideAction,yo as ratelimitDefaultMemoryStore,To as ratelimitKeySpoofableOrGlobal,Wo as ratelimitMiddlewareFailOpen,Ro as relationReferencesUnknownField,wo as relationReferencesUnknownTable,xo as rlsUncoveredTable,Kt as runAdvisor,ti as scoreAdvisor,ko as shapeTargetsGlobalTable,Fo as shapeUnknownTable,vo as signupMutationWithoutDisposableGating,Co as softDeleteIncludeDeletedFromArgs,Mo as sqlInjectionRisk,Po as storageGenerateUploadUrlNoContentTypePin,Do as storageKeyFromUserArgs,Eo as storagePresignedUrlForPrivateContent,No as storageUploadWithoutContentTypeAllowlist,Oo as storageUploadWithoutMaxSize,Go as tableWithoutInsert,Lo as ttlFieldNotTimestamp,Vo as unboundedStringArgument,zo as unindexedForeignKey,Ko as unindexedRelationTarget,_o as unrestrictedWhereBranch,jo as userCreatingMutationWithoutCaptcha,qo as vectorsNamespaceFromUserInput,Ho as workflowDuplicateStepName,Bo as workflowUnknownTarget,Qo as workflowUnused};
|
|
1
|
+
import{dedupeCacheKeys as a}from"./packem_shared/dedupeCacheKeys-7JgxaQWV.mjs";import m from"./packem_shared/constraintValidator-N339mfyx.mjs";import s from"./packem_shared/hotShard-DVs_U17R.mjs";import n from"./packem_shared/indexUtilization-QfbIH_w4.mjs";import p from"./packem_shared/actionFetchSsrf-BbWxy1Yf.mjs";import f from"./packem_shared/actionWithoutErrorHandling-D1DqSPpg.mjs";import l from"./packem_shared/adminRouteWithoutGuard-DSo4t9j4.mjs";import u from"./packem_shared/aiRawRunEscapeHatch-DfhjYm43.mjs";import d from"./packem_shared/aiRunWithoutLogging-CMvQPNBr.mjs";import c from"./packem_shared/aiToolSideEffectPromptInjection-DnWQOoKi.mjs";import $ from"./packem_shared/aiUnboundedGenerationPublic-D3HZrh5_.mjs";import h from"./packem_shared/allowUnauthenticatedShardAccessEnabled-D4aMNBb0.mjs";import g from"./packem_shared/authApiCallWithoutHeaders-BItMMdZP.mjs";import b from"./packem_shared/authCsrfCheckDisabled-De9ammtV.mjs";import U from"./packem_shared/authEmailVerificationDisabled-BFKdJcx4.mjs";import S from"./packem_shared/authScimWithoutTransactions-DCtLXzks.mjs";import y from"./packem_shared/authSecureCookiesDisabled-B4WIzvMm.mjs";import I from"./packem_shared/authSessionFreshageZero-Bpcaf_Pe.mjs";import A from"./packem_shared/authTrustedOriginsWildcard-DjU9NXEm.mjs";import T from"./packem_shared/browserAllowPrivateTargets-Dxyeh6lg.mjs";import W from"./packem_shared/browserUserUrlWithoutAllowlist-BHBS6b0N.mjs";import R from"./packem_shared/circularFk-BMuJKmuZ.mjs";import w from"./packem_shared/containerInstanceKeyFromUserInput-C8S4T3ty.mjs";import x from"./packem_shared/containerOversizedInstance-B9wW_sU5.mjs";import k from"./packem_shared/containerPublicInternet-Bx2J7tha.mjs";import F from"./packem_shared/containerRuntimeEgressRelaxation-BQ2ZD1aV.mjs";import v from"./packem_shared/containerStartEnableInternetOverride-B62WUura.mjs";import C from"./packem_shared/duplicateIndex-DFT7qLQD.mjs";import P from"./packem_shared/emptyIndex-BiXEfyfN.mjs";import M from"./packem_shared/errorWithoutCatalog-DTDVKU4b.mjs";import D from"./packem_shared/exportSinkMisconfigured-DvpAaa6j.mjs";import E from"./packem_shared/externalSourceIncrementalNoDeletePath-DnoL64YY.mjs";import O from"./packem_shared/externalSourceOnGlobal-DNPLoNUg.mjs";import N from"./packem_shared/externalSourceUnscoped-DqBp5jYr.mjs";import G from"./packem_shared/filterOnPrimaryKey-CPPa7fog.mjs";import K from"./packem_shared/filterWithoutIndex-DYLs-Jf2.mjs";import L from"./packem_shared/flagGatesSecurityWithUnsafeDefault-DPGFEHTt.mjs";import V from"./packem_shared/geoIndexFieldNotGeopoint-DAGLZtaH.mjs";import z from"./packem_shared/geoIndexUnused-BgDE6_AR.mjs";import _ from"./packem_shared/hardcodedSecret-rIRc3aNk.mjs";import j from"./packem_shared/httpActionMissingAuthGuard-BZDdeW_D.mjs";import q from"./packem_shared/httpActionResponseHeaderInjection-D063rB7U.mjs";import H from"./packem_shared/hyperdriveOutsideAction-CRmOQz67.mjs";import B from"./packem_shared/identityUndeclaredClaimTrusted-BYRYGQ74.mjs";import Q from"./packem_shared/imagesUrlSourceFromUserInput-Cy5pc_dA.mjs";import Z from"./packem_shared/indexReferencesUnknownField-r3QHlaz6.mjs";import J from"./packem_shared/insertManyUnsafeUserData-DrH7PdRs.mjs";import X from"./packem_shared/kvUnscopedUserKeyIdor-B4lGxRxh.mjs";import Y from"./packem_shared/mailInboundDispatchWithoutVerify-BivYJ5F9.mjs";import rr from"./packem_shared/mailRecipientFromRequestInput-BR_oSh65.mjs";import or from"./packem_shared/maskUncoveredPiiColumn-DqPfZM2O.mjs";import tr from"./packem_shared/maskWeakHashStrategyOnPii-CEiiGgT7.mjs";import ir from"./packem_shared/maskedRelationLeakViaWith-CxYk0MDW.mjs";import er from"./packem_shared/mutatorFullRowReplace-CEgecSGm.mjs";import ar from"./packem_shared/nondeterministicQueryMutation-BaMfbAk_.mjs";import mr from"./packem_shared/normalizeIdUsedAsAuthorization-FjISSXJm.mjs";import sr from"./packem_shared/notifyMissingPushConfig-C_GbVw3S.mjs";import nr from"./packem_shared/notifySendOutsideAction-B0jZuUP3.mjs";import pr from"./packem_shared/outputProjectionMissingOnPublicRead-9Pm9766s.mjs";import fr from"./packem_shared/ownerFieldFromArgsNotAuth-D4K-_0aD.mjs";import lr from"./packem_shared/paymentCreateWithoutAuthorize-CurtqN8K.mjs";import ur from"./packem_shared/paymentWebhookWideTolerance-I7ingfR8.mjs";import dr from"./packem_shared/plaintextSecretInWranglerVariables-DXjKIm8H.mjs";import cr from"./packem_shared/policyReferencesUnknownTable-D3WelAQa.mjs";import $r from"./packem_shared/privilegedDispatchUnvalidatedPayload-74GuGye1.mjs";import hr from"./packem_shared/privilegedFanoutFromPublicProcedure-C2j2GSUN.mjs";import gr from"./packem_shared/procedureWithoutStructuredEvent-D4Qi2vH7.mjs";import br from"./packem_shared/publicArgumentUsesAny-BJb4cTqL.mjs";import Ur from"./packem_shared/publicMutationWithoutRatelimit-D9phluHW.mjs";import Sr from"./packem_shared/publicTableRlsOptoutConfusion-CaWtPGAn.mjs";import yr from"./packem_shared/queueWithoutDlq-BLY3iy9Q.mjs";import Ir from"./packem_shared/r2sqlOutsideAction-CKK_I1Ms.mjs";import Ar from"./packem_shared/ratelimitDefaultMemoryStore-mOdI3Jmb.mjs";import Tr from"./packem_shared/ratelimitKeySpoofableOrGlobal-DaGId_Fh.mjs";import Wr from"./packem_shared/ratelimitMiddlewareFailOpen-CTWVosEc.mjs";import Rr from"./packem_shared/relationReferencesUnknownField-clqyB69Y.mjs";import wr from"./packem_shared/relationReferencesUnknownTable-CLdrhkmS.mjs";import xr from"./packem_shared/rlsUncoveredTable-DYHgnoos.mjs";import kr from"./packem_shared/shapeTargetsGlobalTable-Blz-aSkg.mjs";import Fr from"./packem_shared/shapeUnknownTable-DFxtyFio.mjs";import vr from"./packem_shared/signupMutationWithoutDisposableGating-BNzlsE0F.mjs";import Cr from"./packem_shared/softDeleteIncludeDeletedFromArgs-DgxpQHRA.mjs";import Pr from"./packem_shared/sqlInjectionRisk-D2NaT-5c.mjs";import Mr from"./packem_shared/storageGenerateUploadUrlNoContentTypePin-C9cjl6Jh.mjs";import Dr from"./packem_shared/storageKeyFromUserArgs-BeS5cp56.mjs";import Er from"./packem_shared/storagePresignedUrlForPrivateContent-j7VhwIdu.mjs";import Or from"./packem_shared/storageUploadWithoutContentTypeAllowlist-oxKLecuf.mjs";import Nr from"./packem_shared/storageUploadWithoutMaxSize-DUDxPutk.mjs";import Gr from"./packem_shared/tableWithoutInsert-D3AhaNzR.mjs";import Kr from"./packem_shared/ttlFieldNotTimestamp-BFiRkSZD.mjs";import Lr from"./packem_shared/unboundedStringArgument-AkkIcr-S.mjs";import Vr from"./packem_shared/unindexedForeignKey-DK4eWXkb.mjs";import zr from"./packem_shared/unindexedRelationTarget-B5fFq1E8.mjs";import _r from"./packem_shared/unrestrictedWhereBranch-YKiydie4.mjs";import jr from"./packem_shared/userCreatingMutationWithoutCaptcha-iDjRkUFO.mjs";import qr from"./packem_shared/vectorsNamespaceFromUserInput-Cyq5B2kF.mjs";import Hr from"./packem_shared/workflowDuplicateStepName-cXF6Rpvg.mjs";import Br from"./packem_shared/workflowUnknownTarget-JF8rITLP.mjs";import Qr from"./packem_shared/workflowUnused-Dx_FQwGE.mjs";import{AE_METRIC_EVENTS as Bt,loadAnalyticsRuntimeMetrics as Qt}from"./packem_shared/AE_METRIC_EVENTS-LP_0D7Uw.mjs";import{compareToBaseline as Jt,parseAdvisorMap as Xt}from"./packem_shared/compareToBaseline-T1_kl8VY.mjs";import{gradeFromScore as ri}from"./packem_shared/gradeFromScore-DW82YDVY.mjs";import{MAP_VERSION as ti,byCodepoint as ii,scoreAdvisor as ei}from"./packem_shared/MAP_VERSION-BS08jBkS.mjs";import{default as mi}from"./packem_shared/classifySensitivity-DjswRYWd.mjs";import{fromServerSchema as ni}from"./packem_shared/fromServerSchema-CJ-AQ2kw.mjs";const Zr=[Z,wr,Rr,Br,Hr,Fr,E,O,N,P,M,V,z,D,Kr,R,Vr,zr,C,Gr,Qr,yr,G,K,kr,er,ar,H,Ir,g,cr,xr,or,tr,x,k,Ur,_r,jr,vr,br,Lr,_,Pr,l,lr,Y,Ar,T,hr,gr,J,$,p,f,fr,Dr,X,w,u,d,qr,rr,W,$r,v,F,S,A,b,y,U,I,Q,Tr,Sr,h,Or,Nr,Mr,Er,j,q,Wr,L,c,B,ur,Cr,ir,pr,mr,nr,sr,dr],Jr=[s,n,m],Xr=[...Zr,...Jr],jt=(i,r={})=>{const e=r.lints??Xr,o=[];for(const t of e)r.source!==void 0&&t.source!==r.source||o.push(...t.run(i));return a(o)};export{Bt as AE_METRIC_EVENTS,Xr as ALL_LINTS,ti as MAP_VERSION,Jr as RUNTIME_LINTS,Zr as STATIC_LINTS,p as actionFetchSsrf,f as actionWithoutErrorHandling,l as adminRouteWithoutGuard,u as aiRawRunEscapeHatch,d as aiRunWithoutLogging,c as aiToolSideEffectPromptInjection,$ as aiUnboundedGenerationPublic,h as allowUnauthenticatedShardAccessEnabled,g as authApiCallWithoutHeaders,b as authCsrfCheckDisabled,U as authEmailVerificationDisabled,S as authScimWithoutTransactions,y as authSecureCookiesDisabled,I as authSessionFreshageZero,A as authTrustedOriginsWildcard,T as browserAllowPrivateTargets,W as browserUserUrlWithoutAllowlist,ii as byCodepoint,R as circularFk,mi as classifySensitivity,Jt as compareToBaseline,m as constraintValidator,w as containerInstanceKeyFromUserInput,x as containerOversizedInstance,k as containerPublicInternet,F as containerRuntimeEgressRelaxation,v as containerStartEnableInternetOverride,a as dedupeCacheKeys,C as duplicateIndex,P as emptyIndex,M as errorWithoutCatalog,D as exportSinkMisconfigured,E as externalSourceIncrementalNoDeletePath,O as externalSourceOnGlobal,N as externalSourceUnscoped,G as filterOnPrimaryKey,K as filterWithoutIndex,L as flagGatesSecurityWithUnsafeDefault,ni as fromServerSchema,V as geoIndexFieldNotGeopoint,z as geoIndexUnused,ri as gradeFromScore,_ as hardcodedSecret,s as hotShard,j as httpActionMissingAuthGuard,q as httpActionResponseHeaderInjection,H as hyperdriveOutsideAction,B as identityUndeclaredClaimTrusted,Q as imagesUrlSourceFromUserInput,Z as indexReferencesUnknownField,n as indexUtilization,J as insertManyUnsafeUserData,X as kvUnscopedUserKeyIdor,Qt as loadAnalyticsRuntimeMetrics,Y as mailInboundDispatchWithoutVerify,rr as mailRecipientFromRequestInput,or as maskUncoveredPiiColumn,tr as maskWeakHashStrategyOnPii,ir as maskedRelationLeakViaWith,er as mutatorFullRowReplace,ar as nondeterministicQueryMutation,mr as normalizeIdUsedAsAuthorization,sr as notifyMissingPushConfig,nr as notifySendOutsideAction,pr as outputProjectionMissingOnPublicRead,fr as ownerFieldFromArgsNotAuth,Xt as parseAdvisorMap,lr as paymentCreateWithoutAuthorize,ur as paymentWebhookWideTolerance,dr as plaintextSecretInWranglerVariables,cr as policyReferencesUnknownTable,$r as privilegedDispatchUnvalidatedPayload,hr as privilegedFanoutFromPublicProcedure,gr as procedureWithoutStructuredEvent,br as publicArgumentUsesAny,Ur as publicMutationWithoutRatelimit,Sr as publicTableRlsOptoutConfusion,yr as queueWithoutDlq,Ir as r2sqlOutsideAction,Ar as ratelimitDefaultMemoryStore,Tr as ratelimitKeySpoofableOrGlobal,Wr as ratelimitMiddlewareFailOpen,Rr as relationReferencesUnknownField,wr as relationReferencesUnknownTable,xr as rlsUncoveredTable,jt as runAdvisor,ei as scoreAdvisor,kr as shapeTargetsGlobalTable,Fr as shapeUnknownTable,vr as signupMutationWithoutDisposableGating,Cr as softDeleteIncludeDeletedFromArgs,Pr as sqlInjectionRisk,Mr as storageGenerateUploadUrlNoContentTypePin,Dr as storageKeyFromUserArgs,Er as storagePresignedUrlForPrivateContent,Or as storageUploadWithoutContentTypeAllowlist,Nr as storageUploadWithoutMaxSize,Gr as tableWithoutInsert,Kr as ttlFieldNotTimestamp,Lr as unboundedStringArgument,Vr as unindexedForeignKey,zr as unindexedRelationTarget,_r as unrestrictedWhereBranch,jr as userCreatingMutationWithoutCaptcha,qr as vectorsNamespaceFromUserInput,Hr as workflowDuplicateStepName,Br as workflowUnknownTarget,Qr as workflowUnused};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./finding-BAVgqnCF.mjs";const l={categories:["PERFORMANCE"],description:"A query filters on `_id`, the primary key. That walks the table comparing every row's id, when `ctx.db.get(id)` fetches the row directly. There is no case where the scan is preferable.",facing:"EXTERNAL",level:"WARN",name:"filter_on_primary_key",remediation:'Replace `ctx.db.query("table").filter((d) => d._id === id).first()` with `ctx.db.get(id)`. Passing a typed `Id<"table">` also narrows the result to that table\'s `Doc`, where the scan form returns the shared row type.',run:i=>{const t=[];for(const e of i.queries??[]){if(e.filtersPrimaryKey!==!0||e.table==="")continue;const r=e.line>0?`${e.file}:${e.line.toString()}`:e.file;t.push(a(l,{cacheKey:`filter_on_primary_key:${e.file}:${e.line.toString()}:${e.table}`,detail:`Query on "${e.table}" at ${r} filters on \`_id\` — it scans "${e.table}" to find a row \`ctx.db.get(id)\` addresses directly.`,metadata:{exportName:e.exportName,file:e.file,line:e.line,table:e.table}}))}return t},source:"static",title:"Filter on primary key instead of ctx.db.get"};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as l}from"./finding-BAVgqnCF.mjs";const s={categories:["PERFORMANCE"],description:"A query calls `.filter()` without a `.withIndex()` / `.withSearchIndex()`, so it loads every row in the table and filters in memory — a full table scan that gets linearly slower as the table grows.",facing:"EXTERNAL",level:"WARN",name:"filter_without_index",remediation:'Narrow the read with `.withIndex("name", (q) => q.eq(...))` first, then `.filter()` only for what the index cannot express.',run:i=>{const t=[],d=new Map(i.schema.tables.map(e=>[e.name,e.shardKind]));for(const e of i.queries??[]){if(!e.hasFilter||e.hasIndex||e.table===""||e.filtersPrimaryKey===!0)continue;const r=e.line>0?`${e.file}:${e.line.toString()}`:e.file,a=d.get(e.table),n={exportName:e.exportName,file:e.file,line:e.line,shardKind:a??"unknown",table:e.table},o=`filter_without_index:${e.file}:${e.line.toString()}:${e.table}`;if(a==="shardBy"){t.push(l(s,{cacheKey:o,detail:`Query on "${e.table}" at ${r} calls .filter() without an index. "${e.table}" is \`.shardBy()\`, so the read is already scoped to one shard rather than the whole table — this is bounded by one tenant's row count, not the dataset. Add an index if that per-shard count grows large.`,level:"INFO",metadata:n}));continue}const h={global:`it scans the whole D1 table "${e.table}" — unbounded, and the cost is a cross-region round trip`,root:`it loads every row of "${e.table}" from the root Durable Object's SQLite and filters in memory`}[a]??`it loads every row of "${e.table}" and filters in memory`;t.push(l(s,{cacheKey:o,detail:`Query on "${e.table}" at ${r} calls .filter() without an index — ${h}.`,metadata:n}))}return t},source:"static",title:"Filter without index"};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as n}from"./finding-BAVgqnCF.mjs";const a={categories:["SECURITY"],description:"A `ctx.db` write sets an ownership/identity column (`userId`, `ownerId`, `tenantId`, …) from the handler's `args`. The caller controls who the row belongs to, so any caller can write rows owned by another user or tenant — an act-as-any-user / cross-tenant IDOR.",facing:"EXTERNAL",level:"ERROR",name:"owner_field_from_args_not_auth",remediation:"Stamp the ownership column from the server-trusted identity (`ctx.auth.userId` / `ctx.identity`), never from request input. Drop the field from the accepted `args` so a caller cannot supply it.",run:t=>t.ownerFieldWrites===void 0?[]:t.ownerFieldWrites.map(e=>{const r=`\`${e.method}\` in \`${e.exportName}\` (${e.file}:${e.line.toString()})`,i={exportName:e.exportName,field:e.field,file:e.file,line:e.line,method:e.method,visibility:e.visibility??"unknown"};return e.visibility==="internal"?n(a,{cacheKey:`owner_field_from_args_not_auth:${e.file}:${e.line.toString()}:${e.field}`,detail:`${r} sets the ownership field \`${e.field}\` from \`args\`. This is expected for an \`internal\` procedure — no caller can reach it directly, and the trusted caller passes the subject along. Audit the PUBLIC procedures that dispatch to it: if one forwards \`args.${e.field}\` straight through, the IDOR is there.`,facing:"INTERNAL",level:"INFO",metadata:i}):n(a,{cacheKey:`owner_field_from_args_not_auth:${e.file}:${e.line.toString()}:${e.field}`,detail:`${r} sets the ownership field \`${e.field}\` from \`args\` instead of the server-trusted identity — any caller can write rows owned by another user/tenant (IDOR). Stamp \`${e.field}\` from \`ctx.auth\`/\`ctx.identity\`, never from request input.`,metadata:i})}),source:"static",title:"Ownership field written from args, not server identity"};export{a as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/advisor",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.58",
|
|
4
4
|
"description": "Schema & query lints (splinter-style advisors) for Lunora, feeding the Studio Advisors view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"advisor",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@lunora/errors": "1.0.0-alpha.9",
|
|
50
|
-
"@lunora/server": "1.0.0-alpha.
|
|
50
|
+
"@lunora/server": "1.0.0-alpha.54"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": "^22.15.0 || >=24.11.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as l}from"./finding-BAVgqnCF.mjs";const r={categories:["PERFORMANCE"],description:"A query calls `.filter()` without a `.withIndex()` / `.withSearchIndex()`, so it loads every row in the table and filters in memory — a full table scan that gets linearly slower as the table grows.",facing:"EXTERNAL",level:"WARN",name:"filter_without_index",remediation:'Narrow the read with `.withIndex("name", (q) => q.eq(...))` first, then `.filter()` only for what the index cannot express.',run:i=>{const t=[];for(const e of i.queries??[]){if(!e.hasFilter||e.hasIndex||e.table==="")continue;const a=e.line>0?`${e.file}:${e.line.toString()}`:e.file;t.push(l(r,{cacheKey:`filter_without_index:${e.file}:${e.line.toString()}:${e.table}`,detail:`Query on "${e.table}" at ${a} calls .filter() without an index — it loads every row of "${e.table}" and filters in memory.`,metadata:{exportName:e.exportName,file:e.file,line:e.line,table:e.table}}))}return t},source:"static",title:"Filter without index"};export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as r}from"./finding-BAVgqnCF.mjs";const n={categories:["SECURITY"],description:"A `ctx.db` write sets an ownership/identity column (`userId`, `ownerId`, `tenantId`, …) from the handler's `args`. The caller controls who the row belongs to, so any caller can write rows owned by another user or tenant — an act-as-any-user / cross-tenant IDOR.",facing:"EXTERNAL",level:"ERROR",name:"owner_field_from_args_not_auth",remediation:"Stamp the ownership column from the server-trusted identity (`ctx.auth.userId` / `ctx.identity`), never from request input. Drop the field from the accepted `args` so a caller cannot supply it.",run:t=>t.ownerFieldWrites===void 0?[]:t.ownerFieldWrites.map(e=>r(n,{cacheKey:`owner_field_from_args_not_auth:${e.file}:${e.line.toString()}:${e.field}`,detail:`\`${e.method}\` in \`${e.exportName}\` (${e.file}:${e.line.toString()}) sets the ownership field \`${e.field}\` from \`args\` instead of the server-trusted identity — any caller can write rows owned by another user/tenant (IDOR). Stamp \`${e.field}\` from \`ctx.auth\`/\`ctx.identity\`, never from request input.`,metadata:{exportName:e.exportName,field:e.field,file:e.file,line:e.line,method:e.method}})),source:"static",title:"Ownership field written from args, not server identity"};export{n as default};
|