@webdecoy/node 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{chunk-IGSPJVI6.mjs → chunk-CUAZKMMQ.mjs} +30 -1
- package/dist/{chunk-BBRVE4RC.mjs → chunk-XFBXUBFG.mjs} +378 -374
- package/dist/{detect-and-gate-DWOUDUSY.d.mts → detect-and-gate-DtE2PPTM.d.mts} +12 -3
- package/dist/{detect-and-gate-BfL39HDb.d.ts → detect-and-gate-neuBgxUB.d.ts} +12 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +440 -407
- package/dist/index.mjs +4 -4
- package/dist/{sdk-DveMEqxl.d.mts → sdk-Gay_Ddzy.d.mts} +21 -0
- package/dist/{sdk-DveMEqxl.d.ts → sdk-Gay_Ddzy.d.ts} +21 -0
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +30 -1
- package/dist/testing.mjs +1 -1
- package/dist/vercel.d.mts +2 -2
- package/dist/vercel.d.ts +2 -2
- package/dist/vercel.js +426 -393
- package/dist/vercel.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as WebDecoyConfig, k as ProtectOptions, D as Decision, W as WebDecoy } from './sdk-
|
|
1
|
+
import { j as WebDecoyConfig, k as ProtectOptions, D as Decision, W as WebDecoy } from './sdk-Gay_Ddzy.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolving the client IP address behind a proxy.
|
|
@@ -223,9 +223,18 @@ interface GuardOutcome {
|
|
|
223
223
|
*/
|
|
224
224
|
response?: Response;
|
|
225
225
|
}
|
|
226
|
+
/** The host runtime's request lifecycle, where it has one. */
|
|
227
|
+
interface GuardLifecycle {
|
|
228
|
+
/**
|
|
229
|
+
* Keeps violation delivery alive after the response, as Workers'
|
|
230
|
+
* `ctx.waitUntil`. Without it a runtime that freezes after responding can
|
|
231
|
+
* drop the report.
|
|
232
|
+
*/
|
|
233
|
+
waitUntil?: (delivery: Promise<void>) => void;
|
|
234
|
+
}
|
|
226
235
|
interface FetchGuard {
|
|
227
236
|
/** Evaluate one request. */
|
|
228
|
-
check(request: Request, peer?: string): Promise<GuardOutcome>;
|
|
237
|
+
check(request: Request, peer?: string, lifecycle?: GuardLifecycle): Promise<GuardOutcome>;
|
|
229
238
|
/**
|
|
230
239
|
* Rewrite an HTML response to carry the honeytoken link. Returns the response
|
|
231
240
|
* unchanged when there is no token yet, or the body is not injectable HTML.
|
|
@@ -310,4 +319,4 @@ interface DetectAndGateOutcome {
|
|
|
310
319
|
*/
|
|
311
320
|
declare function createDetectAndGate(options?: DetectAndGateOptions): (request: Request, context?: ClearanceContext) => Promise<DetectAndGateOutcome>;
|
|
312
321
|
|
|
313
|
-
export { BUILD as B, type ClearanceContext as C, type DetectAndGateOptions as D, type FetchGuard as F, type GateEnv as G, type HeaderSource as H, type ResolveClientIpOptions as R, type TrustedProxies as T, type ClearanceGateOptions as a, type DetectAndGateOutcome as b, type FetchGuardOptions as c, type GateOutcome as d, type
|
|
322
|
+
export { BUILD as B, type ClearanceContext as C, type DetectAndGateOptions as D, type FetchGuard as F, type GateEnv as G, type HeaderSource as H, type ResolveClientIpOptions as R, type TrustedProxies as T, type ClearanceGateOptions as a, type DetectAndGateOutcome as b, type FetchGuardOptions as c, type GateOutcome as d, type GuardLifecycle as e, type GuardOutcome as f, createClearanceGate as g, createDetectAndGate as h, createFetchGuard as i, ipInCidr as j, resolveGateEnv as k, normalizeIp as n, resolveClientIp as r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as WebDecoyConfig, k as ProtectOptions, D as Decision, W as WebDecoy } from './sdk-
|
|
1
|
+
import { j as WebDecoyConfig, k as ProtectOptions, D as Decision, W as WebDecoy } from './sdk-Gay_Ddzy.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolving the client IP address behind a proxy.
|
|
@@ -223,9 +223,18 @@ interface GuardOutcome {
|
|
|
223
223
|
*/
|
|
224
224
|
response?: Response;
|
|
225
225
|
}
|
|
226
|
+
/** The host runtime's request lifecycle, where it has one. */
|
|
227
|
+
interface GuardLifecycle {
|
|
228
|
+
/**
|
|
229
|
+
* Keeps violation delivery alive after the response, as Workers'
|
|
230
|
+
* `ctx.waitUntil`. Without it a runtime that freezes after responding can
|
|
231
|
+
* drop the report.
|
|
232
|
+
*/
|
|
233
|
+
waitUntil?: (delivery: Promise<void>) => void;
|
|
234
|
+
}
|
|
226
235
|
interface FetchGuard {
|
|
227
236
|
/** Evaluate one request. */
|
|
228
|
-
check(request: Request, peer?: string): Promise<GuardOutcome>;
|
|
237
|
+
check(request: Request, peer?: string, lifecycle?: GuardLifecycle): Promise<GuardOutcome>;
|
|
229
238
|
/**
|
|
230
239
|
* Rewrite an HTML response to carry the honeytoken link. Returns the response
|
|
231
240
|
* unchanged when there is no token yet, or the body is not injectable HTML.
|
|
@@ -310,4 +319,4 @@ interface DetectAndGateOutcome {
|
|
|
310
319
|
*/
|
|
311
320
|
declare function createDetectAndGate(options?: DetectAndGateOptions): (request: Request, context?: ClearanceContext) => Promise<DetectAndGateOutcome>;
|
|
312
321
|
|
|
313
|
-
export { BUILD as B, type ClearanceContext as C, type DetectAndGateOptions as D, type FetchGuard as F, type GateEnv as G, type HeaderSource as H, type ResolveClientIpOptions as R, type TrustedProxies as T, type ClearanceGateOptions as a, type DetectAndGateOutcome as b, type FetchGuardOptions as c, type GateOutcome as d, type
|
|
322
|
+
export { BUILD as B, type ClearanceContext as C, type DetectAndGateOptions as D, type FetchGuard as F, type GateEnv as G, type HeaderSource as H, type ResolveClientIpOptions as R, type TrustedProxies as T, type ClearanceGateOptions as a, type DetectAndGateOutcome as b, type FetchGuardOptions as c, type GateOutcome as d, type GuardLifecycle as e, type GuardOutcome as f, createClearanceGate as g, createDetectAndGate as h, createFetchGuard as i, ipInCidr as j, resolveGateEnv as k, normalizeIp as n, resolveClientIp as r };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as Rule, a as RuleContext, b as RuleResult, c as RuleEngineResult, d as RateLimitConfig, F as FilterConfig, T as TripwireConfig, B as BotRuleConfig, e as BotAgent, f as BotCategory, A as AgentCategory, g as RateLimitStore, h as RateLimitConsume, i as RateLimitOutcome, W as WebDecoy, P as ProtectResult, D as Decision, j as WebDecoyConfig, k as ProtectOptions, l as AgentVerifierOptions, m as AgentRequestInput, n as AgentVerdict, S as SignedAgentDirectory } from './sdk-
|
|
2
|
-
export { o as AgentStatus, p as BOT_CATEGORIES, q as BOT_REGISTRY, r as BotVerdict, C as Characteristic, s as Conclusion, t as CreatedHoneyCredential, u as DEFAULT_CHARACTERISTICS, v as DecisionCache, w as DecisionCacheOptions, x as DecisionInit, y as DecisionMode, E as EDGE_CLASS_HEADER, z as EDGE_CLEARANCE_HEADER, G as EdgeClass, H as EdgeVerdict, I as FrameworkEvidenceObservation, J as HoneyCredentialHandle, K as HoneyCredentialOptions, L as HoneyCredentialPresentationResult, M as HoneyCredentialReceipt, N as IPEnrichmentData, O as LocalAnalysis, Q as LogFields, U as Logger, V as MemoryRateLimitStore, X as OffensiveToolFamily, Y as OffensiveToolInvocation, Z as OffensiveToolchainEvidence, _ as OffensiveToolchainEvidenceInput, $ as OffensiveToolchainObservation, a0 as RequestMetadata, a1 as RuleOutcome, a2 as RuleState, a3 as SDKDetectionRequest, a4 as SDKDetectionResponse, a5 as SSRFCanary, a6 as SSRFCanaryOptions, a7 as SSRFInitiationReceipt, a8 as Span, a9 as SyncRateLimitStore, aa as TLSInfo, ab as Tracer, ac as ViolationDeliveryStats, ad as ViolationEvent, ae as classifyUserAgent, af as consoleLogger, ag as createOffensiveToolchainEvidence, ah as deriveKey, ai as fromPino, aj as matchUserAgent, ak as newDecisionId, al as readEdgeVerdict, am as silentLogger } from './sdk-
|
|
3
|
-
import { T as TrustedProxies } from './detect-and-gate-
|
|
4
|
-
export { B as CLEARANCE_GATE_BUILD, C as ClearanceContext, a as ClearanceGateOptions, D as DetectAndGateOptions, b as DetectAndGateOutcome, F as FetchGuard, c as FetchGuardOptions, G as GateEnv, d as GateOutcome, e as GuardOutcome, H as HeaderSource, R as ResolveClientIpOptions,
|
|
1
|
+
import { R as Rule, a as RuleContext, b as RuleResult, c as RuleEngineResult, d as RateLimitConfig, F as FilterConfig, T as TripwireConfig, B as BotRuleConfig, e as BotAgent, f as BotCategory, A as AgentCategory, g as RateLimitStore, h as RateLimitConsume, i as RateLimitOutcome, W as WebDecoy, P as ProtectResult, D as Decision, j as WebDecoyConfig, k as ProtectOptions, l as AgentVerifierOptions, m as AgentRequestInput, n as AgentVerdict, S as SignedAgentDirectory } from './sdk-Gay_Ddzy.mjs';
|
|
2
|
+
export { o as AgentStatus, p as BOT_CATEGORIES, q as BOT_REGISTRY, r as BotVerdict, C as Characteristic, s as Conclusion, t as CreatedHoneyCredential, u as DEFAULT_CHARACTERISTICS, v as DecisionCache, w as DecisionCacheOptions, x as DecisionInit, y as DecisionMode, E as EDGE_CLASS_HEADER, z as EDGE_CLEARANCE_HEADER, G as EdgeClass, H as EdgeVerdict, I as FrameworkEvidenceObservation, J as HoneyCredentialHandle, K as HoneyCredentialOptions, L as HoneyCredentialPresentationResult, M as HoneyCredentialReceipt, N as IPEnrichmentData, O as LocalAnalysis, Q as LogFields, U as Logger, V as MemoryRateLimitStore, X as OffensiveToolFamily, Y as OffensiveToolInvocation, Z as OffensiveToolchainEvidence, _ as OffensiveToolchainEvidenceInput, $ as OffensiveToolchainObservation, a0 as RequestMetadata, a1 as RuleOutcome, a2 as RuleState, a3 as SDKDetectionRequest, a4 as SDKDetectionResponse, a5 as SSRFCanary, a6 as SSRFCanaryOptions, a7 as SSRFInitiationReceipt, a8 as Span, a9 as SyncRateLimitStore, aa as TLSInfo, ab as Tracer, ac as ViolationDeliveryStats, ad as ViolationEvent, ae as classifyUserAgent, af as consoleLogger, ag as createOffensiveToolchainEvidence, ah as deriveKey, ai as fromPino, aj as matchUserAgent, ak as newDecisionId, al as readEdgeVerdict, am as silentLogger } from './sdk-Gay_Ddzy.mjs';
|
|
3
|
+
import { T as TrustedProxies } from './detect-and-gate-DtE2PPTM.mjs';
|
|
4
|
+
export { B as CLEARANCE_GATE_BUILD, C as ClearanceContext, a as ClearanceGateOptions, D as DetectAndGateOptions, b as DetectAndGateOutcome, F as FetchGuard, c as FetchGuardOptions, G as GateEnv, d as GateOutcome, e as GuardLifecycle, f as GuardOutcome, H as HeaderSource, R as ResolveClientIpOptions, g as createClearanceGate, h as createDetectAndGate, i as createFetchGuard, j as ipInCidr, n as normalizeIp, r as resolveClientIp, k as resolveGateEnv } from './detect-and-gate-DtE2PPTM.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The reserved test trigger.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as Rule, a as RuleContext, b as RuleResult, c as RuleEngineResult, d as RateLimitConfig, F as FilterConfig, T as TripwireConfig, B as BotRuleConfig, e as BotAgent, f as BotCategory, A as AgentCategory, g as RateLimitStore, h as RateLimitConsume, i as RateLimitOutcome, W as WebDecoy, P as ProtectResult, D as Decision, j as WebDecoyConfig, k as ProtectOptions, l as AgentVerifierOptions, m as AgentRequestInput, n as AgentVerdict, S as SignedAgentDirectory } from './sdk-
|
|
2
|
-
export { o as AgentStatus, p as BOT_CATEGORIES, q as BOT_REGISTRY, r as BotVerdict, C as Characteristic, s as Conclusion, t as CreatedHoneyCredential, u as DEFAULT_CHARACTERISTICS, v as DecisionCache, w as DecisionCacheOptions, x as DecisionInit, y as DecisionMode, E as EDGE_CLASS_HEADER, z as EDGE_CLEARANCE_HEADER, G as EdgeClass, H as EdgeVerdict, I as FrameworkEvidenceObservation, J as HoneyCredentialHandle, K as HoneyCredentialOptions, L as HoneyCredentialPresentationResult, M as HoneyCredentialReceipt, N as IPEnrichmentData, O as LocalAnalysis, Q as LogFields, U as Logger, V as MemoryRateLimitStore, X as OffensiveToolFamily, Y as OffensiveToolInvocation, Z as OffensiveToolchainEvidence, _ as OffensiveToolchainEvidenceInput, $ as OffensiveToolchainObservation, a0 as RequestMetadata, a1 as RuleOutcome, a2 as RuleState, a3 as SDKDetectionRequest, a4 as SDKDetectionResponse, a5 as SSRFCanary, a6 as SSRFCanaryOptions, a7 as SSRFInitiationReceipt, a8 as Span, a9 as SyncRateLimitStore, aa as TLSInfo, ab as Tracer, ac as ViolationDeliveryStats, ad as ViolationEvent, ae as classifyUserAgent, af as consoleLogger, ag as createOffensiveToolchainEvidence, ah as deriveKey, ai as fromPino, aj as matchUserAgent, ak as newDecisionId, al as readEdgeVerdict, am as silentLogger } from './sdk-
|
|
3
|
-
import { T as TrustedProxies } from './detect-and-gate-
|
|
4
|
-
export { B as CLEARANCE_GATE_BUILD, C as ClearanceContext, a as ClearanceGateOptions, D as DetectAndGateOptions, b as DetectAndGateOutcome, F as FetchGuard, c as FetchGuardOptions, G as GateEnv, d as GateOutcome, e as GuardOutcome, H as HeaderSource, R as ResolveClientIpOptions,
|
|
1
|
+
import { R as Rule, a as RuleContext, b as RuleResult, c as RuleEngineResult, d as RateLimitConfig, F as FilterConfig, T as TripwireConfig, B as BotRuleConfig, e as BotAgent, f as BotCategory, A as AgentCategory, g as RateLimitStore, h as RateLimitConsume, i as RateLimitOutcome, W as WebDecoy, P as ProtectResult, D as Decision, j as WebDecoyConfig, k as ProtectOptions, l as AgentVerifierOptions, m as AgentRequestInput, n as AgentVerdict, S as SignedAgentDirectory } from './sdk-Gay_Ddzy.js';
|
|
2
|
+
export { o as AgentStatus, p as BOT_CATEGORIES, q as BOT_REGISTRY, r as BotVerdict, C as Characteristic, s as Conclusion, t as CreatedHoneyCredential, u as DEFAULT_CHARACTERISTICS, v as DecisionCache, w as DecisionCacheOptions, x as DecisionInit, y as DecisionMode, E as EDGE_CLASS_HEADER, z as EDGE_CLEARANCE_HEADER, G as EdgeClass, H as EdgeVerdict, I as FrameworkEvidenceObservation, J as HoneyCredentialHandle, K as HoneyCredentialOptions, L as HoneyCredentialPresentationResult, M as HoneyCredentialReceipt, N as IPEnrichmentData, O as LocalAnalysis, Q as LogFields, U as Logger, V as MemoryRateLimitStore, X as OffensiveToolFamily, Y as OffensiveToolInvocation, Z as OffensiveToolchainEvidence, _ as OffensiveToolchainEvidenceInput, $ as OffensiveToolchainObservation, a0 as RequestMetadata, a1 as RuleOutcome, a2 as RuleState, a3 as SDKDetectionRequest, a4 as SDKDetectionResponse, a5 as SSRFCanary, a6 as SSRFCanaryOptions, a7 as SSRFInitiationReceipt, a8 as Span, a9 as SyncRateLimitStore, aa as TLSInfo, ab as Tracer, ac as ViolationDeliveryStats, ad as ViolationEvent, ae as classifyUserAgent, af as consoleLogger, ag as createOffensiveToolchainEvidence, ah as deriveKey, ai as fromPino, aj as matchUserAgent, ak as newDecisionId, al as readEdgeVerdict, am as silentLogger } from './sdk-Gay_Ddzy.js';
|
|
3
|
+
import { T as TrustedProxies } from './detect-and-gate-neuBgxUB.js';
|
|
4
|
+
export { B as CLEARANCE_GATE_BUILD, C as ClearanceContext, a as ClearanceGateOptions, D as DetectAndGateOptions, b as DetectAndGateOutcome, F as FetchGuard, c as FetchGuardOptions, G as GateEnv, d as GateOutcome, e as GuardLifecycle, f as GuardOutcome, H as HeaderSource, R as ResolveClientIpOptions, g as createClearanceGate, h as createDetectAndGate, i as createFetchGuard, j as ipInCidr, n as normalizeIp, r as resolveClientIp, k as resolveGateEnv } from './detect-and-gate-neuBgxUB.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The reserved test trigger.
|