@webdecoy/node 0.30.0 → 0.32.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-32TEUD5K.mjs → chunk-CUAZKMMQ.mjs} +56 -1
- package/dist/{chunk-VPPTUL5K.mjs → chunk-S7GDCKKB.mjs} +87 -87
- package/dist/{detect-and-gate-Dnfo2t3B.d.ts → detect-and-gate-DtE2PPTM.d.mts} +12 -3
- package/dist/{detect-and-gate-BNq26N9d.d.mts → detect-and-gate-neuBgxUB.d.ts} +12 -3
- package/dist/index.d.mts +35 -4
- package/dist/index.d.ts +35 -4
- package/dist/index.js +208 -101
- package/dist/index.mjs +53 -2
- package/dist/{sdk-CJ6pmQGy.d.mts → sdk-Gay_Ddzy.d.mts} +23 -2
- package/dist/{sdk-CJ6pmQGy.d.ts → sdk-Gay_Ddzy.d.ts} +23 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +56 -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 +156 -101
- package/dist/vercel.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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,6 +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, j as
|
|
2
|
-
export {
|
|
3
|
-
|
|
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';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* The reserved test trigger.
|
|
@@ -1361,6 +1362,36 @@ declare function armSiteHoneytoken(sdk: WebDecoy, options: HoneytokenArmingOptio
|
|
|
1361
1362
|
*/
|
|
1362
1363
|
declare function deriveAndArm(sdk: WebDecoy, options: HoneytokenArmingOptions): Promise<SiteHoneytoken | null>;
|
|
1363
1364
|
|
|
1365
|
+
interface NodeHttpGuardOptions extends WebDecoyConfig, ProtectOptions {
|
|
1366
|
+
/** Monitor serves the request even when the SDK reports a denial. */
|
|
1367
|
+
mode?: 'monitor' | 'enforce';
|
|
1368
|
+
/** Paths excluded from evaluation, such as health checks. */
|
|
1369
|
+
skipPaths?: (string | RegExp)[];
|
|
1370
|
+
/** Defaults to the connection peer. Set this to trust a known proxy chain. */
|
|
1371
|
+
trustProxy?: TrustedProxies;
|
|
1372
|
+
}
|
|
1373
|
+
interface NodeHttpGuardOutcome {
|
|
1374
|
+
decision: Decision;
|
|
1375
|
+
/** Present when enforce mode refuses the request. The caller writes it. */
|
|
1376
|
+
response?: BlockResponse;
|
|
1377
|
+
}
|
|
1378
|
+
/** The request fields read from Node's IncomingMessage. */
|
|
1379
|
+
interface NodeHttpRequest {
|
|
1380
|
+
method?: string;
|
|
1381
|
+
url?: string;
|
|
1382
|
+
headers: Record<string, string | string[] | undefined>;
|
|
1383
|
+
socket: {
|
|
1384
|
+
remoteAddress?: string;
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
interface NodeHttpGuard {
|
|
1388
|
+
sdk: WebDecoy;
|
|
1389
|
+
/** Evaluate a request without reading its body. Skipped paths return undefined. */
|
|
1390
|
+
check(request: NodeHttpRequest): Promise<NodeHttpGuardOutcome | undefined>;
|
|
1391
|
+
}
|
|
1392
|
+
/** Evaluate native Node HTTP requests with the same rules as the framework adapters. */
|
|
1393
|
+
declare function createNodeHttpGuard(options?: NodeHttpGuardOptions): NodeHttpGuard;
|
|
1394
|
+
|
|
1364
1395
|
/**
|
|
1365
1396
|
* AgentVerifier — the public entry point for local Web Bot Auth verification.
|
|
1366
1397
|
*
|
|
@@ -1781,4 +1812,4 @@ declare function createCaptchaEndpoints(options?: CaptchaEndpointsOptions): {
|
|
|
1781
1812
|
};
|
|
1782
1813
|
type CaptchaEndpoints = ReturnType<typeof createCaptchaEndpoints>;
|
|
1783
1814
|
|
|
1784
|
-
export { ATTACK_SIGNATURE_IDS, AgentCategory, AgentRequestInput, AgentVerdict, AgentVerifier, AgentVerifierOptions, type AttackSignatureConfig, AttackSignatureRule, type BehavioralSignals, type BlockResponse, BotAgent, BotCategory, BotPolicy, type BotPolicyOptions, BotRule, BotRuleConfig, CLIENT_SESSION_COOKIE, CLIENT_SESSION_HEADER, Captcha, type CaptchaEndpoints, type CaptchaEndpointsOptions, type CaptchaHttpResponse, type CaptchaOptions, type CaptchaRequest, type CategoryScores, type ChallengeData, type ChallengeStore, type ClientSignalConfig, ClientSignalRule, type ClientSignalStore, type ClientVerdict, DEFAULT_SIGNED_AGENT_DIRECTORIES, DEFAULT_TRIPWIRE_PATHS, DEFAULT_WEIGHTS, type Detection, type DetectionContext, DetectionEngine, type DetectionEngineOptions, type DetectionScoringPolicy, DirectoryCache, type EnvironmentalSignals, FilterConfig, FilterRule, type FingerprintStore, type FormAnalysisSignals, HONEYTOKEN_BASE_PATH, type Honeytoken, type HoneytokenArmingOptions, type HoneytokenLinkProps, type HoneytokenOptions, InMemoryChallengeStore, InMemoryFingerprintStore, InMemoryRateLimiter, InMemoryTokenStore, MemoryClientSignalStore, type MemoryClientSignalStoreOptions, PoWManager, type PoWManagerOptions, type PoWOutcome, type PoWSolution, type PoWVerification, ProtectResult, RateLimitConfig, RateLimitConsume, RateLimitOutcome, RateLimitRule, RateLimitStore, type RateLimiter, type Recommendation, type RobotsTxtOptions, Rule, RuleContext, RuleEngine, RuleEngineResult, RuleResult, type ScoreResult, type ScoringComparison, type ScrollJumpObservation, type Signals, SignedAgentDirectory, type SiteHoneytoken, type SiteHoneytokenOptions, type StoredChallenge, TEST_TRIGGER_UA_PREFIX, TEST_TRIGGER_USER_AGENT, type TemporalSignals, type TextareaKeyboardStats, TokenManager, type TokenManagerOptions, type TokenStore, type TokenVerification, TripwireConfig, TripwireRule, UpstashRateLimitStore, type UpstashStoreOptions, type Verdict, type VerifyInput, type VerifyResult, type WebBotAuthConfig, WebBotAuthRule, WebDecoy, armSiteHoneytoken, attackSignatures, botPolicy, bots, calculateCategoryScores, calculateFinalScore, clientSignals, createAgentVerifier, createCaptchaEndpoints, deriveAndArm, filter, honeytoken, injectHoneytokenLink, isDatacenterIP, isInjectableHtml, isMobileUA, isTestTriggerUserAgent, parseUserAgent, rateLimit, readClientSession, recommend, resolveSecret, ruleBlockResponse, shouldSkipPath, siteHoneytoken, tripwire, upstashRateLimitStore, webBotAuth };
|
|
1815
|
+
export { ATTACK_SIGNATURE_IDS, AgentCategory, AgentRequestInput, AgentVerdict, AgentVerifier, AgentVerifierOptions, type AttackSignatureConfig, AttackSignatureRule, type BehavioralSignals, type BlockResponse, BotAgent, BotCategory, BotPolicy, type BotPolicyOptions, BotRule, BotRuleConfig, CLIENT_SESSION_COOKIE, CLIENT_SESSION_HEADER, Captcha, type CaptchaEndpoints, type CaptchaEndpointsOptions, type CaptchaHttpResponse, type CaptchaOptions, type CaptchaRequest, type CategoryScores, type ChallengeData, type ChallengeStore, type ClientSignalConfig, ClientSignalRule, type ClientSignalStore, type ClientVerdict, DEFAULT_SIGNED_AGENT_DIRECTORIES, DEFAULT_TRIPWIRE_PATHS, DEFAULT_WEIGHTS, Decision, type Detection, type DetectionContext, DetectionEngine, type DetectionEngineOptions, type DetectionScoringPolicy, DirectoryCache, type EnvironmentalSignals, FilterConfig, FilterRule, type FingerprintStore, type FormAnalysisSignals, HONEYTOKEN_BASE_PATH, type Honeytoken, type HoneytokenArmingOptions, type HoneytokenLinkProps, type HoneytokenOptions, InMemoryChallengeStore, InMemoryFingerprintStore, InMemoryRateLimiter, InMemoryTokenStore, MemoryClientSignalStore, type MemoryClientSignalStoreOptions, type NodeHttpGuard, type NodeHttpGuardOptions, type NodeHttpGuardOutcome, type NodeHttpRequest, PoWManager, type PoWManagerOptions, type PoWOutcome, type PoWSolution, type PoWVerification, ProtectOptions, ProtectResult, RateLimitConfig, RateLimitConsume, RateLimitOutcome, RateLimitRule, RateLimitStore, type RateLimiter, type Recommendation, type RobotsTxtOptions, Rule, RuleContext, RuleEngine, RuleEngineResult, RuleResult, type ScoreResult, type ScoringComparison, type ScrollJumpObservation, type Signals, SignedAgentDirectory, type SiteHoneytoken, type SiteHoneytokenOptions, type StoredChallenge, TEST_TRIGGER_UA_PREFIX, TEST_TRIGGER_USER_AGENT, type TemporalSignals, type TextareaKeyboardStats, TokenManager, type TokenManagerOptions, type TokenStore, type TokenVerification, TripwireConfig, TripwireRule, TrustedProxies, UpstashRateLimitStore, type UpstashStoreOptions, type Verdict, type VerifyInput, type VerifyResult, type WebBotAuthConfig, WebBotAuthRule, WebDecoy, WebDecoyConfig, armSiteHoneytoken, attackSignatures, botPolicy, bots, calculateCategoryScores, calculateFinalScore, clientSignals, createAgentVerifier, createCaptchaEndpoints, createNodeHttpGuard, deriveAndArm, filter, honeytoken, injectHoneytokenLink, isDatacenterIP, isInjectableHtml, isMobileUA, isTestTriggerUserAgent, parseUserAgent, rateLimit, readClientSession, recommend, resolveSecret, ruleBlockResponse, shouldSkipPath, siteHoneytoken, tripwire, upstashRateLimitStore, webBotAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +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, j as
|
|
2
|
-
export {
|
|
3
|
-
|
|
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';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* The reserved test trigger.
|
|
@@ -1361,6 +1362,36 @@ declare function armSiteHoneytoken(sdk: WebDecoy, options: HoneytokenArmingOptio
|
|
|
1361
1362
|
*/
|
|
1362
1363
|
declare function deriveAndArm(sdk: WebDecoy, options: HoneytokenArmingOptions): Promise<SiteHoneytoken | null>;
|
|
1363
1364
|
|
|
1365
|
+
interface NodeHttpGuardOptions extends WebDecoyConfig, ProtectOptions {
|
|
1366
|
+
/** Monitor serves the request even when the SDK reports a denial. */
|
|
1367
|
+
mode?: 'monitor' | 'enforce';
|
|
1368
|
+
/** Paths excluded from evaluation, such as health checks. */
|
|
1369
|
+
skipPaths?: (string | RegExp)[];
|
|
1370
|
+
/** Defaults to the connection peer. Set this to trust a known proxy chain. */
|
|
1371
|
+
trustProxy?: TrustedProxies;
|
|
1372
|
+
}
|
|
1373
|
+
interface NodeHttpGuardOutcome {
|
|
1374
|
+
decision: Decision;
|
|
1375
|
+
/** Present when enforce mode refuses the request. The caller writes it. */
|
|
1376
|
+
response?: BlockResponse;
|
|
1377
|
+
}
|
|
1378
|
+
/** The request fields read from Node's IncomingMessage. */
|
|
1379
|
+
interface NodeHttpRequest {
|
|
1380
|
+
method?: string;
|
|
1381
|
+
url?: string;
|
|
1382
|
+
headers: Record<string, string | string[] | undefined>;
|
|
1383
|
+
socket: {
|
|
1384
|
+
remoteAddress?: string;
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
interface NodeHttpGuard {
|
|
1388
|
+
sdk: WebDecoy;
|
|
1389
|
+
/** Evaluate a request without reading its body. Skipped paths return undefined. */
|
|
1390
|
+
check(request: NodeHttpRequest): Promise<NodeHttpGuardOutcome | undefined>;
|
|
1391
|
+
}
|
|
1392
|
+
/** Evaluate native Node HTTP requests with the same rules as the framework adapters. */
|
|
1393
|
+
declare function createNodeHttpGuard(options?: NodeHttpGuardOptions): NodeHttpGuard;
|
|
1394
|
+
|
|
1364
1395
|
/**
|
|
1365
1396
|
* AgentVerifier — the public entry point for local Web Bot Auth verification.
|
|
1366
1397
|
*
|
|
@@ -1781,4 +1812,4 @@ declare function createCaptchaEndpoints(options?: CaptchaEndpointsOptions): {
|
|
|
1781
1812
|
};
|
|
1782
1813
|
type CaptchaEndpoints = ReturnType<typeof createCaptchaEndpoints>;
|
|
1783
1814
|
|
|
1784
|
-
export { ATTACK_SIGNATURE_IDS, AgentCategory, AgentRequestInput, AgentVerdict, AgentVerifier, AgentVerifierOptions, type AttackSignatureConfig, AttackSignatureRule, type BehavioralSignals, type BlockResponse, BotAgent, BotCategory, BotPolicy, type BotPolicyOptions, BotRule, BotRuleConfig, CLIENT_SESSION_COOKIE, CLIENT_SESSION_HEADER, Captcha, type CaptchaEndpoints, type CaptchaEndpointsOptions, type CaptchaHttpResponse, type CaptchaOptions, type CaptchaRequest, type CategoryScores, type ChallengeData, type ChallengeStore, type ClientSignalConfig, ClientSignalRule, type ClientSignalStore, type ClientVerdict, DEFAULT_SIGNED_AGENT_DIRECTORIES, DEFAULT_TRIPWIRE_PATHS, DEFAULT_WEIGHTS, type Detection, type DetectionContext, DetectionEngine, type DetectionEngineOptions, type DetectionScoringPolicy, DirectoryCache, type EnvironmentalSignals, FilterConfig, FilterRule, type FingerprintStore, type FormAnalysisSignals, HONEYTOKEN_BASE_PATH, type Honeytoken, type HoneytokenArmingOptions, type HoneytokenLinkProps, type HoneytokenOptions, InMemoryChallengeStore, InMemoryFingerprintStore, InMemoryRateLimiter, InMemoryTokenStore, MemoryClientSignalStore, type MemoryClientSignalStoreOptions, PoWManager, type PoWManagerOptions, type PoWOutcome, type PoWSolution, type PoWVerification, ProtectResult, RateLimitConfig, RateLimitConsume, RateLimitOutcome, RateLimitRule, RateLimitStore, type RateLimiter, type Recommendation, type RobotsTxtOptions, Rule, RuleContext, RuleEngine, RuleEngineResult, RuleResult, type ScoreResult, type ScoringComparison, type ScrollJumpObservation, type Signals, SignedAgentDirectory, type SiteHoneytoken, type SiteHoneytokenOptions, type StoredChallenge, TEST_TRIGGER_UA_PREFIX, TEST_TRIGGER_USER_AGENT, type TemporalSignals, type TextareaKeyboardStats, TokenManager, type TokenManagerOptions, type TokenStore, type TokenVerification, TripwireConfig, TripwireRule, UpstashRateLimitStore, type UpstashStoreOptions, type Verdict, type VerifyInput, type VerifyResult, type WebBotAuthConfig, WebBotAuthRule, WebDecoy, armSiteHoneytoken, attackSignatures, botPolicy, bots, calculateCategoryScores, calculateFinalScore, clientSignals, createAgentVerifier, createCaptchaEndpoints, deriveAndArm, filter, honeytoken, injectHoneytokenLink, isDatacenterIP, isInjectableHtml, isMobileUA, isTestTriggerUserAgent, parseUserAgent, rateLimit, readClientSession, recommend, resolveSecret, ruleBlockResponse, shouldSkipPath, siteHoneytoken, tripwire, upstashRateLimitStore, webBotAuth };
|
|
1815
|
+
export { ATTACK_SIGNATURE_IDS, AgentCategory, AgentRequestInput, AgentVerdict, AgentVerifier, AgentVerifierOptions, type AttackSignatureConfig, AttackSignatureRule, type BehavioralSignals, type BlockResponse, BotAgent, BotCategory, BotPolicy, type BotPolicyOptions, BotRule, BotRuleConfig, CLIENT_SESSION_COOKIE, CLIENT_SESSION_HEADER, Captcha, type CaptchaEndpoints, type CaptchaEndpointsOptions, type CaptchaHttpResponse, type CaptchaOptions, type CaptchaRequest, type CategoryScores, type ChallengeData, type ChallengeStore, type ClientSignalConfig, ClientSignalRule, type ClientSignalStore, type ClientVerdict, DEFAULT_SIGNED_AGENT_DIRECTORIES, DEFAULT_TRIPWIRE_PATHS, DEFAULT_WEIGHTS, Decision, type Detection, type DetectionContext, DetectionEngine, type DetectionEngineOptions, type DetectionScoringPolicy, DirectoryCache, type EnvironmentalSignals, FilterConfig, FilterRule, type FingerprintStore, type FormAnalysisSignals, HONEYTOKEN_BASE_PATH, type Honeytoken, type HoneytokenArmingOptions, type HoneytokenLinkProps, type HoneytokenOptions, InMemoryChallengeStore, InMemoryFingerprintStore, InMemoryRateLimiter, InMemoryTokenStore, MemoryClientSignalStore, type MemoryClientSignalStoreOptions, type NodeHttpGuard, type NodeHttpGuardOptions, type NodeHttpGuardOutcome, type NodeHttpRequest, PoWManager, type PoWManagerOptions, type PoWOutcome, type PoWSolution, type PoWVerification, ProtectOptions, ProtectResult, RateLimitConfig, RateLimitConsume, RateLimitOutcome, RateLimitRule, RateLimitStore, type RateLimiter, type Recommendation, type RobotsTxtOptions, Rule, RuleContext, RuleEngine, RuleEngineResult, RuleResult, type ScoreResult, type ScoringComparison, type ScrollJumpObservation, type Signals, SignedAgentDirectory, type SiteHoneytoken, type SiteHoneytokenOptions, type StoredChallenge, TEST_TRIGGER_UA_PREFIX, TEST_TRIGGER_USER_AGENT, type TemporalSignals, type TextareaKeyboardStats, TokenManager, type TokenManagerOptions, type TokenStore, type TokenVerification, TripwireConfig, TripwireRule, TrustedProxies, UpstashRateLimitStore, type UpstashStoreOptions, type Verdict, type VerifyInput, type VerifyResult, type WebBotAuthConfig, WebBotAuthRule, WebDecoy, WebDecoyConfig, armSiteHoneytoken, attackSignatures, botPolicy, bots, calculateCategoryScores, calculateFinalScore, clientSignals, createAgentVerifier, createCaptchaEndpoints, createNodeHttpGuard, deriveAndArm, filter, honeytoken, injectHoneytokenLink, isDatacenterIP, isInjectableHtml, isMobileUA, isTestTriggerUserAgent, parseUserAgent, rateLimit, readClientSession, recommend, resolveSecret, ruleBlockResponse, shouldSkipPath, siteHoneytoken, tripwire, upstashRateLimitStore, webBotAuth };
|