@webdecoy/node 0.14.0 → 0.15.1
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/{chunk-4QKKW7GN.mjs → chunk-T6MX62T5.mjs} +4 -7
- package/dist/index.js +4 -7
- package/dist/index.mjs +1 -1
- package/dist/testing.js +4 -7
- package/dist/testing.mjs +1 -1
- package/package.json +1 -1
|
@@ -2670,11 +2670,8 @@ function calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP) {
|
|
|
2670
2670
|
if (datacenterIP) score += 40;
|
|
2671
2671
|
return Math.min(score, 100);
|
|
2672
2672
|
}
|
|
2673
|
-
function needsVerification(
|
|
2674
|
-
|
|
2675
|
-
return true;
|
|
2676
|
-
}
|
|
2677
|
-
return localScore >= 30;
|
|
2673
|
+
function needsVerification(suspiciousHeaders, hasTLSInfo) {
|
|
2674
|
+
return hasTLSInfo || suspiciousHeaders;
|
|
2678
2675
|
}
|
|
2679
2676
|
function buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata) {
|
|
2680
2677
|
const flags = [];
|
|
@@ -2702,7 +2699,7 @@ function analyzeRequest(metadata) {
|
|
|
2702
2699
|
const datacenterIP = isDatacenterIP(metadata.ip);
|
|
2703
2700
|
const localScore = calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP);
|
|
2704
2701
|
const hasTLSInfo = Boolean(metadata.tls_info);
|
|
2705
|
-
const needsVerify = needsVerification(
|
|
2702
|
+
const needsVerify = needsVerification(suspiciousHeaders, hasTLSInfo);
|
|
2706
2703
|
const flags = buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata);
|
|
2707
2704
|
return {
|
|
2708
2705
|
suspicious_headers: suspiciousHeaders,
|
|
@@ -3182,7 +3179,7 @@ var WebDecoy = class {
|
|
|
3182
3179
|
local_analysis: localAnalysis
|
|
3183
3180
|
};
|
|
3184
3181
|
const shouldCallServer = localAnalysis.needs_verification || this.config.enableTLSFingerprinting && metadata.tls_info;
|
|
3185
|
-
if (!shouldCallServer
|
|
3182
|
+
if (!shouldCallServer) {
|
|
3186
3183
|
return new Decision({
|
|
3187
3184
|
conclusion: "ALLOW",
|
|
3188
3185
|
detection: {
|
package/dist/index.js
CHANGED
|
@@ -333,11 +333,8 @@ function calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP) {
|
|
|
333
333
|
if (datacenterIP) score += 40;
|
|
334
334
|
return Math.min(score, 100);
|
|
335
335
|
}
|
|
336
|
-
function needsVerification(
|
|
337
|
-
|
|
338
|
-
return true;
|
|
339
|
-
}
|
|
340
|
-
return localScore >= 30;
|
|
336
|
+
function needsVerification(suspiciousHeaders, hasTLSInfo) {
|
|
337
|
+
return hasTLSInfo || suspiciousHeaders;
|
|
341
338
|
}
|
|
342
339
|
function buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata) {
|
|
343
340
|
const flags = [];
|
|
@@ -365,7 +362,7 @@ function analyzeRequest(metadata) {
|
|
|
365
362
|
const datacenterIP = isDatacenterIP(metadata.ip);
|
|
366
363
|
const localScore = calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP);
|
|
367
364
|
const hasTLSInfo = Boolean(metadata.tls_info);
|
|
368
|
-
const needsVerify = needsVerification(
|
|
365
|
+
const needsVerify = needsVerification(suspiciousHeaders, hasTLSInfo);
|
|
369
366
|
const flags = buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata);
|
|
370
367
|
return {
|
|
371
368
|
suspicious_headers: suspiciousHeaders,
|
|
@@ -3286,7 +3283,7 @@ var WebDecoy = class {
|
|
|
3286
3283
|
local_analysis: localAnalysis
|
|
3287
3284
|
};
|
|
3288
3285
|
const shouldCallServer = localAnalysis.needs_verification || this.config.enableTLSFingerprinting && metadata.tls_info;
|
|
3289
|
-
if (!shouldCallServer
|
|
3286
|
+
if (!shouldCallServer) {
|
|
3290
3287
|
return new Decision({
|
|
3291
3288
|
conclusion: "ALLOW",
|
|
3292
3289
|
detection: {
|
package/dist/index.mjs
CHANGED
package/dist/testing.js
CHANGED
|
@@ -263,11 +263,8 @@ function calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP) {
|
|
|
263
263
|
if (datacenterIP) score += 40;
|
|
264
264
|
return Math.min(score, 100);
|
|
265
265
|
}
|
|
266
|
-
function needsVerification(
|
|
267
|
-
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
return localScore >= 30;
|
|
266
|
+
function needsVerification(suspiciousHeaders, hasTLSInfo) {
|
|
267
|
+
return hasTLSInfo || suspiciousHeaders;
|
|
271
268
|
}
|
|
272
269
|
function buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata) {
|
|
273
270
|
const flags = [];
|
|
@@ -295,7 +292,7 @@ function analyzeRequest(metadata) {
|
|
|
295
292
|
const datacenterIP = isDatacenterIP(metadata.ip);
|
|
296
293
|
const localScore = calculateLocalScore(suspiciousHeaders, missingSecCHUA, datacenterIP);
|
|
297
294
|
const hasTLSInfo = Boolean(metadata.tls_info);
|
|
298
|
-
const needsVerify = needsVerification(
|
|
295
|
+
const needsVerify = needsVerification(suspiciousHeaders, hasTLSInfo);
|
|
299
296
|
const flags = buildFlags(suspiciousHeaders, missingSecCHUA, datacenterIP, metadata);
|
|
300
297
|
return {
|
|
301
298
|
suspicious_headers: suspiciousHeaders,
|
|
@@ -2029,7 +2026,7 @@ var WebDecoy = class {
|
|
|
2029
2026
|
local_analysis: localAnalysis
|
|
2030
2027
|
};
|
|
2031
2028
|
const shouldCallServer = localAnalysis.needs_verification || this.config.enableTLSFingerprinting && metadata.tls_info;
|
|
2032
|
-
if (!shouldCallServer
|
|
2029
|
+
if (!shouldCallServer) {
|
|
2033
2030
|
return new Decision({
|
|
2034
2031
|
conclusion: "ALLOW",
|
|
2035
2032
|
detection: {
|
package/dist/testing.mjs
CHANGED