@kya-os/checkpoint-shared 1.9.0 → 1.11.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/CHANGELOG.md +113 -0
- package/README.md +1 -1
- package/dist/base64url-BbVG8f-v.js +65 -0
- package/dist/base64url-D2MvsR20.mjs +49 -0
- package/dist/base64url-D2MvsR20.mjs.map +1 -0
- package/dist/beacon-forward-secret/index.d.mts +4 -0
- package/dist/beacon-forward-secret/index.d.mts.map +1 -0
- package/dist/beacon-forward-secret/index.d.ts +4 -0
- package/dist/beacon-forward-secret/index.d.ts.map +1 -0
- package/dist/beacon-forward-secret/index.js +15 -0
- package/dist/beacon-forward-secret/index.mjs +15 -0
- package/dist/beacon-forward-secret/index.mjs.map +1 -0
- package/dist/beacon-types/index.d.mts +53 -1
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +53 -1
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +86 -1
- package/dist/beacon-types/index.mjs +77 -2
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/{browser-posture-5fPrsxx7.d.mts → browser-posture-WPk0kl9u.d.mts} +18 -1
- package/dist/browser-posture-WPk0kl9u.d.mts.map +1 -0
- package/dist/{browser-posture-CCR1kh5e.d.ts → browser-posture-_y6BcdXw.d.ts} +18 -1
- package/dist/browser-posture-_y6BcdXw.d.ts.map +1 -0
- package/dist/browser-posture-cookie.mjs.map +1 -1
- package/dist/browser-posture-proof-verifier.js +136 -5
- package/dist/browser-posture-proof-verifier.mjs +134 -2
- package/dist/browser-posture-proof-verifier.mjs.map +1 -0
- package/dist/browser-posture-proof.d.mts +1 -1
- package/dist/browser-posture-proof.d.ts +1 -1
- package/dist/browser-posture-proof.js +1 -1
- package/dist/browser-posture-proof.mjs +1 -1
- package/dist/browser-posture-report.d.mts +17 -0
- package/dist/browser-posture-report.d.mts.map +1 -1
- package/dist/browser-posture-report.d.ts +17 -0
- package/dist/browser-posture-report.d.ts.map +1 -1
- package/dist/browser-posture.d.mts +1 -1
- package/dist/browser-posture.d.ts +1 -1
- package/dist/browser-posture.js +53 -5
- package/dist/browser-posture.mjs +53 -5
- package/dist/browser-posture.mjs.map +1 -1
- package/dist/browser.d.mts +10 -0
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +10 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/browser.mjs.map +1 -1
- package/dist/canonical-signer/index.d.mts.map +1 -1
- package/dist/canonical-signer/index.d.ts.map +1 -1
- package/dist/canonical-signer/index.js +0 -4
- package/dist/canonical-signer/index.mjs +0 -4
- package/dist/canonical-signer/index.mjs.map +1 -1
- package/dist/{client-ip-B7w-uHfS.d.ts → client-ip-8KneiMK0.d.mts} +12 -2
- package/dist/{client-ip-B7w-uHfS.d.mts.map → client-ip-8KneiMK0.d.mts.map} +1 -1
- package/dist/{client-ip-B7w-uHfS.d.mts → client-ip-8KneiMK0.d.ts} +12 -2
- package/dist/{client-ip-B7w-uHfS.d.ts.map → client-ip-8KneiMK0.d.ts.map} +1 -1
- package/dist/{client-ip-B8wFzJ5f.js → client-ip-BEmLC4I4.js} +71 -0
- package/dist/{client-ip-DIJyr6px.mjs → client-ip-DlHx7GGh.mjs} +61 -2
- package/dist/client-ip-DlHx7GGh.mjs.map +1 -0
- package/dist/client-ip.d.mts +2 -2
- package/dist/client-ip.d.ts +2 -2
- package/dist/client-ip.js +3 -1
- package/dist/client-ip.mjs +2 -2
- package/dist/deploy/index.d.mts +1 -0
- package/dist/deploy/index.d.mts.map +1 -1
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/index.js +14 -2
- package/dist/deploy/index.mjs +14 -2
- package/dist/deploy/index.mjs.map +1 -1
- package/dist/{detection-reason-mapping-CQexNvR7.d.ts → detection-reason-mapping-BemDaDED.d.mts} +5 -2
- package/dist/detection-reason-mapping-BemDaDED.d.mts.map +1 -0
- package/dist/{detection-reason-mapping-CQexNvR7.d.mts → detection-reason-mapping-BemDaDED.d.ts} +5 -2
- package/dist/detection-reason-mapping-BemDaDED.d.ts.map +1 -0
- package/dist/{detection-reason-mapping-B9RSkOs8.js → detection-reason-mapping-BxYaQ8kb.js} +33 -8
- package/dist/{detection-reason-mapping-BGymWIPl.mjs → detection-reason-mapping-j-7bXsVb.mjs} +29 -10
- package/dist/detection-reason-mapping-j-7bXsVb.mjs.map +1 -0
- package/dist/errors/index.d.mts +4 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +24 -8
- package/dist/errors/index.mjs +24 -8
- package/dist/errors/index.mjs.map +1 -1
- package/dist/{fetcher-D2vjr7jB.d.mts → fetcher-CTKz07jg.d.mts} +13 -3
- package/dist/fetcher-CTKz07jg.d.mts.map +1 -0
- package/dist/{fetcher-C8qvwdnA.d.ts → fetcher-DCr920hx.d.ts} +13 -3
- package/dist/fetcher-DCr920hx.d.ts.map +1 -0
- package/dist/gateway-client-ip.js +1 -1
- package/dist/gateway-client-ip.mjs +1 -1
- package/dist/host-adapter/index.d.mts +1 -1
- package/dist/host-adapter/index.d.ts +1 -1
- package/dist/identity-cookie/index.d.mts +14 -0
- package/dist/identity-cookie/index.d.mts.map +1 -0
- package/dist/identity-cookie/index.d.ts +14 -0
- package/dist/identity-cookie/index.d.ts.map +1 -0
- package/dist/identity-cookie/index.js +45 -0
- package/dist/identity-cookie/index.mjs +43 -0
- package/dist/identity-cookie/index.mjs.map +1 -0
- package/dist/{index-DnFsmr_o.d.ts → index-Cdv_FH0H.d.ts} +2 -2
- package/dist/{index-DnFsmr_o.d.ts.map → index-Cdv_FH0H.d.ts.map} +1 -1
- package/dist/{index-rvw5Bz-r.d.mts → index-DL_dmQBY.d.mts} +2 -2
- package/dist/{index-rvw5Bz-r.d.mts.map → index-DL_dmQBY.d.mts.map} +1 -1
- package/dist/index.d.mts +641 -169
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +641 -169
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +819 -210
- package/dist/index.mjs +765 -200
- package/dist/index.mjs.map +1 -1
- package/dist/kya-http.d.mts +2 -2
- package/dist/kya-http.d.ts +2 -2
- package/dist/kya-http.js +7 -2
- package/dist/kya-http.mjs +2 -2
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
- package/dist/patterns-CdTh7LU2.d.mts +35 -0
- package/dist/patterns-CdTh7LU2.d.mts.map +1 -0
- package/dist/patterns-CdTh7LU2.d.ts +35 -0
- package/dist/patterns-CdTh7LU2.d.ts.map +1 -0
- package/dist/{patterns-CiMpbdAF.js → patterns-CnNxRnaK.js} +3 -130
- package/dist/{patterns-D4OAsNQY.mjs → patterns-CpRk9R3M.mjs} +5 -96
- package/dist/patterns-CpRk9R3M.mjs.map +1 -0
- package/dist/patterns.d.mts +2 -2
- package/dist/patterns.d.ts +2 -2
- package/dist/patterns.js +1 -7
- package/dist/patterns.mjs +2 -2
- package/dist/policy/fetcher.d.mts +2 -2
- package/dist/policy/fetcher.d.ts +2 -2
- package/dist/policy/fetcher.js +100 -8
- package/dist/policy/fetcher.mjs +99 -9
- package/dist/policy/fetcher.mjs.map +1 -1
- package/dist/policy/schemas.d.mts +1 -1
- package/dist/policy/schemas.d.ts +1 -1
- package/dist/proxy-assertion-mapping-BVwXVSMZ.mjs +81 -0
- package/dist/proxy-assertion-mapping-BVwXVSMZ.mjs.map +1 -0
- package/dist/proxy-assertion-mapping-BxhENrcY.d.mts +70 -0
- package/dist/proxy-assertion-mapping-BxhENrcY.d.mts.map +1 -0
- package/dist/proxy-assertion-mapping-D64AyZfG.js +85 -0
- package/dist/proxy-assertion-mapping-DhAynFqG.d.ts +70 -0
- package/dist/proxy-assertion-mapping-DhAynFqG.d.ts.map +1 -0
- package/dist/proxy-assertions.d.mts +2 -0
- package/dist/proxy-assertions.d.ts +2 -0
- package/dist/proxy-assertions.js +4 -0
- package/dist/proxy-assertions.mjs +3 -0
- package/dist/reason-codes.d.mts +2 -2
- package/dist/reason-codes.d.ts +2 -2
- package/dist/reason-codes.js +3 -2
- package/dist/reason-codes.mjs +2 -2
- package/dist/{registered-sid-D6KCaT1E.d.ts → registered-sid-BgDhdj2l.d.mts} +24 -2
- package/dist/registered-sid-BgDhdj2l.d.mts.map +1 -0
- package/dist/{registered-sid-D6KCaT1E.d.mts → registered-sid-BgDhdj2l.d.ts} +24 -2
- package/dist/registered-sid-BgDhdj2l.d.ts.map +1 -0
- package/dist/{registered-sid-DVGTSH0L.js → registered-sid-DG1tSSvl.js} +162 -4
- package/dist/{registered-sid-26hNxp6t.mjs → registered-sid-D__xiDPu.mjs} +134 -6
- package/dist/registered-sid-D__xiDPu.mjs.map +1 -0
- package/dist/{schemas-m-GqyfyO.d.mts → schemas-BhC88D1-.d.mts} +5 -5
- package/dist/{schemas-m-GqyfyO.d.mts.map → schemas-BhC88D1-.d.mts.map} +1 -1
- package/dist/{schemas-CGKHzcMV.d.ts → schemas-DZa1ouGs.d.ts} +5 -5
- package/dist/{schemas-CGKHzcMV.d.ts.map → schemas-DZa1ouGs.d.ts.map} +1 -1
- package/dist/signals/index.d.mts.map +1 -1
- package/dist/signals/index.d.ts.map +1 -1
- package/dist/signals/index.js +4 -0
- package/dist/signals/index.mjs +4 -0
- package/dist/signals/index.mjs.map +1 -1
- package/dist/timezone-country-B6PkDyNP.d.mts +15 -0
- package/dist/timezone-country-B6PkDyNP.d.mts.map +1 -0
- package/dist/timezone-country-B6PkDyNP.d.ts +15 -0
- package/dist/timezone-country-B6PkDyNP.d.ts.map +1 -0
- package/dist/timezone-country-CROxU2Tl.js +505 -0
- package/dist/timezone-country-CrrnkOdy.mjs +489 -0
- package/dist/timezone-country-CrrnkOdy.mjs.map +1 -0
- package/dist/timezone-country.d.mts +2 -0
- package/dist/timezone-country.d.ts +2 -0
- package/dist/timezone-country.js +6 -0
- package/dist/timezone-country.mjs +3 -0
- package/dist/tool-protection/index.mjs.map +1 -1
- package/fixtures/detection/cloudflare-alias-parity.json +383 -0
- package/fixtures/detection/reason-codes.json +3 -1
- package/fixtures/detection/signal-exposure-example.json +1 -1
- package/fixtures/iana-tzdata/backward +375 -0
- package/fixtures/iana-tzdata/renamed-zones.json +21 -0
- package/fixtures/iana-tzdata/version +1 -0
- package/fixtures/iana-tzdata/zone.tab +448 -0
- package/fixtures/workbench/management-session.v1.json +20 -0
- package/fixtures/workbench/model-credentials.v1.json +8 -0
- package/fixtures/workbench/task-grant.v1.json +37 -0
- package/package.json +25 -3
- package/src/data/compiled/merged-rules.json +9 -7
- package/dist/browser-posture-5fPrsxx7.d.mts.map +0 -1
- package/dist/browser-posture-CCR1kh5e.d.ts.map +0 -1
- package/dist/browser-posture-proof-verifier-DvsOmFrM.js +0 -202
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +0 -180
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +0 -1
- package/dist/client-ip-DIJyr6px.mjs.map +0 -1
- package/dist/detection-reason-mapping-BGymWIPl.mjs.map +0 -1
- package/dist/detection-reason-mapping-CQexNvR7.d.mts.map +0 -1
- package/dist/detection-reason-mapping-CQexNvR7.d.ts.map +0 -1
- package/dist/fetcher-C8qvwdnA.d.ts.map +0 -1
- package/dist/fetcher-D2vjr7jB.d.mts.map +0 -1
- package/dist/patterns-Bp40cwh2.d.mts +0 -110
- package/dist/patterns-Bp40cwh2.d.mts.map +0 -1
- package/dist/patterns-Bp40cwh2.d.ts +0 -110
- package/dist/patterns-Bp40cwh2.d.ts.map +0 -1
- package/dist/patterns-D4OAsNQY.mjs.map +0 -1
- package/dist/registered-sid-26hNxp6t.mjs.map +0 -1
- package/dist/registered-sid-D6KCaT1E.d.mts.map +0 -1
- package/dist/registered-sid-D6KCaT1E.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -28,21 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
30
|
const require_schemas = require('./schemas-BlScS1it.js');
|
|
31
|
-
const
|
|
31
|
+
const require_proxy_assertion_mapping = require('./proxy-assertion-mapping-D64AyZfG.js');
|
|
32
|
+
const require_detection_reason_mapping = require('./detection-reason-mapping-BxYaQ8kb.js');
|
|
32
33
|
const require_ruleset_hash = require('./ruleset-hash-Cmv8MSO5.js');
|
|
33
34
|
const require_verification = require('./verification-BAw9N8Pt.js');
|
|
34
35
|
const require_agent_catalog = require('./agent-catalog.js');
|
|
35
|
-
const require_patterns = require('./patterns-
|
|
36
|
+
const require_patterns = require('./patterns-CnNxRnaK.js');
|
|
36
37
|
const require_posture_origins = require('./posture-origins-Ci6k4Zh1.js');
|
|
37
38
|
const require_host_adapter = require('./host-adapter-bWftXA9T.js');
|
|
38
|
-
const require_client_ip = require('./client-ip-
|
|
39
|
+
const require_client_ip = require('./client-ip-BEmLC4I4.js');
|
|
39
40
|
const require_schemas$1 = require('./schemas-Cm4C4Z5G.js');
|
|
40
41
|
const require_engine_enforcing = require('./engine-enforcing-AYEcgNsb.js');
|
|
41
42
|
const require_step_up = require('./step-up-Bp8RAQwv.js');
|
|
42
43
|
const require_policy_fetcher = require('./policy/fetcher.js');
|
|
43
44
|
const require_kya_http_error_codes = require('./kya-http-error-codes-B4rUmUEI.js');
|
|
44
|
-
const require_registered_sid = require('./registered-sid-
|
|
45
|
+
const require_registered_sid = require('./registered-sid-DG1tSSvl.js');
|
|
45
46
|
const require_default_sign_in_host = require('./default-sign-in-host.js');
|
|
47
|
+
const require_timezone_country = require('./timezone-country-CROxU2Tl.js');
|
|
48
|
+
const require_base64url = require('./base64url-BbVG8f-v.js');
|
|
46
49
|
let _noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
|
|
47
50
|
let _noble_hashes_utils_js = require("@noble/hashes/utils.js");
|
|
48
51
|
let js_yaml = require("js-yaml");
|
|
@@ -111,79 +114,6 @@ const ProxyAssertionSchema = require_schemas.object({
|
|
|
111
114
|
fraudProbability: require_schemas.number().min(0).max(1).nullable(),
|
|
112
115
|
proxyClass: require_schemas._enum(["datacenter", "unknown"]).optional()
|
|
113
116
|
}).strict();
|
|
114
|
-
const knownKinds = /* @__PURE__ */ new Set([
|
|
115
|
-
"tor_exit",
|
|
116
|
-
"published_vpn_exit",
|
|
117
|
-
"observed_proxy",
|
|
118
|
-
"suspected_residential_proxy",
|
|
119
|
-
"privacy_relay",
|
|
120
|
-
"local_tunnel",
|
|
121
|
-
"hosting"
|
|
122
|
-
]);
|
|
123
|
-
/**
|
|
124
|
-
* The default admits only confirmed, current assertions. maxmind_legacy preserves
|
|
125
|
-
* existing vendor positives without claiming that its undated optional file is fresh.
|
|
126
|
-
* Uncertain evidence never produces a confirmed-clean false Boolean.
|
|
127
|
-
*/
|
|
128
|
-
function mapProxyAssertions(proxyAssertions, nowSeconds, collectionState, compatibility = "confirmed_current") {
|
|
129
|
-
const states = [collectionState];
|
|
130
|
-
const eligible = [];
|
|
131
|
-
for (const assertion of proxyAssertions) {
|
|
132
|
-
if (!knownKinds.has(assertion.kind)) {
|
|
133
|
-
states.push("unsupported");
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
states.push(assertion.collectionState);
|
|
137
|
-
if (assertion.collectionState !== "current" && assertion.collectionState !== "insufficient_support") {
|
|
138
|
-
states.push(assertion.collectionState);
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
const dated = assertion.observedAt !== null && assertion.expiresAt !== null;
|
|
142
|
-
const current = dated && assertion.observedAt <= nowSeconds && assertion.expiresAt > nowSeconds;
|
|
143
|
-
if (dated && !current) {
|
|
144
|
-
states.push("stale");
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
const confirmed = assertion.evidenceGrade === "confirmed" && assertion.collectionState === "current" && current;
|
|
148
|
-
const legacy = compatibility === "maxmind_legacy" && assertion.source === "maxmind-anonymous-ip" && assertion.evidenceGrade === "vendor_reported" && assertion.collectionState === "insufficient_support" && assertion.observedAt === null && assertion.expiresAt === null;
|
|
149
|
-
if (confirmed || legacy) eligible.push(assertion);
|
|
150
|
-
else states.push("insufficient_support");
|
|
151
|
-
}
|
|
152
|
-
for (const assertion of eligible) if (assertion.membership === "present" && eligible.some((other) => other.kind === assertion.kind && other.membership === "absent")) states.push("conflicting");
|
|
153
|
-
if (proxyAssertions.length === 0) states.push("insufficient_support");
|
|
154
|
-
const proxyCollectionState = [
|
|
155
|
-
"conflicting",
|
|
156
|
-
"unsupported",
|
|
157
|
-
"unavailable",
|
|
158
|
-
"stale",
|
|
159
|
-
"insufficient_support",
|
|
160
|
-
"current"
|
|
161
|
-
].find((state) => states.includes(state));
|
|
162
|
-
const blocked = proxyCollectionState !== "current" && proxyCollectionState !== "insufficient_support";
|
|
163
|
-
const positive = eligible.filter((assertion) => assertion.membership === "present");
|
|
164
|
-
const preferred = [
|
|
165
|
-
positive.find((assertion) => assertion.kind === "tor_exit"),
|
|
166
|
-
positive.find((assertion) => assertion.kind === "published_vpn_exit"),
|
|
167
|
-
positive.find((assertion) => assertion.kind === "suspected_residential_proxy"),
|
|
168
|
-
positive.find((assertion) => assertion.kind === "observed_proxy" && assertion.proxyClass === "datacenter"),
|
|
169
|
-
positive.find((assertion) => assertion.kind === "observed_proxy")
|
|
170
|
-
].find(Boolean);
|
|
171
|
-
const types = {
|
|
172
|
-
tor_exit: "tor",
|
|
173
|
-
published_vpn_exit: "vpn",
|
|
174
|
-
suspected_residential_proxy: "residential_proxy",
|
|
175
|
-
observed_proxy: preferred?.proxyClass === "datacenter" ? "datacenter" : "unknown"
|
|
176
|
-
};
|
|
177
|
-
return {
|
|
178
|
-
proxy: !blocked && preferred ? {
|
|
179
|
-
isProxy: true,
|
|
180
|
-
proxyType: types[preferred.kind],
|
|
181
|
-
confidence: preferred.membershipConfidence ?? (preferred.evidenceGrade === "vendor_reported" ? 90 : 0)
|
|
182
|
-
} : void 0,
|
|
183
|
-
proxyAssertions,
|
|
184
|
-
proxyCollectionState
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
117
|
|
|
188
118
|
//#endregion
|
|
189
119
|
//#region src/core/risk-score.ts
|
|
@@ -211,8 +141,8 @@ function mapProxyAssertions(proxyAssertions, nowSeconds, collectionState, compat
|
|
|
211
141
|
* live-cutover semantics — this module does not change without a matching
|
|
212
142
|
* decision recorded there.
|
|
213
143
|
*/
|
|
214
|
-
/** Wire shape: 0-1, two decimals, `null` when
|
|
215
|
-
const RiskScoreSchema = require_schemas.number().min(0).max(1).nullable().describe("
|
|
144
|
+
/** Wire shape: 0-1, two decimals, `null` when no score was computed. */
|
|
145
|
+
const RiskScoreSchema = require_schemas.number().min(0).max(1).nullable().describe("How likely the request is to be automated, from 0 to 1 with two decimals; riskScoreSource says whether it is calibrated. Null when no score was computed for the request. Independent of confidence: neither is derived from the other.");
|
|
216
146
|
/**
|
|
217
147
|
* Which metadata key `riskScore` was derived from. Always `'uncalibrated'`
|
|
218
148
|
* today: `riskScoreFromMetadata` reads only `shadow_noisy_or_confidence`,
|
|
@@ -223,7 +153,7 @@ const RiskScoreSchema = require_schemas.number().min(0).max(1).nullable().descri
|
|
|
223
153
|
* PR makes explicitly (bestbrian, PR #4999); this field exists so that
|
|
224
154
|
* switch is an observable wire change the day it happens, not a silent one.
|
|
225
155
|
*/
|
|
226
|
-
const RiskScoreSourceSchema = require_schemas._enum(["uncalibrated", "calibrated"]).nullable().describe("
|
|
156
|
+
const RiskScoreSourceSchema = require_schemas._enum(["uncalibrated", "calibrated"]).nullable().describe("How riskScore was produced: 'uncalibrated' (a relative score: higher means more likely automated, but it is not an observed frequency) or 'calibrated' (mapped to observed outcomes, so it reads as a probability). Null exactly when riskScore is null.");
|
|
227
157
|
/** The `detectionDetail.metadata` key `riskScore` derives from. */
|
|
228
158
|
const SHADOW_NOISY_OR_CONFIDENCE_KEY = "shadow_noisy_or_confidence";
|
|
229
159
|
/**
|
|
@@ -528,6 +458,29 @@ const ProxyTypeSchema = require_schemas._enum([
|
|
|
528
458
|
"residential_proxy",
|
|
529
459
|
"unknown"
|
|
530
460
|
]);
|
|
461
|
+
const ReportedProxyTypeSchema = require_schemas._enum([
|
|
462
|
+
"vpn",
|
|
463
|
+
"tor",
|
|
464
|
+
"hosting",
|
|
465
|
+
"residential"
|
|
466
|
+
]);
|
|
467
|
+
const REPORTED_PROXY_TYPE = {
|
|
468
|
+
vpn: "vpn",
|
|
469
|
+
tor: "tor",
|
|
470
|
+
datacenter: "hosting",
|
|
471
|
+
residential_proxy: "residential",
|
|
472
|
+
unknown: void 0
|
|
473
|
+
};
|
|
474
|
+
function reportedProxyType(proxyType) {
|
|
475
|
+
return REPORTED_PROXY_TYPE[proxyType];
|
|
476
|
+
}
|
|
477
|
+
const IpRoutingTypeSchema = require_schemas._enum([
|
|
478
|
+
"cellular",
|
|
479
|
+
"satellite",
|
|
480
|
+
"datacenter",
|
|
481
|
+
"fixed",
|
|
482
|
+
"anonymizer"
|
|
483
|
+
]);
|
|
531
484
|
/**
|
|
532
485
|
* Host-supplied proxy/anonymization verdict for a request's `trueIp`.
|
|
533
486
|
* Mirrors the Rust `ProxyInfo` (`rust/crates/kya-os-engine/src/types.rs`).
|
|
@@ -540,6 +493,17 @@ const ProxyInfoSchema = require_schemas.object({
|
|
|
540
493
|
/** Provider confidence in the proxy verdict, 0-100. */
|
|
541
494
|
confidence: require_schemas.number().int().min(0).max(100)
|
|
542
495
|
});
|
|
496
|
+
const IpReputationSchema = require_schemas.object({
|
|
497
|
+
attackSource: require_schemas.boolean().optional(),
|
|
498
|
+
spamSource: require_schemas.boolean().optional(),
|
|
499
|
+
lists: require_schemas.array(require_schemas.string()),
|
|
500
|
+
asOf: require_schemas.number().int().positive()
|
|
501
|
+
});
|
|
502
|
+
const IpEventCountsSchema = require_schemas.object({
|
|
503
|
+
lastHour: require_schemas.number().int().nonnegative(),
|
|
504
|
+
lastDay: require_schemas.number().int().nonnegative(),
|
|
505
|
+
asOf: require_schemas.number().int().positive()
|
|
506
|
+
});
|
|
543
507
|
/**
|
|
544
508
|
* Host-supplied network / IP-intelligence context for a request's
|
|
545
509
|
* `trueIp`. Legacy fields mirror the Rust `NetworkContext` and appear on
|
|
@@ -560,7 +524,9 @@ const NetworkContextSchema = require_schemas.object({
|
|
|
560
524
|
* Older Rust readers do not echo these additive fields.
|
|
561
525
|
*/
|
|
562
526
|
proxyAssertions: require_schemas.array(ProxyAssertionSchema).optional(),
|
|
563
|
-
proxyCollectionState: ProxyCollectionStateSchema.optional()
|
|
527
|
+
proxyCollectionState: ProxyCollectionStateSchema.optional(),
|
|
528
|
+
ipRoutingType: IpRoutingTypeSchema.optional(),
|
|
529
|
+
ipReputation: IpReputationSchema.optional()
|
|
564
530
|
});
|
|
565
531
|
/**
|
|
566
532
|
* Descriptive detection detail from the engine.
|
|
@@ -589,14 +555,12 @@ const DetectionDetailSchema = require_schemas.object({
|
|
|
589
555
|
*/
|
|
590
556
|
confidence: require_schemas.number().min(0).max(100),
|
|
591
557
|
/**
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* `riskScoreFromMetadata` — always additive, never derived from or fed
|
|
596
|
-
* back into `confidence` above.
|
|
558
|
+
* How likely the request is to be automated (0-1, two decimals), or
|
|
559
|
+
* `null` when no score was computed. See `RiskScoreSchema` — never
|
|
560
|
+
* derived from or fed back into `confidence` above.
|
|
597
561
|
*/
|
|
598
562
|
riskScore: RiskScoreSchema.optional(),
|
|
599
|
-
/**
|
|
563
|
+
/** Whether `riskScore` is calibrated. See `RiskScoreSourceSchema`. */
|
|
600
564
|
riskScoreSource: RiskScoreSourceSchema.optional(),
|
|
601
565
|
detectionClass: DetectionClassSchema,
|
|
602
566
|
confidenceLevel: require_schemas._enum([
|
|
@@ -1143,6 +1107,26 @@ const VerdictEvidenceSchema = require_schemas.object({
|
|
|
1143
1107
|
function signalContribution(signal) {
|
|
1144
1108
|
return signal.weight * (signal.confidence / 100);
|
|
1145
1109
|
}
|
|
1110
|
+
const SCANNER_MISCLASSIFICATION_HINT_SOURCE = "scanner_misclassification_hint";
|
|
1111
|
+
const CLOUDFLARE_BOT_MANAGEMENT_SOURCE = "transport.cloudflare_bot_management";
|
|
1112
|
+
function cloudflareBotScore(signal) {
|
|
1113
|
+
const score = signal.metadata?.cf_bot_score;
|
|
1114
|
+
return typeof score === "number" && Number.isInteger(score) && score >= 0 ? score : void 0;
|
|
1115
|
+
}
|
|
1116
|
+
function cloudflareRootScores(signals) {
|
|
1117
|
+
const scores = /* @__PURE__ */ new Set();
|
|
1118
|
+
for (const signal of signals) {
|
|
1119
|
+
if (signal.source !== CLOUDFLARE_BOT_MANAGEMENT_SOURCE) continue;
|
|
1120
|
+
const score = cloudflareBotScore(signal);
|
|
1121
|
+
if (score !== void 0) scores.add(score);
|
|
1122
|
+
}
|
|
1123
|
+
return scores;
|
|
1124
|
+
}
|
|
1125
|
+
function isAliasedCloudflareHint(signal, rootScores) {
|
|
1126
|
+
if (signal.source !== SCANNER_MISCLASSIFICATION_HINT_SOURCE) return false;
|
|
1127
|
+
const score = cloudflareBotScore(signal);
|
|
1128
|
+
return score !== void 0 && rootScores.has(score);
|
|
1129
|
+
}
|
|
1146
1130
|
/**
|
|
1147
1131
|
* Builds the verdict's evidence list from the engine's raw detection
|
|
1148
1132
|
* signals — allow or block, live or shadow, persisted or not: this is a
|
|
@@ -1165,18 +1149,18 @@ function signalContribution(signal) {
|
|
|
1165
1149
|
*/
|
|
1166
1150
|
function buildVerdictEvidence(signals) {
|
|
1167
1151
|
if (!signals || signals.length === 0) return [];
|
|
1168
|
-
const
|
|
1152
|
+
const parsedSignals = [];
|
|
1169
1153
|
for (const raw of signals) {
|
|
1170
1154
|
const parsed = DetectionSignalSchema.safeParse(raw);
|
|
1171
|
-
if (
|
|
1172
|
-
const signal = parsed.data;
|
|
1173
|
-
entries.push({
|
|
1174
|
-
signal: signal.source,
|
|
1175
|
-
plane: signal.signalType,
|
|
1176
|
-
weight: signal.weight,
|
|
1177
|
-
probabilityContribution: signalContribution(signal)
|
|
1178
|
-
});
|
|
1155
|
+
if (parsed.success) parsedSignals.push(parsed.data);
|
|
1179
1156
|
}
|
|
1157
|
+
const rootScores = cloudflareRootScores(parsedSignals);
|
|
1158
|
+
const entries = parsedSignals.map((signal) => ({
|
|
1159
|
+
signal: signal.source,
|
|
1160
|
+
plane: signal.signalType,
|
|
1161
|
+
weight: signal.weight,
|
|
1162
|
+
probabilityContribution: isAliasedCloudflareHint(signal, rootScores) ? 0 : signalContribution(signal)
|
|
1163
|
+
}));
|
|
1180
1164
|
entries.sort((a, b) => {
|
|
1181
1165
|
if (a.plane !== b.plane) return a.plane < b.plane ? -1 : 1;
|
|
1182
1166
|
if (a.signal !== b.signal) return a.signal < b.signal ? -1 : 1;
|
|
@@ -1720,57 +1704,6 @@ const SUSPICIOUS_HEADERS = {
|
|
|
1720
1704
|
//#endregion
|
|
1721
1705
|
//#region src/constants/bots.ts
|
|
1722
1706
|
/**
|
|
1723
|
-
* Traditional Bot Constants and Types
|
|
1724
|
-
*
|
|
1725
|
-
* These are NON-AI bots like search engines, crawlers, and SEO tools.
|
|
1726
|
-
* AI agents (Claude, GPT, etc.) should be in agents.ts
|
|
1727
|
-
*/
|
|
1728
|
-
/**
|
|
1729
|
-
* Traditional bot types (not AI agents)
|
|
1730
|
-
*/
|
|
1731
|
-
const BotTypeSchema = require_schemas._enum([
|
|
1732
|
-
"search_engine",
|
|
1733
|
-
"social_media",
|
|
1734
|
-
"seo_tool",
|
|
1735
|
-
"crawler",
|
|
1736
|
-
"scraper",
|
|
1737
|
-
"monitoring",
|
|
1738
|
-
"security_scanner",
|
|
1739
|
-
"unknown_bot"
|
|
1740
|
-
]);
|
|
1741
|
-
/**
|
|
1742
|
-
* Trusted traditional bots that can be cached
|
|
1743
|
-
* These are well-known, legitimate bots with stable patterns
|
|
1744
|
-
* NOT for AI agents - those should never be cached
|
|
1745
|
-
*/
|
|
1746
|
-
const TRUSTED_BOTS = [
|
|
1747
|
-
"googlebot",
|
|
1748
|
-
"bingbot",
|
|
1749
|
-
"slurp",
|
|
1750
|
-
"duckduckbot",
|
|
1751
|
-
"baiduspider",
|
|
1752
|
-
"yandexbot",
|
|
1753
|
-
"applebot",
|
|
1754
|
-
"facebookexternalhit",
|
|
1755
|
-
"twitterbot",
|
|
1756
|
-
"linkedinbot",
|
|
1757
|
-
"whatsapp",
|
|
1758
|
-
"semrushbot",
|
|
1759
|
-
"ahrefsbot",
|
|
1760
|
-
"mj12bot",
|
|
1761
|
-
"dotbot"
|
|
1762
|
-
];
|
|
1763
|
-
/**
|
|
1764
|
-
* Bot pattern for traditional bot matching
|
|
1765
|
-
*/
|
|
1766
|
-
const BotPatternSchema = require_schemas.object({
|
|
1767
|
-
id: require_schemas.string(),
|
|
1768
|
-
type: BotTypeSchema,
|
|
1769
|
-
name: require_schemas.string(),
|
|
1770
|
-
patterns: require_schemas.array(require_schemas.string()),
|
|
1771
|
-
confidence: require_schemas.number().min(0).max(1).default(.8)
|
|
1772
|
-
});
|
|
1773
|
-
/**
|
|
1774
1707
|
* Traditional bot patterns.
|
|
1775
1708
|
*
|
|
1776
1709
|
* NAME VOCABULARY: `name` MUST be the detection engine's pattern name — the
|
|
@@ -1865,21 +1798,6 @@ const TRADITIONAL_BOT_PATTERNS = [
|
|
|
1865
1798
|
confidence: .7
|
|
1866
1799
|
}
|
|
1867
1800
|
];
|
|
1868
|
-
/**
|
|
1869
|
-
* Check if a user agent is a traditional bot (not AI agent)
|
|
1870
|
-
*/
|
|
1871
|
-
function isTraditionalBot(userAgent) {
|
|
1872
|
-
const lowerUA = userAgent.toLowerCase();
|
|
1873
|
-
return TRUSTED_BOTS.some((bot) => lowerUA.includes(bot));
|
|
1874
|
-
}
|
|
1875
|
-
/**
|
|
1876
|
-
* Get bot type from user agent
|
|
1877
|
-
*/
|
|
1878
|
-
function getBotType(userAgent) {
|
|
1879
|
-
const lowerUA = userAgent.toLowerCase();
|
|
1880
|
-
for (const pattern of TRADITIONAL_BOT_PATTERNS) if (pattern.patterns.some((p) => lowerUA.includes(p.toLowerCase()))) return pattern.type;
|
|
1881
|
-
return null;
|
|
1882
|
-
}
|
|
1883
1801
|
|
|
1884
1802
|
//#endregion
|
|
1885
1803
|
//#region src/constants/delegation.ts
|
|
@@ -2022,7 +1940,8 @@ const INTERNAL_ERRORS = {
|
|
|
2022
1940
|
TRANSACTION_FAILED: "TRANSACTION_FAILED",
|
|
2023
1941
|
DELETE_FAILED: "DELETE_FAILED",
|
|
2024
1942
|
PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS",
|
|
2025
|
-
FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED"
|
|
1943
|
+
FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED",
|
|
1944
|
+
REQUEST_TIMEOUT: "REQUEST_TIMEOUT"
|
|
2026
1945
|
};
|
|
2027
1946
|
/**
|
|
2028
1947
|
* Session Error Codes
|
|
@@ -2061,7 +1980,8 @@ const API_ERRORS = {
|
|
|
2061
1980
|
CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED",
|
|
2062
1981
|
RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE",
|
|
2063
1982
|
REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE",
|
|
2064
|
-
ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED"
|
|
1983
|
+
ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED",
|
|
1984
|
+
VERDICT_NOT_STORED: "VERDICT_NOT_STORED"
|
|
2065
1985
|
};
|
|
2066
1986
|
/**
|
|
2067
1987
|
* Billing Error Codes
|
|
@@ -2181,6 +2101,7 @@ const BOUNCER_LOWERCASE_ERRORS = {
|
|
|
2181
2101
|
LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error",
|
|
2182
2102
|
LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes",
|
|
2183
2103
|
LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error",
|
|
2104
|
+
LOWERCASE_AUTHORIZATION_TOO_WEAK: "authorization_too_weak",
|
|
2184
2105
|
GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core",
|
|
2185
2106
|
LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration",
|
|
2186
2107
|
LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch",
|
|
@@ -2190,11 +2111,15 @@ const BOUNCER_LOWERCASE_ERRORS = {
|
|
|
2190
2111
|
/**
|
|
2191
2112
|
* Delegation OAuth Error Codes (lower-case wire format)
|
|
2192
2113
|
*
|
|
2193
|
-
* Emitted by the bouncer authorize,
|
|
2194
|
-
*
|
|
2195
|
-
* 6749 vocabulary (`invalid_request`,
|
|
2196
|
-
* `
|
|
2197
|
-
*
|
|
2114
|
+
* Emitted by the bouncer v1 routes (authorize, the OAuth and credential
|
|
2115
|
+
* starts, the OAuth callback, sessions and delegations) and the shared OAuth
|
|
2116
|
+
* rate limiter. Several reuse RFC 6749 vocabulary (`invalid_request`,
|
|
2117
|
+
* `invalid_grant`) but travel in the bouncer `{success, error}` envelope,
|
|
2118
|
+
* not an RFC 6749 body. Keyed by value with a LOWERCASE_ prefix.
|
|
2119
|
+
*
|
|
2120
|
+
* `unsupported_grant_type` and `invalid_delegation` belonged to the bouncer
|
|
2121
|
+
* `oauth/token` code exchange, which is gone; nothing emits them, and they
|
|
2122
|
+
* stay published until a deprecation removes them.
|
|
2198
2123
|
*/
|
|
2199
2124
|
const OAUTH_LOWERCASE_ERRORS = {
|
|
2200
2125
|
LOWERCASE_INVALID_REQUEST: "invalid_request",
|
|
@@ -2239,6 +2164,7 @@ const AUDIT_ERRORS = {
|
|
|
2239
2164
|
AUDIT_CREDENTIAL_REQUIRED: "AUDIT_CREDENTIAL_REQUIRED",
|
|
2240
2165
|
AUDIT_REQUEST_TOO_LARGE: "AUDIT_REQUEST_TOO_LARGE",
|
|
2241
2166
|
AUDIT_INVALID_JSON: "AUDIT_INVALID_JSON",
|
|
2167
|
+
AUDIT_REQUEST_TIMEOUT: "AUDIT_REQUEST_TIMEOUT",
|
|
2242
2168
|
AUDIT_INVALID_CREDENTIAL: "AUDIT_INVALID_CREDENTIAL",
|
|
2243
2169
|
AUDIT_RATE_LIMITED: "AUDIT_RATE_LIMITED",
|
|
2244
2170
|
AUDIT_INVALID_SUBMISSION: "AUDIT_INVALID_SUBMISSION",
|
|
@@ -2437,6 +2363,7 @@ const ERROR_MESSAGES = {
|
|
|
2437
2363
|
[INTERNAL_ERRORS.DELETE_FAILED]: "Failed to delete project",
|
|
2438
2364
|
[INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: "The project data is being archived. Retry shortly.",
|
|
2439
2365
|
[INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: "Couldn't stop a managed agent's machine, so the delete was refused. Retry the delete.",
|
|
2366
|
+
[INTERNAL_ERRORS.REQUEST_TIMEOUT]: "The request body did not arrive in time",
|
|
2440
2367
|
[SESSION_ERRORS.SESSION_NOT_FOUND]: "Session not found",
|
|
2441
2368
|
[SESSION_ERRORS.SESSION_EXPIRED]: "Session has expired",
|
|
2442
2369
|
[SESSION_ERRORS.SESSION_INVALID]: "Session is invalid",
|
|
@@ -2461,6 +2388,7 @@ const ERROR_MESSAGES = {
|
|
|
2461
2388
|
[API_ERRORS.RESPONSE_TOO_LARGE]: "Response exceeds maximum size",
|
|
2462
2389
|
[API_ERRORS.REQUEST_TOO_LARGE]: "Request exceeds maximum size",
|
|
2463
2390
|
[API_ERRORS.ENDPOINT_RETIRED]: "This endpoint has been retired",
|
|
2391
|
+
[API_ERRORS.VERDICT_NOT_STORED]: "The verdict could not be stored",
|
|
2464
2392
|
[BILLING_ERRORS.LIMIT_EXCEEDED]: "Billing limit exceeded",
|
|
2465
2393
|
[BILLING_ERRORS.BILLING_SUSPENDED]: "Account billing suspended",
|
|
2466
2394
|
[BILLING_ERRORS.BILLING_GRACE_PERIOD]: "Account in billing grace period",
|
|
@@ -2517,6 +2445,7 @@ const ERROR_MESSAGES = {
|
|
|
2517
2445
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_PROOF_VALIDATION_ERROR]: "Proof validation failed",
|
|
2518
2446
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: "Missing required scopes",
|
|
2519
2447
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_DELEGATION_VALIDATION_ERROR]: "Delegation validation failed",
|
|
2448
|
+
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_TOO_WEAK]: "A tool these scopes open needs a sign-in, so a consent-only grant cannot open it",
|
|
2520
2449
|
[BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: "The grant predates the issuance core; authorize again",
|
|
2521
2450
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INVALID_HTTP_REGISTRATION]: "Invalid or unsupported native HTTP registration",
|
|
2522
2451
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: "The registered tool protection revision is not the one served to this project",
|
|
@@ -2547,6 +2476,7 @@ const ERROR_MESSAGES = {
|
|
|
2547
2476
|
[AUDIT_ERRORS.AUDIT_CREDENTIAL_REQUIRED]: "A source-bound audit ingest credential is required",
|
|
2548
2477
|
[AUDIT_ERRORS.AUDIT_REQUEST_TOO_LARGE]: "Audit submission exceeds 6291456 bytes",
|
|
2549
2478
|
[AUDIT_ERRORS.AUDIT_INVALID_JSON]: "Request body must be valid JSON",
|
|
2479
|
+
[AUDIT_ERRORS.AUDIT_REQUEST_TIMEOUT]: "Audit submission body did not arrive in time",
|
|
2550
2480
|
[AUDIT_ERRORS.AUDIT_INVALID_CREDENTIAL]: "Invalid audit ingest credential",
|
|
2551
2481
|
[AUDIT_ERRORS.AUDIT_RATE_LIMITED]: "Audit ingest rate limit exceeded",
|
|
2552
2482
|
[AUDIT_ERRORS.AUDIT_INVALID_SUBMISSION]: "Invalid audit recorder submission envelope",
|
|
@@ -2680,6 +2610,7 @@ const ERROR_STATUS_CODES = {
|
|
|
2680
2610
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_FORBIDDEN]: 403,
|
|
2681
2611
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AGENT_DENIED]: 403,
|
|
2682
2612
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: 403,
|
|
2613
|
+
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_TOO_WEAK]: 403,
|
|
2683
2614
|
[BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: 409,
|
|
2684
2615
|
[BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: 409,
|
|
2685
2616
|
[AUDIT_PROTOCOL_ERRORS.AUDIT_UNAUTHORIZED_SUBMISSION]: 403,
|
|
@@ -2723,6 +2654,8 @@ const ERROR_STATUS_CODES = {
|
|
|
2723
2654
|
[GATEWAY_VAULT_ERRORS.CREDENTIALS_NOT_CONFIGURED]: 404,
|
|
2724
2655
|
[VAULT_ERRORS.NO_AGENT_KEY]: 404,
|
|
2725
2656
|
[API_ERRORS.METHOD_NOT_ALLOWED]: 405,
|
|
2657
|
+
[AUDIT_ERRORS.AUDIT_REQUEST_TIMEOUT]: 408,
|
|
2658
|
+
[INTERNAL_ERRORS.REQUEST_TIMEOUT]: 408,
|
|
2726
2659
|
[RESOURCE_ERRORS.CONFLICT]: 409,
|
|
2727
2660
|
[AUDIT_PROTOCOL_ERRORS.AUDIT_LEDGER_MISMATCH]: 409,
|
|
2728
2661
|
[AUDIT_PROTOCOL_ERRORS.AUDIT_EPOCH_MISMATCH]: 409,
|
|
@@ -2787,7 +2720,8 @@ const ERROR_STATUS_CODES = {
|
|
|
2787
2720
|
[AUDIT_PROTOCOL_ERRORS.AUDIT_APPEND_CONFLICT_EXHAUSTED]: 503,
|
|
2788
2721
|
[KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_AUTHORIZATION_HOST_UNAVAILABLE]: 503,
|
|
2789
2722
|
[KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_POLICY_UNAVAILABLE]: 503,
|
|
2790
|
-
[NETWORK_ERRORS.TIMEOUT]: 504
|
|
2723
|
+
[NETWORK_ERRORS.TIMEOUT]: 504,
|
|
2724
|
+
[API_ERRORS.VERDICT_NOT_STORED]: 504
|
|
2791
2725
|
};
|
|
2792
2726
|
/**
|
|
2793
2727
|
* Create a standardized error object
|
|
@@ -2934,6 +2868,23 @@ const DETECTION_LIMITS = {
|
|
|
2934
2868
|
cacheTTL: 3600,
|
|
2935
2869
|
maxConcurrentDetections: 1e3
|
|
2936
2870
|
};
|
|
2871
|
+
const DETECTION_REQUEST_LIMITS = {
|
|
2872
|
+
userAgent: 2048,
|
|
2873
|
+
url: 8192,
|
|
2874
|
+
method: 16,
|
|
2875
|
+
requestId: 128,
|
|
2876
|
+
headerCount: 100,
|
|
2877
|
+
headerName: 256,
|
|
2878
|
+
headerValue: 8192,
|
|
2879
|
+
/** All header names and values together, in characters. */
|
|
2880
|
+
headerBytes: 32768,
|
|
2881
|
+
/** Entries in each behavioral event array. */
|
|
2882
|
+
behavioralEvents: 2e3,
|
|
2883
|
+
/** A keyboard event's `key`; a DOM key value is a few dozen characters at most. */
|
|
2884
|
+
eventKey: 64,
|
|
2885
|
+
/** A click event's `target`. */
|
|
2886
|
+
eventTarget: 1024
|
|
2887
|
+
};
|
|
2937
2888
|
/**
|
|
2938
2889
|
* Database Limits
|
|
2939
2890
|
*/
|
|
@@ -3269,14 +3220,22 @@ const BehavioralAnalysisSchema = require_schemas.object({
|
|
|
3269
3220
|
* API request schemas
|
|
3270
3221
|
*/
|
|
3271
3222
|
/**
|
|
3272
|
-
* Detection API request
|
|
3223
|
+
* Detection API request. Only `method`, which the caller sets, is capped here.
|
|
3224
|
+
* Every other field is relayed from the visitor's request or browser, and each
|
|
3225
|
+
* route that takes it applies its own size limits:
|
|
3226
|
+
* - `/api/v1/detect` refuses a relayed field over its limit with 400
|
|
3227
|
+
* (`DetectRequestLimitsSchema`, apps/web/app/api/v1/detect/limits.ts).
|
|
3228
|
+
* - `/api/v1/verdict`, which takes `behavioralData` and `options` from this
|
|
3229
|
+
* schema, cuts an over-limit value and reports the cut.
|
|
3230
|
+
* The enforce routes (`/api/v1/enforce` and the gateway's `/__detect/enforce`)
|
|
3231
|
+
* take a request of their own and never refuse a relayed field for its size.
|
|
3273
3232
|
*/
|
|
3274
3233
|
const DetectionRequestSchema = require_schemas.object({
|
|
3275
3234
|
userAgent: require_schemas.string(),
|
|
3276
3235
|
ipAddress: require_schemas.string().optional(),
|
|
3277
3236
|
headers: require_schemas.record(require_schemas.string(), require_schemas.string()).optional(),
|
|
3278
3237
|
url: require_schemas.string().optional(),
|
|
3279
|
-
method: require_schemas.string().optional(),
|
|
3238
|
+
method: require_schemas.string().max(DETECTION_REQUEST_LIMITS.method).optional(),
|
|
3280
3239
|
behavioralData: BehavioralDataSchema.optional(),
|
|
3281
3240
|
options: require_schemas.object({
|
|
3282
3241
|
mode: require_schemas._enum([
|
|
@@ -3490,6 +3449,8 @@ const ClientDetectionSchema = require_schemas.object({
|
|
|
3490
3449
|
keyDwellCount: require_schemas.number().optional(),
|
|
3491
3450
|
keyDwellUnder5: require_schemas.number().optional(),
|
|
3492
3451
|
keyDwellSumMs: require_schemas.number().optional(),
|
|
3452
|
+
keyDwellCongested: require_schemas.number().int().nonnegative().optional(),
|
|
3453
|
+
keyDwellStampFlat: require_schemas.number().int().nonnegative().optional(),
|
|
3493
3454
|
keyGapCount: require_schemas.number().optional(),
|
|
3494
3455
|
keyGapUnder5: require_schemas.number().optional(),
|
|
3495
3456
|
pressCount: require_schemas.number().optional(),
|
|
@@ -3497,6 +3458,8 @@ const ClientDetectionSchema = require_schemas.object({
|
|
|
3497
3458
|
pressAdjacentUnder5: require_schemas.number().int().nonnegative().optional(),
|
|
3498
3459
|
pressUnder10: require_schemas.number().optional(),
|
|
3499
3460
|
pressSumMs: require_schemas.number().optional(),
|
|
3461
|
+
pressCongested: require_schemas.number().int().nonnegative().optional(),
|
|
3462
|
+
pressStampFlat: require_schemas.number().int().nonnegative().optional(),
|
|
3500
3463
|
mouseClicks: require_schemas.number().optional(),
|
|
3501
3464
|
zeroTrailClicks: require_schemas.number().optional(),
|
|
3502
3465
|
kinematicsVersion: require_schemas.number().optional(),
|
|
@@ -5172,7 +5135,8 @@ const KNOWN_PATTERN_BY_NAME_OR_ID = buildKnownPatternLookup(KNOWN_AGENT_PATTERNS
|
|
|
5172
5135
|
* {@link TrafficTaxonomyBucket}. An unidentified agent (`agent_type` null,
|
|
5173
5136
|
* stored as 'Unknown' by the rollup) falls to the class fallback, so an
|
|
5174
5137
|
* `ai_agent`-classed unidentified row counts as an AI agent and a
|
|
5175
|
-
* `bot`-classed one as other automation.
|
|
5138
|
+
* `bot`-classed one as other automation. Never `unidentified`: that bucket
|
|
5139
|
+
* is what remains of a total once every classified row is counted.
|
|
5176
5140
|
*/
|
|
5177
5141
|
function classifyAgentTaxonomy(agentType, detectionClass) {
|
|
5178
5142
|
if (detectionClass === "human") return "human";
|
|
@@ -5224,6 +5188,134 @@ const UserSchema = require_schemas.object({
|
|
|
5224
5188
|
createdAt: require_schemas.date(),
|
|
5225
5189
|
updatedAt: require_schemas.date()
|
|
5226
5190
|
});
|
|
5191
|
+
const RequestFlagLabelMatrixEntrySchema = require_schemas.object({
|
|
5192
|
+
flag: require_schemas.string().min(1).max(64),
|
|
5193
|
+
clientId: require_schemas.string().min(1).max(128).optional(),
|
|
5194
|
+
tier: require_schemas.string().min(1).max(64).optional(),
|
|
5195
|
+
label: require_schemas.boolean(),
|
|
5196
|
+
weight: require_schemas.number().int().min(0).max(100).optional(),
|
|
5197
|
+
minAccountAddresses: require_schemas.number().int().min(1).max(16).optional()
|
|
5198
|
+
});
|
|
5199
|
+
const RequestFlagLabelMatrixSchema = require_schemas.array(RequestFlagLabelMatrixEntrySchema).max(100);
|
|
5200
|
+
const REQUEST_LABELLING_FLAGS = [
|
|
5201
|
+
"page_load_on_json_post",
|
|
5202
|
+
"client_hint_contradiction",
|
|
5203
|
+
"upgrade_insecure_requests_on_json_post",
|
|
5204
|
+
"account_network_rotation",
|
|
5205
|
+
"account_impossible_travel",
|
|
5206
|
+
"pre_zstd_headers_on_modern_chrome",
|
|
5207
|
+
"grease_brand_mismatch",
|
|
5208
|
+
"bare_product_agent_template",
|
|
5209
|
+
"missing_ua_gzip_chrome",
|
|
5210
|
+
"gzip_only_hinted_chrome",
|
|
5211
|
+
"zh_cn_cross_site_windows_chrome",
|
|
5212
|
+
"country_spread",
|
|
5213
|
+
"old_chrome",
|
|
5214
|
+
"shared_network",
|
|
5215
|
+
"minute_aligned",
|
|
5216
|
+
"account_hour_volume",
|
|
5217
|
+
"account_convicted",
|
|
5218
|
+
"network_convicted",
|
|
5219
|
+
"no_human_proof",
|
|
5220
|
+
"device_type_contradiction",
|
|
5221
|
+
"pool_address",
|
|
5222
|
+
"ip_convicted",
|
|
5223
|
+
"account_many_apps",
|
|
5224
|
+
"account_rapid_country_rotation",
|
|
5225
|
+
"account_many_countries",
|
|
5226
|
+
"gzip_only_browser_with_evidence",
|
|
5227
|
+
"account_three_state",
|
|
5228
|
+
"account_two_jump",
|
|
5229
|
+
"shared_clock_slot",
|
|
5230
|
+
"stable_minute_offset",
|
|
5231
|
+
"aligned_minute_batch",
|
|
5232
|
+
"chrome_without_hints_or_language_on_hosting",
|
|
5233
|
+
"stale_safari_16_business_hosting",
|
|
5234
|
+
"library_ua_on_web_client",
|
|
5235
|
+
"automation_ua_on_web_client",
|
|
5236
|
+
"truncated_browser_ua",
|
|
5237
|
+
"safari_without_priority_business_hosting",
|
|
5238
|
+
"mobile_app_new_account_abroad",
|
|
5239
|
+
"team_trial_new_account",
|
|
5240
|
+
"round_the_clock",
|
|
5241
|
+
"many_templates",
|
|
5242
|
+
"template_minute_arc",
|
|
5243
|
+
"linked_rare_header",
|
|
5244
|
+
"app_ua_on_web",
|
|
5245
|
+
"session_age_96h",
|
|
5246
|
+
"signup_cohort_abroad",
|
|
5247
|
+
"wave_template_young_account",
|
|
5248
|
+
"guest_scatter",
|
|
5249
|
+
"ua_new",
|
|
5250
|
+
"ua_young",
|
|
5251
|
+
"email_fan"
|
|
5252
|
+
];
|
|
5253
|
+
const REQUEST_FLAG_KINDS = [
|
|
5254
|
+
"behaviour",
|
|
5255
|
+
"header-template",
|
|
5256
|
+
"address"
|
|
5257
|
+
];
|
|
5258
|
+
const REQUEST_LABELLING_FLAG_KINDS = {
|
|
5259
|
+
page_load_on_json_post: "header-template",
|
|
5260
|
+
client_hint_contradiction: "header-template",
|
|
5261
|
+
upgrade_insecure_requests_on_json_post: "header-template",
|
|
5262
|
+
account_network_rotation: "behaviour",
|
|
5263
|
+
account_impossible_travel: "behaviour",
|
|
5264
|
+
pre_zstd_headers_on_modern_chrome: "header-template",
|
|
5265
|
+
grease_brand_mismatch: "header-template",
|
|
5266
|
+
bare_product_agent_template: "header-template",
|
|
5267
|
+
missing_ua_gzip_chrome: "header-template",
|
|
5268
|
+
zh_cn_cross_site_windows_chrome: "header-template",
|
|
5269
|
+
country_spread: "behaviour",
|
|
5270
|
+
old_chrome: "header-template",
|
|
5271
|
+
shared_network: "behaviour",
|
|
5272
|
+
minute_aligned: "behaviour",
|
|
5273
|
+
account_convicted: "behaviour",
|
|
5274
|
+
network_convicted: "behaviour",
|
|
5275
|
+
no_human_proof: "behaviour",
|
|
5276
|
+
device_type_contradiction: "header-template",
|
|
5277
|
+
pool_address: "address",
|
|
5278
|
+
ip_convicted: "address",
|
|
5279
|
+
account_many_apps: "address",
|
|
5280
|
+
account_rapid_country_rotation: "behaviour",
|
|
5281
|
+
account_many_countries: "behaviour",
|
|
5282
|
+
account_hour_volume: "behaviour",
|
|
5283
|
+
gzip_only_browser_with_evidence: "address",
|
|
5284
|
+
account_three_state: "behaviour",
|
|
5285
|
+
account_two_jump: "behaviour",
|
|
5286
|
+
shared_clock_slot: "behaviour",
|
|
5287
|
+
stable_minute_offset: "behaviour",
|
|
5288
|
+
aligned_minute_batch: "behaviour",
|
|
5289
|
+
chrome_without_hints_or_language_on_hosting: "header-template",
|
|
5290
|
+
gzip_only_hinted_chrome: "header-template",
|
|
5291
|
+
stale_safari_16_business_hosting: "header-template",
|
|
5292
|
+
library_ua_on_web_client: "header-template",
|
|
5293
|
+
automation_ua_on_web_client: "header-template",
|
|
5294
|
+
truncated_browser_ua: "header-template",
|
|
5295
|
+
safari_without_priority_business_hosting: "header-template",
|
|
5296
|
+
mobile_app_new_account_abroad: "behaviour",
|
|
5297
|
+
team_trial_new_account: "behaviour",
|
|
5298
|
+
round_the_clock: "behaviour",
|
|
5299
|
+
many_templates: "behaviour",
|
|
5300
|
+
template_minute_arc: "behaviour",
|
|
5301
|
+
linked_rare_header: "behaviour",
|
|
5302
|
+
app_ua_on_web: "header-template",
|
|
5303
|
+
session_age_96h: "behaviour",
|
|
5304
|
+
signup_cohort_abroad: "behaviour",
|
|
5305
|
+
wave_template_young_account: "behaviour",
|
|
5306
|
+
guest_scatter: "behaviour",
|
|
5307
|
+
ua_new: "behaviour",
|
|
5308
|
+
ua_young: "behaviour",
|
|
5309
|
+
email_fan: "behaviour"
|
|
5310
|
+
};
|
|
5311
|
+
const RequestFlagLabelMatrixWriteSchema = require_schemas.array(RequestFlagLabelMatrixEntrySchema.extend({ flag: require_schemas._enum(REQUEST_LABELLING_FLAGS) }).refine(({ flag, clientId, label }) => clientId === void 0 || label || REQUEST_LABELLING_FLAG_KINDS[flag] !== "behaviour", {
|
|
5312
|
+
path: ["flag"],
|
|
5313
|
+
error: "a client-scoped label:false entry does not apply to behaviour flags"
|
|
5314
|
+
})).max(100);
|
|
5315
|
+
const EventCountLimitsSettingSchema = require_schemas.object({
|
|
5316
|
+
lastHour: require_schemas.number().int().nonnegative().optional(),
|
|
5317
|
+
lastDay: require_schemas.number().int().nonnegative().optional()
|
|
5318
|
+
});
|
|
5227
5319
|
/**
|
|
5228
5320
|
* Project Settings
|
|
5229
5321
|
*/
|
|
@@ -5238,6 +5330,17 @@ const ProjectSettingsSchema = require_schemas.object({
|
|
|
5238
5330
|
webhookUrl: require_schemas.string().url().optional(),
|
|
5239
5331
|
webhookSecret: require_schemas.string().optional(),
|
|
5240
5332
|
beaconRateLimitPerMinute: require_schemas.number().int().positive().optional(),
|
|
5333
|
+
rateLimitExempt: require_schemas.boolean().optional(),
|
|
5334
|
+
requestFlagLabel: require_schemas.boolean().optional(),
|
|
5335
|
+
requestFlagTwoJumpShadow: require_schemas.boolean().optional(),
|
|
5336
|
+
requestFlagOwnClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5337
|
+
requestFlagWebClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5338
|
+
requestFlagSizedClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5339
|
+
requestFlagControlClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5340
|
+
requestFlagBrowserRelayClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5341
|
+
requestFlagMobileAppClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
5342
|
+
requestFlagLabelMatrix: RequestFlagLabelMatrixSchema.optional(),
|
|
5343
|
+
eventCountLimits: EventCountLimitsSettingSchema.optional(),
|
|
5241
5344
|
postureOrigins: require_schemas.array(require_schemas.string()).optional(),
|
|
5242
5345
|
postureReportPaths: require_schemas.array(require_schemas.string()).optional(),
|
|
5243
5346
|
beaconIngestMode: require_schemas._enum(["origin", "worker"]).optional()
|
|
@@ -5591,7 +5694,6 @@ const OAuth2ProviderSchema = BaseAuthProviderSchema.extend({
|
|
|
5591
5694
|
*
|
|
5592
5695
|
* Supports:
|
|
5593
5696
|
* - JSON token responses (JWT, Bearer tokens)
|
|
5594
|
-
* - Cookie-based sessions (like HardwareWorld)
|
|
5595
5697
|
* - Custom response validation
|
|
5596
5698
|
*/
|
|
5597
5699
|
const CredentialProviderSchema = BaseAuthProviderSchema.extend({
|
|
@@ -5625,8 +5727,8 @@ const CredentialProviderSchema = BaseAuthProviderSchema.extend({
|
|
|
5625
5727
|
apiHeaders: require_schemas.record(require_schemas.string(), require_schemas.string()).optional(),
|
|
5626
5728
|
consentOverrides: require_schemas.object({
|
|
5627
5729
|
branding: require_schemas.object({
|
|
5628
|
-
primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color
|
|
5629
|
-
secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color
|
|
5730
|
+
primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
|
|
5731
|
+
secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
|
|
5630
5732
|
logoUrl: httpUrlSchema(500).optional(),
|
|
5631
5733
|
companyName: require_schemas.string().max(255).optional(),
|
|
5632
5734
|
theme: require_schemas._enum([
|
|
@@ -5691,16 +5793,34 @@ const CRISPBudgetSchema = require_schemas.object({
|
|
|
5691
5793
|
/**
|
|
5692
5794
|
* Consent Branding Configuration
|
|
5693
5795
|
*/
|
|
5796
|
+
/**
|
|
5797
|
+
* An optional consent page colour, `#rrggbb` like the primary and secondary,
|
|
5798
|
+
* with the same error. The error names the form, not an example colour, so
|
|
5799
|
+
* the schema holds no colour literal.
|
|
5800
|
+
*/
|
|
5801
|
+
const pageColorSchema = () => require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional();
|
|
5694
5802
|
const ConsentBrandingSchema = require_schemas.object({
|
|
5695
|
-
primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color
|
|
5696
|
-
secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color
|
|
5803
|
+
primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
|
|
5804
|
+
secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
|
|
5697
5805
|
logoUrl: httpUrlSchema(500).optional(),
|
|
5698
5806
|
companyName: require_schemas.string().max(255).optional(),
|
|
5699
5807
|
theme: require_schemas._enum([
|
|
5700
5808
|
"light",
|
|
5701
5809
|
"dark",
|
|
5702
5810
|
"auto"
|
|
5703
|
-
]).optional()
|
|
5811
|
+
]).optional(),
|
|
5812
|
+
/** The card the page draws its steps on. */
|
|
5813
|
+
surfaceColor: pageColorSchema(),
|
|
5814
|
+
/** The panels inside the card: the grant notice and the boxes of facts. */
|
|
5815
|
+
panelColor: pageColorSchema(),
|
|
5816
|
+
/** The lines around the card and its panels. */
|
|
5817
|
+
borderColor: pageColorSchema(),
|
|
5818
|
+
/** The page's text. */
|
|
5819
|
+
textColor: pageColorSchema(),
|
|
5820
|
+
/** The quieter text: labels and notes. */
|
|
5821
|
+
mutedTextColor: pageColorSchema(),
|
|
5822
|
+
/** The keyboard focus ring. */
|
|
5823
|
+
focusColor: pageColorSchema()
|
|
5704
5824
|
});
|
|
5705
5825
|
/**
|
|
5706
5826
|
* Consent Terms Configuration
|
|
@@ -5849,10 +5969,20 @@ const MAX_SCOPE_LABELS = 50;
|
|
|
5849
5969
|
* scope grantable (`allowedScopesFor` does not read it) and carries no Cedar.
|
|
5850
5970
|
*/
|
|
5851
5971
|
const ConsentScopeLabelsSchema = require_schemas.record(require_schemas.string().min(1).max(120), require_schemas.string().min(1).max(80)).refine((labels) => Object.keys(labels).length <= MAX_SCOPE_LABELS, `At most ${MAX_SCOPE_LABELS} scope labels`);
|
|
5972
|
+
/** A consent policy names a handful of assurance providers; this only bounds the stored map. */
|
|
5973
|
+
const MAX_ASSURANCE_NOTES = 20;
|
|
5974
|
+
/**
|
|
5975
|
+
* The brand's words for what a permission's check involves, keyed by the
|
|
5976
|
+
* assurance provider id (`registry:fr-rpps`). A project that chooses
|
|
5977
|
+
* permissions before checks shows it on the row before the check runs. Copy
|
|
5978
|
+
* only: it never adds, removes or orders a check.
|
|
5979
|
+
*/
|
|
5980
|
+
const ConsentAssuranceNotesSchema = require_schemas.record(require_schemas.string().min(1).max(80), require_schemas.string().min(1).max(120)).refine((notes) => Object.keys(notes).length <= MAX_ASSURANCE_NOTES, `At most ${MAX_ASSURANCE_NOTES} assurance notes`);
|
|
5852
5981
|
/**
|
|
5853
5982
|
* Full Consent Configuration
|
|
5854
5983
|
*/
|
|
5855
5984
|
const ConsentConfigSchema = require_schemas.object({
|
|
5985
|
+
chooseThenProveEnabled: require_schemas.boolean().optional(),
|
|
5856
5986
|
branding: ConsentBrandingSchema.optional(),
|
|
5857
5987
|
terms: ConsentTermsSchema.optional(),
|
|
5858
5988
|
ui: ConsentUISchema.optional(),
|
|
@@ -5868,7 +5998,8 @@ const ConsentConfigSchema = require_schemas.object({
|
|
|
5868
5998
|
inactivityDays: require_schemas.number().int().min(1).max(3650).optional(),
|
|
5869
5999
|
authorizationHost: require_schemas.string().min(1).max(255).optional(),
|
|
5870
6000
|
signInCopy: ConsentSignInCopySchema.optional(),
|
|
5871
|
-
scopeLabels: ConsentScopeLabelsSchema.optional()
|
|
6001
|
+
scopeLabels: ConsentScopeLabelsSchema.optional(),
|
|
6002
|
+
assuranceNotes: ConsentAssuranceNotesSchema.optional()
|
|
5872
6003
|
});
|
|
5873
6004
|
/**
|
|
5874
6005
|
* Bouncer Config (for GET response)
|
|
@@ -6450,6 +6581,17 @@ const UpdateProjectSchema = require_schemas.object({
|
|
|
6450
6581
|
webhookUrl: require_schemas.string().url().optional(),
|
|
6451
6582
|
webhookSecret: require_schemas.string().optional(),
|
|
6452
6583
|
beaconRateLimitPerMinute: require_schemas.number().int().positive().optional(),
|
|
6584
|
+
rateLimitExempt: require_schemas.boolean().optional(),
|
|
6585
|
+
requestFlagLabel: require_schemas.boolean().optional(),
|
|
6586
|
+
requestFlagTwoJumpShadow: require_schemas.boolean().optional(),
|
|
6587
|
+
requestFlagOwnClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6588
|
+
requestFlagWebClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6589
|
+
requestFlagSizedClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6590
|
+
requestFlagControlClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6591
|
+
requestFlagBrowserRelayClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6592
|
+
requestFlagMobileAppClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
|
|
6593
|
+
requestFlagLabelMatrix: RequestFlagLabelMatrixWriteSchema.optional(),
|
|
6594
|
+
eventCountLimits: EventCountLimitsSettingSchema.optional(),
|
|
6453
6595
|
postureOrigins: PostureOriginsSchema.optional(),
|
|
6454
6596
|
postureReportPaths: PostureReportPathsSchema.optional()
|
|
6455
6597
|
}).optional()
|
|
@@ -6773,8 +6915,6 @@ const HomeRailRollupsRequestSchema = require_schemas.object({ organizationId: Or
|
|
|
6773
6915
|
//#region src/api/signal-exposure.ts
|
|
6774
6916
|
/**
|
|
6775
6917
|
* Detection signal exposure: the wire shape of the "full signal set"
|
|
6776
|
-
* block on the `/api/v1/enforce` detection response (KYA-1107, "Adobe
|
|
6777
|
-
* Golden Snapshot").
|
|
6778
6918
|
*
|
|
6779
6919
|
* Every enforce detection payload carries these fields in addition to the
|
|
6780
6920
|
* condensed summary fields. Additive only: consumers must ignore keys they
|
|
@@ -6806,8 +6946,8 @@ const DetectionSignalExposureSchema = require_schemas.object({
|
|
|
6806
6946
|
reasonCodes: require_schemas.array(DetectionReasonCodeSchema).min(1).describe("Ordered detection/* reason codes, most-significant-evidence first, derived by the same mapDetectionToReasonCodes projection that feeds the gateway KYA-Reason-Codes header. Never empty: an assumed verdict carries a zero-evidence fallback code."),
|
|
6807
6947
|
confidenceLevel: ConfidenceLevelSchema.optional().describe("The engine's banded confidence level (low | medium | high | very_high). Omitted when the engine did not produce one (engine fault, skipDetection, or a demoted forged-credential verdict)."),
|
|
6808
6948
|
isAiCrawler: require_schemas.boolean().optional().describe("True when the engine classified the client as an AI training crawler (GPTBot, ClaudeBot, …) rather than an interactive agent. Omitted when the engine did not run."),
|
|
6809
|
-
riskScore: RiskScoreSchema.optional().describe("
|
|
6810
|
-
riskScoreSource: RiskScoreSourceSchema.optional().describe("
|
|
6949
|
+
riskScore: RiskScoreSchema.optional().describe("How likely the request is to be automated, from 0 to 1 with two decimals; riskScoreSource says whether it is calibrated. Null when no score was computed for the request. Distinct from `confidence` above, which is never derived from it."),
|
|
6950
|
+
riskScoreSource: RiskScoreSourceSchema.optional().describe("How riskScore was produced: 'uncalibrated' (a relative score: higher means more likely automated, but it is not an observed frequency) or 'calibrated' (mapped to observed outcomes, so it reads as a probability). Null exactly when riskScore is null.")
|
|
6811
6951
|
});
|
|
6812
6952
|
|
|
6813
6953
|
//#endregion
|
|
@@ -7377,7 +7517,15 @@ const HeartbeatRequestSchema = require_schemas.object({
|
|
|
7377
7517
|
/** Seconds since compute process started */
|
|
7378
7518
|
uptimeSeconds: require_schemas.number().nonnegative().optional(),
|
|
7379
7519
|
/** Current RSS memory in MB */
|
|
7380
|
-
memoryMb: require_schemas.number().nonnegative().optional()
|
|
7520
|
+
memoryMb: require_schemas.number().nonnegative().optional(),
|
|
7521
|
+
/**
|
|
7522
|
+
* ISO 8601 time (UTC, or with an offset) of the agent's last real user or channel message: the
|
|
7523
|
+
* newest `lastInteractionAt` across its OpenClaw session stores. Omitted while no session has
|
|
7524
|
+
* one. Checkpoint records it as user activity for the agent's tier. A value that isn't such a
|
|
7525
|
+
* time parses as absent instead of failing the heartbeat, which also carries `stop` and
|
|
7526
|
+
* `update_config`.
|
|
7527
|
+
*/
|
|
7528
|
+
lastUserActivityAt: require_schemas.string().datetime({ offset: true }).optional().catch(void 0)
|
|
7381
7529
|
});
|
|
7382
7530
|
/**
|
|
7383
7531
|
* Stop command — graceful shutdown, no payload accepted.
|
|
@@ -7423,7 +7571,11 @@ const HeartbeatResponseSchema = require_schemas.object({
|
|
|
7423
7571
|
ack: require_schemas.literal(true),
|
|
7424
7572
|
/** Pending commands for the compute process to execute */
|
|
7425
7573
|
commands: require_schemas.array(ComputeCommandSchema).default([]),
|
|
7426
|
-
/**
|
|
7574
|
+
/**
|
|
7575
|
+
* ISO timestamp of the last config change. A change is applied when the heartbeat returns
|
|
7576
|
+
* `update_config`, which a tier change withholds while the agent is in use, so this can be
|
|
7577
|
+
* newer than the config the gateway runs.
|
|
7578
|
+
*/
|
|
7427
7579
|
configUpdatedAt: require_schemas.string().datetime().optional()
|
|
7428
7580
|
});
|
|
7429
7581
|
/**
|
|
@@ -8305,7 +8457,12 @@ function isLegitimateCategory(category) {
|
|
|
8305
8457
|
].includes(category);
|
|
8306
8458
|
}
|
|
8307
8459
|
/**
|
|
8308
|
-
*
|
|
8460
|
+
* Display colour for an agent category (for UI), as a hex value.
|
|
8461
|
+
*
|
|
8462
|
+
* Part of this package's published API: npm consumers paint it in their own
|
|
8463
|
+
* dashboards, charts and email, outside any Checkpoint stylesheet, so it
|
|
8464
|
+
* stays a literal hex rather than a design-system `var()` reference, which
|
|
8465
|
+
* would resolve to nothing there.
|
|
8309
8466
|
*/
|
|
8310
8467
|
function getCategoryColor(category) {
|
|
8311
8468
|
return {
|
|
@@ -8538,12 +8695,17 @@ const INSTALLATION_TYPES = [
|
|
|
8538
8695
|
"dns_gateway",
|
|
8539
8696
|
"beacon"
|
|
8540
8697
|
];
|
|
8541
|
-
/**
|
|
8698
|
+
/**
|
|
8699
|
+
* The buckets the admin overview classifies every traffic event into.
|
|
8700
|
+
* `unidentified` holds the incomplete_data events the engine could not
|
|
8701
|
+
* classify, so the buckets add up to the total.
|
|
8702
|
+
*/
|
|
8542
8703
|
const TRAFFIC_TAXONOMY_BUCKETS = [
|
|
8543
8704
|
"human",
|
|
8544
8705
|
"ai_agent",
|
|
8545
8706
|
"ai_crawler",
|
|
8546
|
-
"other_automation"
|
|
8707
|
+
"other_automation",
|
|
8708
|
+
"unidentified"
|
|
8547
8709
|
];
|
|
8548
8710
|
/** Order is precedence: a user matching several rules is attributed to the first. */
|
|
8549
8711
|
const EXCLUSION_BUCKETS = [
|
|
@@ -8603,14 +8765,20 @@ const ADMIN_TRUSTED_METRICS = [
|
|
|
8603
8765
|
* row, none of its members is a counted person (`no_counted_members`).
|
|
8604
8766
|
*/
|
|
8605
8767
|
const ADMIN_ORG_EXCLUSION_REASONS = ["test_org", "no_counted_members"];
|
|
8606
|
-
/**
|
|
8768
|
+
/**
|
|
8769
|
+
* `counted`; `invited`, a teammate's invitee on a signup metric; or the first
|
|
8770
|
+
* rule that left the account out. User buckets take precedence over the org
|
|
8771
|
+
* reasons, and over `invited`: an invitee on the exclusion lists reads as
|
|
8772
|
+
* excluded, so each account is in exactly one part of its split.
|
|
8773
|
+
*/
|
|
8607
8774
|
const ADMIN_ACCOUNT_STATUSES = [
|
|
8608
8775
|
"counted",
|
|
8776
|
+
"invited",
|
|
8609
8777
|
...EXCLUSION_BUCKETS,
|
|
8610
8778
|
...ADMIN_ORG_EXCLUSION_REASONS
|
|
8611
8779
|
];
|
|
8612
8780
|
/** GET /api/admin/overview/accounts query. */
|
|
8613
|
-
/** Drill-down status filter: everyone, any exclusion, or one status. */
|
|
8781
|
+
/** Drill-down status filter: everyone, any exclusion (never `invited`), or one status. */
|
|
8614
8782
|
const ADMIN_ACCOUNTS_STATUS_FILTERS = [
|
|
8615
8783
|
"all",
|
|
8616
8784
|
"excluded",
|
|
@@ -8627,6 +8795,191 @@ const adminAccountsQuerySchema = require_schemas.object({
|
|
|
8627
8795
|
status: require_schemas._enum(ADMIN_ACCOUNTS_STATUS_FILTERS).default("all")
|
|
8628
8796
|
});
|
|
8629
8797
|
|
|
8798
|
+
//#endregion
|
|
8799
|
+
//#region src/data/generated/verdict-rules-digest.json
|
|
8800
|
+
var sha256$3 = "0aae838abc1d38eb7541bb360a570809cb95d05e59a857e852bff145b7503291";
|
|
8801
|
+
|
|
8802
|
+
//#endregion
|
|
8803
|
+
//#region src/verdict-rules/default.json
|
|
8804
|
+
var default_default = {
|
|
8805
|
+
schema: 1,
|
|
8806
|
+
version: 0,
|
|
8807
|
+
tuning: {
|
|
8808
|
+
"currentChromeMajor": 156,
|
|
8809
|
+
"oldChromeMajorLag": 11,
|
|
8810
|
+
"bareTemplateMinCalls": 3,
|
|
8811
|
+
"bareTemplateMinAddresses": 3,
|
|
8812
|
+
"accountHourVolumeCalls": 16,
|
|
8813
|
+
"behaviourIpCount": 3,
|
|
8814
|
+
"spreadWindowCalls": 2,
|
|
8815
|
+
"spreadWindowCountries": 2,
|
|
8816
|
+
"networksInHourMin": 3,
|
|
8817
|
+
"clientAppsMin": 5,
|
|
8818
|
+
"poolAppsMin": 2,
|
|
8819
|
+
"rapidCountryMin": 3,
|
|
8820
|
+
"manyCountriesMin": 3,
|
|
8821
|
+
"highCallVolumeLine": 60,
|
|
8822
|
+
"minuteAlignedWindowMs": 200,
|
|
8823
|
+
"webEditorHandoffWindowMs": 72e5,
|
|
8824
|
+
"minuteAlignedWeight": .3,
|
|
8825
|
+
"accountHistoryBandMedium": .35,
|
|
8826
|
+
"accountHistoryBandHigh": .6,
|
|
8827
|
+
"countryWeights": {
|
|
8828
|
+
"two": .3,
|
|
8829
|
+
"three": .6
|
|
8830
|
+
},
|
|
8831
|
+
"rotationDistanceKm": 1200,
|
|
8832
|
+
"rotationGapMs": 9e5,
|
|
8833
|
+
"rotationIspCount": 3,
|
|
8834
|
+
"stateApartKm": 300,
|
|
8835
|
+
"twoJumpLegKm": 1e3,
|
|
8836
|
+
"twoJumpPriorMaxAgeMs": 36e5,
|
|
8837
|
+
"minuteBatch": {
|
|
8838
|
+
"memoryMs": 72e5,
|
|
8839
|
+
"timeoutMs": 75,
|
|
8840
|
+
"observations": 12,
|
|
8841
|
+
"spanMs": 2e3
|
|
8842
|
+
},
|
|
8843
|
+
"minutePhase": {
|
|
8844
|
+
"memoryMs": 72e5,
|
|
8845
|
+
"timeoutMs": 75,
|
|
8846
|
+
"observations": 12,
|
|
8847
|
+
"spanMs": 1e3,
|
|
8848
|
+
"clockSkewMs": 5e3
|
|
8849
|
+
},
|
|
8850
|
+
"scheduler": {
|
|
8851
|
+
"memoryMs": 72e5,
|
|
8852
|
+
"timeoutMs": 75,
|
|
8853
|
+
"reorderToleranceMs": 1e3,
|
|
8854
|
+
"clockSkewMs": 5e3,
|
|
8855
|
+
"burstGapMs": 5e3,
|
|
8856
|
+
"burstSpanMs": 3e3,
|
|
8857
|
+
"burstMinAccounts": 8,
|
|
8858
|
+
"periodToleranceMs": 3e3,
|
|
8859
|
+
"coreMinAccounts": 5
|
|
8860
|
+
},
|
|
8861
|
+
"publicAccessPointAccounts": 8,
|
|
8862
|
+
"networkAccountWeights": {
|
|
8863
|
+
"fixed_line": {
|
|
8864
|
+
"publicAccessPoint": .7,
|
|
8865
|
+
"steps": [{
|
|
8866
|
+
"accounts": 5,
|
|
8867
|
+
"weight": .5
|
|
8868
|
+
}, {
|
|
8869
|
+
"accounts": 3,
|
|
8870
|
+
"weight": .3
|
|
8871
|
+
}]
|
|
8872
|
+
},
|
|
8873
|
+
"unrouted_isp": {
|
|
8874
|
+
"publicAccessPoint": .5,
|
|
8875
|
+
"steps": [{
|
|
8876
|
+
"accounts": 5,
|
|
8877
|
+
"weight": .3
|
|
8878
|
+
}, {
|
|
8879
|
+
"accounts": 3,
|
|
8880
|
+
"weight": .15
|
|
8881
|
+
}]
|
|
8882
|
+
},
|
|
8883
|
+
"hosting": {
|
|
8884
|
+
"publicAccessPoint": .3,
|
|
8885
|
+
"steps": [{
|
|
8886
|
+
"accounts": 5,
|
|
8887
|
+
"weight": .2
|
|
8888
|
+
}, {
|
|
8889
|
+
"accounts": 3,
|
|
8890
|
+
"weight": .1
|
|
8891
|
+
}]
|
|
8892
|
+
}
|
|
8893
|
+
},
|
|
8894
|
+
"headerContradictionWeights": {
|
|
8895
|
+
"page_load_on_json_post": .3,
|
|
8896
|
+
"client_hint_contradiction": .33,
|
|
8897
|
+
"browser_headers_without_user_agent": .16,
|
|
8898
|
+
"hosting_on_unpaid_tier": .16,
|
|
8899
|
+
"pre_zstd_headers_on_modern_chrome": .16
|
|
8900
|
+
},
|
|
8901
|
+
"populationFloorWeight": .1,
|
|
8902
|
+
"ja4VersionMismatchWeight": .75,
|
|
8903
|
+
"velocityEscalationFloors": {
|
|
8904
|
+
"requestCount": 150,
|
|
8905
|
+
"requestsPerMinute": 120
|
|
8906
|
+
},
|
|
8907
|
+
"zstdAndPriorityFromMajor": 124,
|
|
8908
|
+
"greaseMajorRange": {
|
|
8909
|
+
"from": 120,
|
|
8910
|
+
"to": 157
|
|
8911
|
+
},
|
|
8912
|
+
"missingUaGzipChromeMinimumMajor": 124,
|
|
8913
|
+
"establishedAgeDays": 365,
|
|
8914
|
+
"newAccountAgeDays": 30,
|
|
8915
|
+
"maxAccountAgeDays": 36500
|
|
8916
|
+
}
|
|
8917
|
+
};
|
|
8918
|
+
|
|
8919
|
+
//#endregion
|
|
8920
|
+
//#region src/verdict-rules/compiled.ts
|
|
8921
|
+
const deepFreeze = (value) => {
|
|
8922
|
+
if (value instanceof Object) {
|
|
8923
|
+
Object.values(value).forEach(deepFreeze);
|
|
8924
|
+
Object.freeze(value);
|
|
8925
|
+
}
|
|
8926
|
+
return value;
|
|
8927
|
+
};
|
|
8928
|
+
const compileEmbeddedVerdictRules = (rules) => deepFreeze({
|
|
8929
|
+
source: "embedded",
|
|
8930
|
+
version: rules.version,
|
|
8931
|
+
tuning: rules.tuning
|
|
8932
|
+
});
|
|
8933
|
+
const embeddedVerdictRules = compileEmbeddedVerdictRules(structuredClone(default_default));
|
|
8934
|
+
const embeddedVerdictRulesSha256 = sha256$3;
|
|
8935
|
+
|
|
8936
|
+
//#endregion
|
|
8937
|
+
//#region src/session-velocity-partition.ts
|
|
8938
|
+
const SESSION_VELOCITY_BUCKET_SECONDS = 300;
|
|
8939
|
+
const SESSION_VELOCITY_BUCKET_MS = 300 * 1e3;
|
|
8940
|
+
const SESSION_VELOCITY_PARTITIONS = 32;
|
|
8941
|
+
const SESSION_VELOCITY_SKETCH_ROWS = 4;
|
|
8942
|
+
const SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS = 3;
|
|
8943
|
+
const SESSION_VELOCITY_SKETCH_COLUMNS = 16 ** 3;
|
|
8944
|
+
const SESSION_VELOCITY_SKETCH_COUNTER_MAX = 65535;
|
|
8945
|
+
const SESSION_VELOCITY_WRITE_COUNTER_INDEX = 4 * SESSION_VELOCITY_SKETCH_COLUMNS / 2;
|
|
8946
|
+
const SESSION_VELOCITY_EXPIRY_SKEW_SECONDS = 30;
|
|
8947
|
+
const VELOCITY_ESCALATION_FLOORS = embeddedVerdictRules.tuning.velocityEscalationFloors;
|
|
8948
|
+
function sessionVelocityBucket(nowMs) {
|
|
8949
|
+
return Math.floor(nowMs / SESSION_VELOCITY_BUCKET_MS);
|
|
8950
|
+
}
|
|
8951
|
+
function sessionVelocityBucketStart(nowMs) {
|
|
8952
|
+
return sessionVelocityBucket(nowMs) * SESSION_VELOCITY_BUCKET_MS;
|
|
8953
|
+
}
|
|
8954
|
+
function sessionVelocityExpirySeconds(nowMs, bucketMs = SESSION_VELOCITY_BUCKET_MS, skewSeconds = 30) {
|
|
8955
|
+
const bucketEnd = (Math.floor(nowMs / bucketMs) + 1) * bucketMs;
|
|
8956
|
+
return Math.ceil((bucketEnd - nowMs) / 1e3) + skewSeconds;
|
|
8957
|
+
}
|
|
8958
|
+
function verdictShardIndexFor(projectId, sessionId, count) {
|
|
8959
|
+
const text = `${projectId}\u0000${sessionId}`;
|
|
8960
|
+
let hash = 2166136261;
|
|
8961
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
8962
|
+
hash ^= text.charCodeAt(index);
|
|
8963
|
+
hash = Math.imul(hash, 16777619);
|
|
8964
|
+
}
|
|
8965
|
+
hash ^= hash >>> 16;
|
|
8966
|
+
hash = Math.imul(hash, 2246822507);
|
|
8967
|
+
hash ^= hash >>> 13;
|
|
8968
|
+
hash = Math.imul(hash, 3266489909);
|
|
8969
|
+
hash ^= hash >>> 16;
|
|
8970
|
+
return (hash >>> 0) % count;
|
|
8971
|
+
}
|
|
8972
|
+
function sessionVelocityPartition(projectId, sessionId) {
|
|
8973
|
+
return verdictShardIndexFor(projectId, sessionId, 32);
|
|
8974
|
+
}
|
|
8975
|
+
function sessionVelocitySketchCells(clientHash, hexDigits = 3, columns = 16 ** hexDigits) {
|
|
8976
|
+
return Array.from({ length: 4 }, (_, row) => {
|
|
8977
|
+
const start = row * hexDigits;
|
|
8978
|
+
const column = Number.parseInt(clientHash.slice(start, start + hexDigits), 16) % columns;
|
|
8979
|
+
return row * columns + column;
|
|
8980
|
+
});
|
|
8981
|
+
}
|
|
8982
|
+
|
|
8630
8983
|
//#endregion
|
|
8631
8984
|
//#region src/utils/agent-runtime-label.ts
|
|
8632
8985
|
/**
|
|
@@ -9939,7 +10292,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9939
10292
|
"lastUpdated": "2025-01-10T00:00:00Z"
|
|
9940
10293
|
}
|
|
9941
10294
|
],
|
|
9942
|
-
"hash": "
|
|
10295
|
+
"hash": "7d7efc9019a20794764cb9977b744c7a8c31386b5ee0567dde81fd42f61f294e"
|
|
9943
10296
|
},
|
|
9944
10297
|
"rules": {
|
|
9945
10298
|
"userAgents": {
|
|
@@ -9995,7 +10348,8 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9995
10348
|
"patterns": [
|
|
9996
10349
|
"facebookexternalhit",
|
|
9997
10350
|
"facebookcatalog",
|
|
9998
|
-
"FacebookBot"
|
|
10351
|
+
"FacebookBot",
|
|
10352
|
+
"meta-externalads"
|
|
9999
10353
|
],
|
|
10000
10354
|
"confidence": .9,
|
|
10001
10355
|
"description": "Meta/Facebook web crawlers for link previews and training",
|
|
@@ -10014,7 +10368,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10014
10368
|
"category": "scraper"
|
|
10015
10369
|
},
|
|
10016
10370
|
"bytedance_crawler": {
|
|
10017
|
-
"patterns": ["Bytespider", "
|
|
10371
|
+
"patterns": ["Bytespider", "@bytedance.com"],
|
|
10018
10372
|
"confidence": .85,
|
|
10019
10373
|
"description": "ByteDance/TikTok web crawler",
|
|
10020
10374
|
"category": "scraper"
|
|
@@ -10266,7 +10620,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10266
10620
|
"category": "ai_assistant"
|
|
10267
10621
|
},
|
|
10268
10622
|
"meta_ai": {
|
|
10269
|
-
"patterns": ["Meta-ExternalAgent"],
|
|
10623
|
+
"patterns": ["Meta-ExternalAgent", "Meta-ExternalFetcher"],
|
|
10270
10624
|
"confidence": .95,
|
|
10271
10625
|
"category": "scraper",
|
|
10272
10626
|
"description": "Meta AI assistant"
|
|
@@ -10303,7 +10657,9 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10303
10657
|
"Mediapartners-Google",
|
|
10304
10658
|
"Google-InspectionTool",
|
|
10305
10659
|
"GoogleOther",
|
|
10306
|
-
"Google-Read-Aloud"
|
|
10660
|
+
"Google-Read-Aloud",
|
|
10661
|
+
"Google-Site-Verification",
|
|
10662
|
+
"Google-CWS"
|
|
10307
10663
|
],
|
|
10308
10664
|
"confidence": .95,
|
|
10309
10665
|
"description": "Google search crawler and related bots",
|
|
@@ -10327,7 +10683,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10327
10683
|
"duckduckgo": {
|
|
10328
10684
|
"patterns": [
|
|
10329
10685
|
"DuckDuckBot",
|
|
10330
|
-
"
|
|
10686
|
+
"DuckAssistBot",
|
|
10331
10687
|
"DuckDuckGo-Favicons-Bot",
|
|
10332
10688
|
"DuckDuckGoImageProxy"
|
|
10333
10689
|
],
|
|
@@ -10385,7 +10741,6 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10385
10741
|
},
|
|
10386
10742
|
"sogoubot": {
|
|
10387
10743
|
"patterns": [
|
|
10388
|
-
"Sogou",
|
|
10389
10744
|
"Sogou web spider",
|
|
10390
10745
|
"Sogou inst spider",
|
|
10391
10746
|
"Sogou spider"
|
|
@@ -13495,6 +13850,216 @@ const CliPairingExchangeDataSchema = require_schemas.object({
|
|
|
13495
13850
|
dashboardUrl: require_schemas.string().url()
|
|
13496
13851
|
}).strict();
|
|
13497
13852
|
|
|
13853
|
+
//#endregion
|
|
13854
|
+
//#region src/verdict-dictionaries.ts
|
|
13855
|
+
const SPOOL_DICTIONARY_S1 = "{\"request_flags\":[\"page_load_on_json_post\",\"client_hint_contradiction\",\"browser_headers_without_user_agent\",\"hosting_on_unpaid_tier\",\"pre_zstd_headers_on_modern_chrome\",\"upgrade_insecure_requests_on_json_post\",\"hosting_network\",\"tor\",\"vpn\",\"apple_private_relay\",\"old_chrome\",\"grease_brand_mismatch\",\"language_region_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"http_client_user_agent\",\"zh_cn_cross_site_windows_chrome\",\"gzip_only_browser_with_evidence\",\"chrome_without_hints_or_language_on_hosting\",\"no_human_proof\",\"guest_cors_population\",\"device_type_contradiction\",\"served_bot_memory\",\"geo_witness_memory\",\"dispersed_burst\",\"account_age_new\",\"email_unverified\",\"account_country_mismatch\",\"email_disposable\",\"email_role\",\"email_private_relay\",\"account_network_rotation\",\"account_impossible_travel\",\"country_spread\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\"],\"label_matrix\":[{\"flag\":\"page_load_on_json_post\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"client_hint_contradiction\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"upgrade_insecure_requests_on_json_post\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_network_rotation\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_impossible_travel\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"pre_zstd_headers_on_modern_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"grease_brand_mismatch\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"bare_product_agent_template\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"missing_ua_gzip_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"gzip_only_hinted_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"zh_cn_cross_site_windows_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"country_spread\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"old_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"shared_network\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"minute_aligned\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_hour_volume\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"network_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"no_human_proof\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"device_type_contradiction\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"pool_address\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"ip_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_many_apps\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_rapid_country_rotation\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_many_countries\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"gzip_only_browser_with_evidence\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"chrome_without_hints_or_language_on_hosting\",\"label\":true,\"scope\":\"client+tier\"}],\"label_gates\":[{\"flag\":\"shared_network\",\"gate\":\"established_header_only\"}],\"fraud_label\":{\"flags\":[\"page_load_on_json_post\",\"client_hint_contradiction\",\"upgrade_insecure_requests_on_json_post\",\"account_network_rotation\",\"account_impossible_travel\",\"pre_zstd_headers_on_modern_chrome\",\"grease_brand_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"zh_cn_cross_site_windows_chrome\",\"country_spread\",\"old_chrome\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"no_human_proof\",\"device_type_contradiction\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\",\"gzip_only_browser_with_evidence\",\"chrome_without_hints_or_language_on_hosting\"],\"count\":27,\"signals\":[{\"signal\":\"page_load_on_json_post\",\"tier\":\"evidence\"},{\"signal\":\"client_hint_contradiction\",\"tier\":\"evidence\"},{\"signal\":\"upgrade_insecure_requests_on_json_post\",\"tier\":\"evidence\"},{\"signal\":\"account_network_rotation\",\"tier\":\"evidence\"},{\"signal\":\"account_impossible_travel\",\"tier\":\"evidence\"},{\"signal\":\"pre_zstd_headers_on_modern_chrome\",\"tier\":\"evidence\"},{\"signal\":\"grease_brand_mismatch\",\"tier\":\"population\"},{\"signal\":\"bare_product_agent_template\",\"tier\":\"population\"},{\"signal\":\"missing_ua_gzip_chrome\",\"tier\":\"population\"},{\"signal\":\"gzip_only_hinted_chrome\",\"tier\":\"population\"},{\"signal\":\"zh_cn_cross_site_windows_chrome\",\"tier\":\"population\"},{\"signal\":\"country_spread\",\"tier\":\"evidence\"},{\"signal\":\"old_chrome\",\"tier\":\"population\"},{\"signal\":\"shared_network\",\"tier\":\"evidence\"},{\"signal\":\"minute_aligned\",\"tier\":\"evidence\"},{\"signal\":\"account_hour_volume\",\"tier\":\"evidence\"},{\"signal\":\"account_convicted\",\"tier\":\"evidence\"},{\"signal\":\"network_convicted\",\"tier\":\"evidence\"},{\"signal\":\"no_human_proof\",\"tier\":\"population\"},{\"signal\":\"device_type_contradiction\",\"tier\":\"evidence\"},{\"signal\":\"pool_address\",\"tier\":\"evidence\"},{\"signal\":\"ip_convicted\",\"tier\":\"evidence\"},{\"signal\":\"account_many_apps\",\"tier\":\"evidence\"},{\"signal\":\"account_rapid_country_rotation\",\"tier\":\"evidence\"},{\"signal\":\"account_many_countries\",\"tier\":\"evidence\"},{\"signal\":\"gzip_only_browser_with_evidence\",\"tier\":\"population\"},{\"signal\":\"chrome_without_hints_or_language_on_hosting\",\"tier\":\"population\"}]},\"attributes\":{\"emailVerified\":\"true\",\"accountAgeDays\":\"36500\",\"accountCountry\":\"US\",\"deviceType\":\"desktop\"},\"servedNetwork\":{\"publicAccessPoint\":true},\"servedEnvironment\":{\"incognito\":true,\"privacySettings\":true,\"virtualMachine\":true,\"developerTools\":true,\"tampering\":true,\"antiDetect\":true,\"osMismatch\":true,\"mitm\":true},\"guest_cors\":{\"status\":\"matched\",\"carried\":true},\"accountHistory\":{\"calls\":16,\"countries\":1,\"ips\":1,\"rapidCountries\":3,\"hourCountries\":3,\"noAddressReuse\":true,\"aligned\":0,\"exactGap\":false,\"alignedNow\":false,\"networkAccounts\":1,\"networkCapped\":false,\"rotation\":null,\"residentialIsps\":0,\"accountConvicted\":true,\"networkConvicted\":true,\"ipConvicted\":true,\"poolMarked\":true,\"clientApps\":8,\"tier\":\"free\",\"addressClass\":\"fixed_line\",\"signals\":[],\"flags\":[\"account_hour_volume\",\"account_rapid_country_rotation\",\"account_many_countries\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\"],\"weight\":0,\"score\":0,\"band\":null}}\"reasonCodes\":\"reasons\":\"label_gates\":\"gate\":\"count\":\"attributes\":\"emailVerified\":\"accountAgeDays\":\"accountCountry\":\"deviceType\":\"email\":\"servedNetwork\":\"publicAccessPoint\":\"servedEnvironment\":\"incognito\":\"privacySettings\":\"virtualMachine\":\"developerTools\":\"tampering\":\"antiDetect\":\"osMismatch\":\"mitm\":\"guest_cors\":\"status\":\"carried\":\"accountConvicted\":\"networkConvicted\":\"ipConvicted\":\"poolMarked\":\"clientApps\":\"request_flags\":\"accountHistory\":\"calls\":\"countries\":\"ips\":\"rapidCountries\":\"hourCountries\":\"noAddressReuse\":\"aligned\":\"exactGap\":\"alignedNow\":\"networkAccounts\":\"networkCapped\":\"rotation\":\"residentialIsps\":\"addressClass\":\"weight\":\"score\":\"band\":\"fraud_label\":\"label_matrix\":\"signals\":\"flags\":\"label\":\"scope\":\"signal\":\"flag\":\"tier\":\"free\",\"fixed_line\",\"page_load_on_json_post\",\"client_hint_contradiction\",\"browser_headers_without_user_agent\",\"hosting_on_unpaid_tier\",\"pre_zstd_headers_on_modern_chrome\",\"upgrade_insecure_requests_on_json_post\",\"hosting_network\",\"tor\",\"vpn\",\"apple_private_relay\",\"old_chrome\",\"grease_brand_mismatch\",\"language_region_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"http_client_user_agent\",\"zh_cn_cross_site_windows_chrome\",\"gzip_only_browser_with_evidence\",\"no_human_proof\",\"guest_cors_population\",\"device_type_contradiction\",\"served_bot_memory\",\"geo_witness_memory\",\"dispersed_burst\",\"account_age_new\",\"email_unverified\",\"account_country_mismatch\",\"email_disposable\",\"email_role\",\"email_private_relay\",\"account_network_rotation\",\"account_impossible_travel\",\"country_spread\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\",\"established_header_only\",\"evidence\",\"population\",\"true\",\"desktop\",\"matched\",\"chrome_without_hints_or_language_on_hosting\"";
|
|
13856
|
+
const VERDICT_DICTIONARIES = {
|
|
13857
|
+
r1: "[\"User-Agent matched known agent pattern: ChatGPT\",\"ai_agent\",\"incomplete_data\",\"medium\",\"none\",\"not_agent\",\"scraper\",\"unknown\"]{\"version\":1,\"kind\":\"verdict\",\"projectId\":\"\",\"detectionId\":\"\",\"createdAt\":\"\",\"dedupeKey\":\"\",\"row\":{\"ja4\":null,\"geoAsn\":null,\"geoIsp\":null,\"network\":null,\"signals\":null,\"userId\":null,\"geoCity\":null,\"isAgent\":true,\"metadata\":{\"url\":\"\",\"path\":\"\",\"method\":\"POST\",\"source\":\"middleware\",\"isAgent\":true,\"posture\":{\"status\":\"absent\"},\"reasons\":[\"Request did not carry enough signal to classify confidently\"],\"agentType\":\"\",\"enforcement\":{\"action\":\"allow\",\"reason\":\"enforcement_disabled\",\"signals\":[{\"source\":\"user_agent_pattern\",\"weight\":1,\"confidence\":95,\"signalType\":\"pattern\",\"explanation\":\"User-Agent matched known agent pattern: ChatGPT\",\"metadata\":{\"window_seconds\":300,\"requests_per_minute\":0,\"request_count_in_window\":1}}],\"evidence\":[{\"plane\":\"pattern\",\"signal\":\"user_agent_pattern\",\"weight\":1,\"probabilityContribution\":0}],\"agentName\":\"\",\"latencyMs\":16},\"priorIsAgent\":true,\"engineIsAgent\":false,\"postureOutcome\":{\"status\":\"absent\"},\"clientSessionId\":true,\"fusedFromPriorSession\":true,\"shadow_scoring_algorithm\":\"noisy-or-v1\",\"shadow_calibration_method\":\"platt\",\"shadow_noisy_or_confidence\":0,\"shadow_calibrated_confidence\":0,\"riskLevel\":\"high\",\"isAiCrawler\":false,\"verificationMethod\":\"pattern\",\"detection_basis\":\"no_evidence\"},\"pixelId\":\"\",\"buildSha\":null,\"deviceId\":null,\"policyId\":null,\"agentType\":\"\",\"confidence\":100,\"geoRegion\":null,\"ipAddress\":\"\",\"latencyMs\":16,\"projectId\":\"\",\"riskScore\":0,\"sessionId\":\"\",\"userAgent\":\"\",\"engineName\":\"checkpoint-engine-wasm\",\"geoCountry\":null,\"userTraits\":null,\"requestPath\":\"\",\"rulesetHash\":\"\",\"agentTypeId\":null,\"engineExtras\":null,\"agentCategory\":\"ai_assistant\",\"correlationId\":\"\",\"engineVersion\":\"\",\"detectionClass\":\"bot\",\"rulesetVersion\":\"\",\"registryVersion\":null,\"consolidatedSessionId\":\"\"},\"session\":{\"organizationId\":\"\",\"outcome\":\"unverified_agent\",\"verification\":{\"tier\":1,\"vendor\":null,\"protocol\":null,\"source\":null},\"signalStrength\":\"weak\"}}",
|
|
13858
|
+
a1: "[\"Automation Tools\",\"Bot\",\"IncompleteData\",\"Request did not carry enough signal to classify confidently\",\"User-Agent matched known agent pattern: ChatGPT\",\"behavioral\",\"bot\",\"detection/session-velocity-signal\",\"high\",\"incomplete_data\",\"low\",\"none\",\"not_agent\",\"session_velocity\"]{\"success\":true,\"data\":{\"sessionId\":\"\",\"correlationId\":\"\",\"recommendedAction\":\"allow\",\"reason\":\"enforcement_disabled\",\"verdict\":{\"isAgent\":true,\"detectionClass\":\"ai_agent\",\"confidence\":100,\"agentName\":\"\",\"agentType\":\"\",\"reasons\":[\"User-Agent matched known agent pattern: ChatGPT\"],\"basis\":\"no_evidence\"},\"fusedFromPriorSession\":false,\"posture\":{\"status\":\"absent\"},\"detection\":{\"isAgent\":true,\"isBot\":true,\"confidence\":100,\"detectionClass\":{\"type\":\"AiAgent\",\"agentType\":\"\",\"botType\":\"\",\"legitimacy\":\"Suspicious\"},\"signals\":[{\"signalType\":\"pattern\",\"confidence\":95,\"weight\":1,\"source\":\"user_agent_pattern\",\"explanation\":\"1 requests observed from this client in a 300s window (session-velocity heuristic, first-pass scaling, not yet fitted to measured traffic)\",\"metadata\":{\"request_count_in_window\":1,\"requests_per_minute\":0,\"window_seconds\":300}}],\"reasonCodes\":[\"detection/ua-pattern-match\"],\"confidenceLevel\":\"very_high\",\"isAiCrawler\":false,\"riskScore\":0,\"riskScoreSource\":\"uncalibrated\",\"reasons\":[\"User-Agent matched known agent pattern: ChatGPT\"],\"detectedAgent\":{\"type\":\"AI\",\"name\":\"ChatGPT\"},\"agentType\":\"\",\"botType\":\"ChatGPT\",\"verificationMethod\":\"pattern\",\"riskLevel\":\"medium\",\"assurance\":\"anonymous\",\"metadata\":{\"processingTime\":23,\"detection_basis\":\"no_evidence\"},\"timestamp\":\"\"},\"metadata\":{\"processingTime\":23,\"wasmUsed\":true,\"cacheHit\":false}}}",
|
|
13859
|
+
s1: SPOOL_DICTIONARY_S1,
|
|
13860
|
+
s2: `${SPOOL_DICTIONARY_S1},"stale_safari_16_business_hosting","library_ua_on_web_client","automation_ua_on_web_client","truncated_browser_ua","round_the_clock","template_minute_arc","linked_rare_header","new_asn_template","new_country_asn_template","signup_cohort_abroad","mobile_app_new_account_abroad","wave_template_young_account","safari_without_priority_business_hosting","team_trial_new_account","carried":true},"device":{"source":"cookie","recallId":"rc1:"},"carried":true},"device":{"id":"","source":"issued","recallId":"rc1:"},"accountHistory":{"hours":16,"calls":16,"countries":1,"ips":1,"rapidCountries":3`
|
|
13861
|
+
};
|
|
13862
|
+
function isVerdictDictionaryId(id) {
|
|
13863
|
+
return Object.hasOwn(VERDICT_DICTIONARIES, id);
|
|
13864
|
+
}
|
|
13865
|
+
|
|
13866
|
+
//#endregion
|
|
13867
|
+
//#region src/request-flag-registry.ts
|
|
13868
|
+
const REQUEST_FLAG_BITS_VERSION = 1;
|
|
13869
|
+
const REQUEST_FLAG_REGISTRY = [
|
|
13870
|
+
"page_load_on_json_post",
|
|
13871
|
+
"client_hint_contradiction",
|
|
13872
|
+
"browser_headers_without_user_agent",
|
|
13873
|
+
"hosting_on_unpaid_tier",
|
|
13874
|
+
"pre_zstd_headers_on_modern_chrome",
|
|
13875
|
+
"account_three_state",
|
|
13876
|
+
"account_two_jump",
|
|
13877
|
+
"shared_clock_slot",
|
|
13878
|
+
"stable_minute_offset",
|
|
13879
|
+
"aligned_minute_batch",
|
|
13880
|
+
"account_state_rotation",
|
|
13881
|
+
"upgrade_insecure_requests_on_json_post",
|
|
13882
|
+
"hosting_network",
|
|
13883
|
+
"tor",
|
|
13884
|
+
"vpn",
|
|
13885
|
+
"apple_private_relay",
|
|
13886
|
+
"old_chrome",
|
|
13887
|
+
"grease_brand_mismatch",
|
|
13888
|
+
"language_region_mismatch",
|
|
13889
|
+
"bare_product_agent_template",
|
|
13890
|
+
"missing_ua_gzip_chrome",
|
|
13891
|
+
"gzip_only_hinted_chrome",
|
|
13892
|
+
"http_client_user_agent",
|
|
13893
|
+
"zh_cn_cross_site_windows_chrome",
|
|
13894
|
+
"gzip_only_browser_with_evidence",
|
|
13895
|
+
"chrome_without_hints_or_language_on_hosting",
|
|
13896
|
+
"sec_fetch_user_on_background_request",
|
|
13897
|
+
"hosting_old_profile_fingerprint",
|
|
13898
|
+
"no_human_proof",
|
|
13899
|
+
"guest_cors_population",
|
|
13900
|
+
"native_handoff_after_forged_web_editor",
|
|
13901
|
+
"device_type_contradiction",
|
|
13902
|
+
"served_bot_memory",
|
|
13903
|
+
"geo_witness_memory",
|
|
13904
|
+
"dispersed_burst",
|
|
13905
|
+
"account_high_call_volume",
|
|
13906
|
+
"paired_account_coordination",
|
|
13907
|
+
"account_age_new",
|
|
13908
|
+
"email_unverified",
|
|
13909
|
+
"account_country_mismatch",
|
|
13910
|
+
"email_disposable",
|
|
13911
|
+
"email_role",
|
|
13912
|
+
"email_private_relay",
|
|
13913
|
+
"account_network_rotation",
|
|
13914
|
+
"account_impossible_travel",
|
|
13915
|
+
"country_spread",
|
|
13916
|
+
"shared_network",
|
|
13917
|
+
"minute_aligned",
|
|
13918
|
+
"account_convicted",
|
|
13919
|
+
"network_convicted",
|
|
13920
|
+
"pool_address",
|
|
13921
|
+
"ip_convicted",
|
|
13922
|
+
"account_many_apps",
|
|
13923
|
+
"account_rapid_country_rotation",
|
|
13924
|
+
"account_many_countries",
|
|
13925
|
+
"account_hour_volume",
|
|
13926
|
+
"stale_safari_16_business_hosting",
|
|
13927
|
+
"library_ua_on_web_client",
|
|
13928
|
+
"automation_ua_on_web_client",
|
|
13929
|
+
"truncated_browser_ua",
|
|
13930
|
+
"round_the_clock",
|
|
13931
|
+
"template_minute_arc",
|
|
13932
|
+
"linked_rare_header",
|
|
13933
|
+
"new_asn_template",
|
|
13934
|
+
"new_country_asn_template",
|
|
13935
|
+
"signup_cohort_abroad",
|
|
13936
|
+
"mobile_app_new_account_abroad",
|
|
13937
|
+
"wave_template_young_account",
|
|
13938
|
+
"safari_without_priority_business_hosting",
|
|
13939
|
+
"team_trial_new_account",
|
|
13940
|
+
"many_templates",
|
|
13941
|
+
"stale_safari_16",
|
|
13942
|
+
"mobile_app_on_hosting",
|
|
13943
|
+
"ua_new",
|
|
13944
|
+
"ua_young",
|
|
13945
|
+
"email_fan",
|
|
13946
|
+
"heavy_days",
|
|
13947
|
+
"country_days",
|
|
13948
|
+
"night_days",
|
|
13949
|
+
"net_pingpong",
|
|
13950
|
+
"lang_3way",
|
|
13951
|
+
"net24_days_15",
|
|
13952
|
+
"interleave_country_30m",
|
|
13953
|
+
"night_16_50",
|
|
13954
|
+
"sibling_client",
|
|
13955
|
+
"guest_scatter",
|
|
13956
|
+
"burst_5",
|
|
13957
|
+
"app_ua_on_web",
|
|
13958
|
+
"session_age_96h",
|
|
13959
|
+
"bare_lang_chromium",
|
|
13960
|
+
"rapid_pairs",
|
|
13961
|
+
"young_paid_business_hosting_heavy_8",
|
|
13962
|
+
"safari_26_without_priority",
|
|
13963
|
+
"old_account_abroad_new_country",
|
|
13964
|
+
"rtc16_two_days",
|
|
13965
|
+
"rtc20_prior_carry_7d",
|
|
13966
|
+
"template_majority_b_95",
|
|
13967
|
+
"same_template_3_clients",
|
|
13968
|
+
"two_operators_10s",
|
|
13969
|
+
"script_defaults_browser_ua",
|
|
13970
|
+
"agent_carry_web",
|
|
13971
|
+
"sync_group3",
|
|
13972
|
+
"aged_batch_lang",
|
|
13973
|
+
"two_addresses_10s",
|
|
13974
|
+
"flip_ladder",
|
|
13975
|
+
"flip_ua_10s",
|
|
13976
|
+
"storage_access_header",
|
|
13977
|
+
"account_all_new",
|
|
13978
|
+
"node_defaults_browser_ua",
|
|
13979
|
+
"oprot3",
|
|
13980
|
+
"oprot4",
|
|
13981
|
+
"oprotapp3",
|
|
13982
|
+
"noreuse4",
|
|
13983
|
+
"noreuse3",
|
|
13984
|
+
"apps4",
|
|
13985
|
+
"wnoreuse5"
|
|
13986
|
+
];
|
|
13987
|
+
|
|
13988
|
+
//#endregion
|
|
13989
|
+
//#region src/request-flag-bits.ts
|
|
13990
|
+
const REQUEST_FLAG_BITS_FIELD = "request_flag_bits";
|
|
13991
|
+
const UNKNOWN_FLAG_BIT_PREFIX = "bit:";
|
|
13992
|
+
const FLAG_INDEX = new Map(REQUEST_FLAG_REGISTRY.map((name, index) => [name, index]));
|
|
13993
|
+
const VERSION_PATTERN = /^\d+$/;
|
|
13994
|
+
const PAYLOAD_PATTERN = /^[A-Za-z0-9_-]*$/;
|
|
13995
|
+
const BITS_PER_BYTE = 8;
|
|
13996
|
+
function packRequestFlags(flags) {
|
|
13997
|
+
const indexes = /* @__PURE__ */ new Set();
|
|
13998
|
+
const rest = [];
|
|
13999
|
+
for (const flag of flags) {
|
|
14000
|
+
const index = FLAG_INDEX.get(flag);
|
|
14001
|
+
if (index === void 0) rest.push(flag);
|
|
14002
|
+
else indexes.add(index);
|
|
14003
|
+
}
|
|
14004
|
+
if (indexes.size === 0) return {
|
|
14005
|
+
bits: "",
|
|
14006
|
+
rest
|
|
14007
|
+
};
|
|
14008
|
+
const used = Math.floor(Math.max(...indexes) / BITS_PER_BYTE) + 1;
|
|
14009
|
+
const bytes = Uint8Array.from({ length: used }, (_, byte) => {
|
|
14010
|
+
let value = 0;
|
|
14011
|
+
for (let bit = 0; bit < BITS_PER_BYTE; bit += 1) if (indexes.has(byte * BITS_PER_BYTE + bit)) value |= 1 << bit;
|
|
14012
|
+
return value;
|
|
14013
|
+
});
|
|
14014
|
+
return {
|
|
14015
|
+
bits: `${1}:${require_base64url.bytesToBase64Url(bytes)}`,
|
|
14016
|
+
rest
|
|
14017
|
+
};
|
|
14018
|
+
}
|
|
14019
|
+
function unpackRequestFlags(bits) {
|
|
14020
|
+
const separator = bits.indexOf(":");
|
|
14021
|
+
const versionText = bits.slice(0, separator);
|
|
14022
|
+
const payload = bits.slice(separator + 1);
|
|
14023
|
+
if (separator < 1 || !VERSION_PATTERN.test(versionText) || !PAYLOAD_PATTERN.test(payload)) return { failure: "corrupt" };
|
|
14024
|
+
const version = Number(versionText);
|
|
14025
|
+
if (version !== 1) return {
|
|
14026
|
+
failure: "version",
|
|
14027
|
+
version
|
|
14028
|
+
};
|
|
14029
|
+
let bytes;
|
|
14030
|
+
try {
|
|
14031
|
+
bytes = require_base64url.base64UrlToBytes(payload);
|
|
14032
|
+
} catch {
|
|
14033
|
+
return { failure: "corrupt" };
|
|
14034
|
+
}
|
|
14035
|
+
const flags = [];
|
|
14036
|
+
bytes.forEach((byte, offset) => {
|
|
14037
|
+
for (let bit = 0; bit < BITS_PER_BYTE; bit += 1) {
|
|
14038
|
+
if ((byte & 1 << bit) === 0) continue;
|
|
14039
|
+
const index = offset * BITS_PER_BYTE + bit;
|
|
14040
|
+
flags.push(REQUEST_FLAG_REGISTRY[index] ?? `${"bit:"}${index}`);
|
|
14041
|
+
}
|
|
14042
|
+
});
|
|
14043
|
+
return { flags };
|
|
14044
|
+
}
|
|
14045
|
+
|
|
14046
|
+
//#endregion
|
|
14047
|
+
//#region src/verdict-rules/bounds.ts
|
|
14048
|
+
const VERDICT_RULES_BOUNDS = {
|
|
14049
|
+
greatCircleKm: 20040,
|
|
14050
|
+
shadowMemoryMs: 72e5,
|
|
14051
|
+
shadowHistoryMs: 36e5,
|
|
14052
|
+
shadowTimeoutMs: 75,
|
|
14053
|
+
shadowWriteDeadlineMs: 150,
|
|
14054
|
+
shadowClockSkewMs: 5e3,
|
|
14055
|
+
shadowObservations: 12,
|
|
14056
|
+
minutePeriodMs: 6e4,
|
|
14057
|
+
twoJumpPriorAgeMs: 36e5,
|
|
14058
|
+
schedulerAccounts: 64,
|
|
14059
|
+
schedulerReorderToleranceMs: 1e3,
|
|
14060
|
+
schedulerPatternSlackMs: 1e4
|
|
14061
|
+
};
|
|
14062
|
+
|
|
13498
14063
|
//#endregion
|
|
13499
14064
|
//#region src/index.ts
|
|
13500
14065
|
const VERSION = "0.1.0";
|
|
@@ -13572,7 +14137,6 @@ exports.BLOCKED_PATH = require_host_adapter.BLOCKED_PATH;
|
|
|
13572
14137
|
exports.BOT_USER_AGENT_PATTERNS = BOT_USER_AGENT_PATTERNS;
|
|
13573
14138
|
exports.BOUNCER_LOWERCASE_ERRORS = BOUNCER_LOWERCASE_ERRORS;
|
|
13574
14139
|
exports.BOUNCER_UPPERCASE_ERRORS = BOUNCER_UPPERCASE_ERRORS;
|
|
13575
|
-
exports.BROWSER_PATTERNS = require_patterns.BROWSER_PATTERNS;
|
|
13576
14140
|
exports.BULK_ERROR_CODES = BULK_ERROR_CODES;
|
|
13577
14141
|
exports.BaseAuthProviderSchema = BaseAuthProviderSchema;
|
|
13578
14142
|
exports.BaseBulkRequestSchema = BaseBulkRequestSchema;
|
|
@@ -13588,8 +14152,6 @@ exports.BehavioralThresholdSchema = BehavioralThresholdSchema;
|
|
|
13588
14152
|
exports.BindingStatusSchema = BindingStatusSchema;
|
|
13589
14153
|
exports.BlockEventSchema = BlockEventSchema;
|
|
13590
14154
|
exports.BlockReasonSchema = require_schemas$1.BlockReasonSchema;
|
|
13591
|
-
exports.BotPatternSchema = BotPatternSchema;
|
|
13592
|
-
exports.BotTypeSchema = BotTypeSchema;
|
|
13593
14155
|
exports.BouncerConfigSchema = BouncerConfigSchema;
|
|
13594
14156
|
exports.BulkDeletePreviewStatsSchema = BulkDeletePreviewStatsSchema;
|
|
13595
14157
|
exports.BulkDeleteResponseSchema = BulkDeleteResponseSchema;
|
|
@@ -13641,6 +14203,7 @@ exports.ConfigureLinearInstallationV2Schema = ConfigureLinearInstallationV2Schem
|
|
|
13641
14203
|
exports.ConfigureTaskSourceInstallationSchema = ConfigureTaskSourceInstallationSchema;
|
|
13642
14204
|
exports.ConfiguredProviderSchema = ConfiguredProviderSchema;
|
|
13643
14205
|
exports.ConsentAgentMetadataSchema = ConsentAgentMetadataSchema;
|
|
14206
|
+
exports.ConsentAssuranceNotesSchema = ConsentAssuranceNotesSchema;
|
|
13644
14207
|
exports.ConsentBrandingSchema = ConsentBrandingSchema;
|
|
13645
14208
|
exports.ConsentCapabilityGroupSchema = ConsentCapabilityGroupSchema;
|
|
13646
14209
|
exports.ConsentCapabilitySchema = ConsentCapabilitySchema;
|
|
@@ -13680,6 +14243,7 @@ exports.DEPLOY_STEPS = DEPLOY_STEPS;
|
|
|
13680
14243
|
exports.DETECTION_ERRORS = DETECTION_ERRORS;
|
|
13681
14244
|
exports.DETECTION_LIMITS = DETECTION_LIMITS;
|
|
13682
14245
|
exports.DETECTION_REASON_CODES = require_detection_reason_mapping.DETECTION_REASON_CODES;
|
|
14246
|
+
exports.DETECTION_REQUEST_LIMITS = DETECTION_REQUEST_LIMITS;
|
|
13683
14247
|
exports.DashboardStatsRequestSchema = DashboardStatsRequestSchema;
|
|
13684
14248
|
exports.DatabaseDetectionMetadataSchema = DatabaseDetectionMetadataSchema;
|
|
13685
14249
|
exports.DecisionSchema = require_schemas$1.DecisionSchema;
|
|
@@ -13741,6 +14305,7 @@ exports.EnforcementModeSchema = require_schemas$1.EnforcementModeSchema;
|
|
|
13741
14305
|
exports.EngineInfoSchema = EngineInfoSchema;
|
|
13742
14306
|
exports.EnrollWorkloadSchema = EnrollWorkloadSchema;
|
|
13743
14307
|
exports.ErrorResponseSchema = ErrorResponseSchema;
|
|
14308
|
+
exports.EventCountLimitsSettingSchema = EventCountLimitsSettingSchema;
|
|
13744
14309
|
exports.EventTrackingRequestSchema = EventTrackingRequestSchema;
|
|
13745
14310
|
exports.EventTrackingResponseSchema = EventTrackingResponseSchema;
|
|
13746
14311
|
exports.ExportAnalyticsSchema = ExportAnalyticsSchema;
|
|
@@ -13760,7 +14325,6 @@ exports.GrowthConfigurationThresholdsSchema = GrowthConfigurationThresholdsSchem
|
|
|
13760
14325
|
exports.GrowthConfigurationUpdateSchema = GrowthConfigurationUpdateSchema;
|
|
13761
14326
|
exports.GrowthOpportunitiesQuerySchema = GrowthOpportunitiesQuerySchema;
|
|
13762
14327
|
exports.GrowthOpportunityUpdateSchema = GrowthOpportunityUpdateSchema;
|
|
13763
|
-
exports.HEADER_PATTERNS = require_patterns.HEADER_PATTERNS;
|
|
13764
14328
|
exports.HeaderRuleSchema = HeaderRuleSchema;
|
|
13765
14329
|
exports.HeaderRulesSchema = HeaderRulesSchema;
|
|
13766
14330
|
exports.HealthResponseSchema = HealthResponseSchema;
|
|
@@ -13777,8 +14341,11 @@ exports.ImmutableArtifactLocatorSchema = ImmutableArtifactLocatorSchema;
|
|
|
13777
14341
|
exports.ImportIssueV2Schema = ImportIssueV2Schema;
|
|
13778
14342
|
exports.InstructPayloadSchema = require_schemas$1.InstructPayloadSchema;
|
|
13779
14343
|
exports.IntegrationTypeSchema = IntegrationTypeSchema;
|
|
14344
|
+
exports.IpEventCountsSchema = IpEventCountsSchema;
|
|
13780
14345
|
exports.IpRangeCollectionSchema = IpRangeCollectionSchema;
|
|
13781
14346
|
exports.IpRangeRuleSchema = IpRangeRuleSchema;
|
|
14347
|
+
exports.IpReputationSchema = IpReputationSchema;
|
|
14348
|
+
exports.IpRoutingTypeSchema = IpRoutingTypeSchema;
|
|
13782
14349
|
exports.IssueTaskGrantSchema = IssueTaskGrantSchema;
|
|
13783
14350
|
exports.JafarParseError = JafarParseError;
|
|
13784
14351
|
exports.KNOWN_AGENT_PATTERNS = KNOWN_AGENT_PATTERNS;
|
|
@@ -13788,6 +14355,7 @@ exports.KYA_HTTP_ERROR = require_kya_http_error_codes.KYA_HTTP_ERROR;
|
|
|
13788
14355
|
exports.KYA_HTTP_ERROR_STATUS = require_kya_http_error_codes.KYA_HTTP_ERROR_STATUS;
|
|
13789
14356
|
exports.KYA_OS_HANDSHAKE_METHODS = require_verification.KYA_OS_HANDSHAKE_METHODS;
|
|
13790
14357
|
exports.KYA_OS_WIRE_METHODS = require_verification.KYA_OS_WIRE_METHODS;
|
|
14358
|
+
exports.KYA_SIGNED_BODY_MAX_BYTES = require_registered_sid.KYA_SIGNED_BODY_MAX_BYTES;
|
|
13791
14359
|
exports.KeyboardEventSchema = KeyboardEventSchema;
|
|
13792
14360
|
exports.LOWERCASE_ERRORS = LOWERCASE_ERRORS;
|
|
13793
14361
|
exports.LinearActivityGateSchema = LinearActivityGateSchema;
|
|
@@ -13823,7 +14391,6 @@ exports.MAX_TASK_GRANT_DEPTH = MAX_TASK_GRANT_DEPTH;
|
|
|
13823
14391
|
exports.MCPI_HASHED_USER_ID_PREFIX = MCPI_HASHED_USER_ID_PREFIX;
|
|
13824
14392
|
exports.MCPI_ORG_DID_HOST = MCPI_ORG_DID_HOST;
|
|
13825
14393
|
exports.MCP_CLIENT_DID_HOST = MCP_CLIENT_DID_HOST;
|
|
13826
|
-
exports.MOBILE_PATTERNS = require_patterns.MOBILE_PATTERNS;
|
|
13827
14394
|
exports.ManagementAccessTokenSchema = ManagementAccessTokenSchema;
|
|
13828
14395
|
exports.ManagementAuthorizeQuerySchema = ManagementAuthorizeQuerySchema;
|
|
13829
14396
|
exports.ManagementConsentContextSchema = ManagementConsentContextSchema;
|
|
@@ -13878,7 +14445,6 @@ exports.OAuthProviderMetadataSchema = OAuthProviderMetadataSchema;
|
|
|
13878
14445
|
exports.OAuthProviderTypeSchema = OAuthProviderTypeSchema;
|
|
13879
14446
|
exports.OAuthProvidersMapSchema = OAuthProvidersMapSchema;
|
|
13880
14447
|
exports.OAuthTokensResponseSchema = OAuthTokensResponseSchema;
|
|
13881
|
-
exports.OS_PATTERNS = require_patterns.OS_PATTERNS;
|
|
13882
14448
|
exports.OrganizationErrorCode = OrganizationErrorCode;
|
|
13883
14449
|
exports.OrganizationIdSchema = OrganizationIdSchema;
|
|
13884
14450
|
exports.OrganizationRoleSchema = OrganizationRoleSchema;
|
|
@@ -13912,6 +14478,7 @@ exports.PixelsBulkDeleteItemSchema = PixelsBulkDeleteItemSchema;
|
|
|
13912
14478
|
exports.PixelsBulkRequestSchema = PixelsBulkRequestSchema;
|
|
13913
14479
|
exports.PixelsBulkUpdateItemSchema = PixelsBulkUpdateItemSchema;
|
|
13914
14480
|
exports.PixelsQuerySchema = PixelsQuerySchema;
|
|
14481
|
+
exports.PolicyAuthError = require_policy_fetcher.PolicyAuthError;
|
|
13915
14482
|
exports.PolicyConditionSchema = require_schemas$1.PolicyConditionSchema;
|
|
13916
14483
|
exports.PolicyConfigSchema = require_schemas$1.PolicyConfigSchema;
|
|
13917
14484
|
exports.PolicyFetcher = require_policy_fetcher.PolicyFetcher;
|
|
@@ -13949,6 +14516,12 @@ exports.READABLE_TEXT_MESSAGE = READABLE_TEXT_MESSAGE;
|
|
|
13949
14516
|
exports.REGISTERED_SID_MAX_LENGTH = require_registered_sid.REGISTERED_SID_MAX_LENGTH;
|
|
13950
14517
|
exports.REPORT_AI_AGENT_NAMES = REPORT_AI_AGENT_NAMES;
|
|
13951
14518
|
exports.REPORT_AI_CRAWLER_NAMES = REPORT_AI_CRAWLER_NAMES;
|
|
14519
|
+
exports.REQUEST_FLAG_BITS_FIELD = REQUEST_FLAG_BITS_FIELD;
|
|
14520
|
+
exports.REQUEST_FLAG_BITS_VERSION = REQUEST_FLAG_BITS_VERSION;
|
|
14521
|
+
exports.REQUEST_FLAG_KINDS = REQUEST_FLAG_KINDS;
|
|
14522
|
+
exports.REQUEST_FLAG_REGISTRY = REQUEST_FLAG_REGISTRY;
|
|
14523
|
+
exports.REQUEST_LABELLING_FLAGS = REQUEST_LABELLING_FLAGS;
|
|
14524
|
+
exports.REQUEST_LABELLING_FLAG_KINDS = REQUEST_LABELLING_FLAG_KINDS;
|
|
13952
14525
|
exports.RESOURCE_ERRORS = RESOURCE_ERRORS;
|
|
13953
14526
|
exports.RULESET_HASH_REGEX = require_ruleset_hash.RULESET_HASH_REGEX;
|
|
13954
14527
|
exports.RULE_CATEGORIES = RULE_CATEGORIES;
|
|
@@ -13970,8 +14543,12 @@ exports.ReportedAgentSchema = ReportedAgentSchema;
|
|
|
13970
14543
|
exports.ReportedDelegationSchema = ReportedDelegationSchema;
|
|
13971
14544
|
exports.ReportedIdentitySchema = ReportedIdentitySchema;
|
|
13972
14545
|
exports.ReportedPrincipalSchema = ReportedPrincipalSchema;
|
|
14546
|
+
exports.ReportedProxyTypeSchema = ReportedProxyTypeSchema;
|
|
13973
14547
|
exports.RepositoryIdentitySchema = RepositoryIdentitySchema;
|
|
13974
14548
|
exports.RequestContextSchema = RequestContextSchema;
|
|
14549
|
+
exports.RequestFlagLabelMatrixEntrySchema = RequestFlagLabelMatrixEntrySchema;
|
|
14550
|
+
exports.RequestFlagLabelMatrixSchema = RequestFlagLabelMatrixSchema;
|
|
14551
|
+
exports.RequestFlagLabelMatrixWriteSchema = RequestFlagLabelMatrixWriteSchema;
|
|
13975
14552
|
exports.RevokeModelCredentialSchema = RevokeModelCredentialSchema;
|
|
13976
14553
|
exports.RevokeProvisionQuerySchema = RevokeProvisionQuerySchema;
|
|
13977
14554
|
exports.RevokeProvisionResponseSchema = RevokeProvisionResponseSchema;
|
|
@@ -13992,11 +14569,19 @@ exports.SECURITY_LIMITS = SECURITY_LIMITS;
|
|
|
13992
14569
|
exports.SERVICE_TRAFFIC_KEYS = SERVICE_TRAFFIC_KEYS;
|
|
13993
14570
|
exports.SESSION_ERRORS = SESSION_ERRORS;
|
|
13994
14571
|
exports.SESSION_LIMITS = SESSION_LIMITS;
|
|
14572
|
+
exports.SESSION_VELOCITY_BUCKET_MS = SESSION_VELOCITY_BUCKET_MS;
|
|
14573
|
+
exports.SESSION_VELOCITY_BUCKET_SECONDS = SESSION_VELOCITY_BUCKET_SECONDS;
|
|
14574
|
+
exports.SESSION_VELOCITY_EXPIRY_SKEW_SECONDS = SESSION_VELOCITY_EXPIRY_SKEW_SECONDS;
|
|
14575
|
+
exports.SESSION_VELOCITY_PARTITIONS = SESSION_VELOCITY_PARTITIONS;
|
|
14576
|
+
exports.SESSION_VELOCITY_SKETCH_COLUMNS = SESSION_VELOCITY_SKETCH_COLUMNS;
|
|
14577
|
+
exports.SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS = SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS;
|
|
14578
|
+
exports.SESSION_VELOCITY_SKETCH_COUNTER_MAX = SESSION_VELOCITY_SKETCH_COUNTER_MAX;
|
|
14579
|
+
exports.SESSION_VELOCITY_SKETCH_ROWS = SESSION_VELOCITY_SKETCH_ROWS;
|
|
14580
|
+
exports.SESSION_VELOCITY_WRITE_COUNTER_INDEX = SESSION_VELOCITY_WRITE_COUNTER_INDEX;
|
|
13995
14581
|
exports.SHADOW_NOISY_OR_CONFIDENCE_KEY = SHADOW_NOISY_OR_CONFIDENCE_KEY;
|
|
13996
14582
|
exports.SID_ATTRIBUTABLE_RESULT = require_registered_sid.SID_ATTRIBUTABLE_RESULT;
|
|
13997
14583
|
exports.SLUG_REGEX = SLUG_REGEX;
|
|
13998
14584
|
exports.SUSPICIOUS_HEADERS = SUSPICIOUS_HEADERS;
|
|
13999
|
-
exports.SUSPICIOUS_PATTERNS = require_patterns.SUSPICIOUS_PATTERNS;
|
|
14000
14585
|
exports.ScopeSchema = ScopeSchema;
|
|
14001
14586
|
exports.ScrollEventSchema = ScrollEventSchema;
|
|
14002
14587
|
exports.SdkSessionDataSchema = SdkSessionDataSchema;
|
|
@@ -14022,11 +14607,11 @@ exports.StatsUpdateEventSchema = StatsUpdateEventSchema;
|
|
|
14022
14607
|
exports.SuggestedActionSchema = require_schemas$1.SuggestedActionSchema;
|
|
14023
14608
|
exports.TASK_ADMISSION_PROTOCOLS = TASK_ADMISSION_PROTOCOLS;
|
|
14024
14609
|
exports.TASK_ADMISSION_RESEND = TASK_ADMISSION_RESEND;
|
|
14610
|
+
exports.TIMEZONE_COUNTRY_MAP = require_timezone_country.TIMEZONE_COUNTRY_MAP;
|
|
14025
14611
|
exports.TIME_WINDOWS = TIME_WINDOWS;
|
|
14026
14612
|
exports.TLSFingerprintSchema = TLSFingerprintSchema;
|
|
14027
14613
|
exports.TRADITIONAL_BOT_PATTERNS = TRADITIONAL_BOT_PATTERNS;
|
|
14028
14614
|
exports.TRAFFIC_TAXONOMY_BUCKETS = TRAFFIC_TAXONOMY_BUCKETS;
|
|
14029
|
-
exports.TRUSTED_BOTS = TRUSTED_BOTS;
|
|
14030
14615
|
exports.TaskAdmissionProtocolSchema = TaskAdmissionProtocolSchema;
|
|
14031
14616
|
exports.TaskGrantAdmissionRequestSchema = TaskGrantAdmissionRequestSchema;
|
|
14032
14617
|
exports.TaskGrantAdmissionSchema = TaskGrantAdmissionSchema;
|
|
@@ -14083,9 +14668,9 @@ exports.TrackDependencyV2Schema = TrackDependencyV2Schema;
|
|
|
14083
14668
|
exports.TrackingReadinessReasonCodeSchema = TrackingReadinessReasonCodeSchema;
|
|
14084
14669
|
exports.TrackingReadinessSchema = TrackingReadinessSchema;
|
|
14085
14670
|
exports.UNCALIBRATED_NOISY_OR_PRIOR = UNCALIBRATED_NOISY_OR_PRIOR;
|
|
14671
|
+
exports.UNKNOWN_FLAG_BIT_PREFIX = UNKNOWN_FLAG_BIT_PREFIX;
|
|
14086
14672
|
exports.UNNAMED_AGENT_LABEL = UNNAMED_AGENT_LABEL;
|
|
14087
14673
|
exports.UPDATE_FREQUENCIES = UPDATE_FREQUENCIES;
|
|
14088
|
-
exports.USER_AGENT_PATTERNS = require_patterns.USER_AGENT_PATTERNS;
|
|
14089
14674
|
exports.UUID_PATTERN = require_patterns.UUID_PATTERN;
|
|
14090
14675
|
exports.UpdateApiKeySchema = UpdateApiKeySchema;
|
|
14091
14676
|
exports.UpdateBouncerConfigSchema = UpdateBouncerConfigSchema;
|
|
@@ -14101,7 +14686,10 @@ exports.VALIDATION_ERRORS = VALIDATION_ERRORS;
|
|
|
14101
14686
|
exports.VALIDATION_MODES = VALIDATION_MODES;
|
|
14102
14687
|
exports.VALIDATION_PATTERNS = require_patterns.VALIDATION_PATTERNS;
|
|
14103
14688
|
exports.VAULT_ERRORS = VAULT_ERRORS;
|
|
14689
|
+
exports.VELOCITY_ESCALATION_FLOORS = VELOCITY_ESCALATION_FLOORS;
|
|
14104
14690
|
exports.VERDICT_COOKIE_NAME = require_host_adapter.VERDICT_COOKIE_NAME;
|
|
14691
|
+
exports.VERDICT_DICTIONARIES = VERDICT_DICTIONARIES;
|
|
14692
|
+
exports.VERDICT_RULES_BOUNDS = VERDICT_RULES_BOUNDS;
|
|
14105
14693
|
exports.VERSION = VERSION;
|
|
14106
14694
|
exports.VerdictEvidenceSchema = VerdictEvidenceSchema;
|
|
14107
14695
|
exports.VerificationRequestSchema = VerificationRequestSchema;
|
|
@@ -14140,9 +14728,12 @@ exports.buildKnownPatternLookup = buildKnownPatternLookup;
|
|
|
14140
14728
|
exports.buildVerdictEvidence = buildVerdictEvidence;
|
|
14141
14729
|
exports.calculateDeployProgress = calculateDeployProgress;
|
|
14142
14730
|
exports.cedarQuotedValueRegExp = require_step_up.cedarQuotedValueRegExp;
|
|
14731
|
+
exports.checkTimezoneCountryContradiction = require_timezone_country.checkTimezoneCountryContradiction;
|
|
14143
14732
|
exports.classifyAgentTaxonomy = classifyAgentTaxonomy;
|
|
14144
14733
|
exports.classifyResponseShape = require_host_adapter.classifyResponseShape;
|
|
14145
14734
|
exports.claudeRuntimeLabel = claudeRuntimeLabel;
|
|
14735
|
+
exports.compareForwardedChainShadow = require_client_ip.compareForwardedChainShadow;
|
|
14736
|
+
exports.compileEmbeddedVerdictRules = compileEmbeddedVerdictRules;
|
|
14146
14737
|
exports.compressIpv6 = require_client_ip.compressIpv6;
|
|
14147
14738
|
exports.computeEntropyConfidence = computeEntropyConfidence;
|
|
14148
14739
|
exports.contractDigest = contractDigest;
|
|
@@ -14164,6 +14755,8 @@ exports.deriveMcpiUserDid = deriveMcpiUserDid;
|
|
|
14164
14755
|
exports.deriveVerdict = require_host_adapter.deriveVerdict;
|
|
14165
14756
|
exports.detectionClassToEnum = require_host_adapter.detectionClassToEnum;
|
|
14166
14757
|
exports.discoveredToolSchema = discoveredToolSchema;
|
|
14758
|
+
exports.embeddedVerdictRules = embeddedVerdictRules;
|
|
14759
|
+
exports.embeddedVerdictRulesSha256 = embeddedVerdictRulesSha256;
|
|
14167
14760
|
exports.encodeDidKeyEd25519 = encodeDidKeyEd25519;
|
|
14168
14761
|
exports.encodeEd25519PublicKeyMultibase = encodeEd25519PublicKeyMultibase;
|
|
14169
14762
|
exports.encodeVerdictCookie = require_host_adapter.encodeVerdictCookie;
|
|
@@ -14187,7 +14780,6 @@ exports.gatewayInternalToolsListSchema = gatewayInternalToolsListSchema;
|
|
|
14187
14780
|
exports.gatewayToolCallSchema = gatewayToolCallSchema;
|
|
14188
14781
|
exports.generateDelegationSid = require_host_adapter.generateDelegationSid;
|
|
14189
14782
|
exports.generateTestId = generateTestId;
|
|
14190
|
-
exports.getBotType = getBotType;
|
|
14191
14783
|
exports.getCategoryBadgeVariant = getCategoryBadgeVariant;
|
|
14192
14784
|
exports.getCategoryColor = getCategoryColor;
|
|
14193
14785
|
exports.getConfidenceLevel = getConfidenceLevel;
|
|
@@ -14220,18 +14812,19 @@ exports.isLegitimateCategory = isLegitimateCategory;
|
|
|
14220
14812
|
exports.isLimitExceeded = isLimitExceeded;
|
|
14221
14813
|
exports.isMcpiOrgKeyId = isMcpiOrgKeyId;
|
|
14222
14814
|
exports.isNonNavigablePolicyId = require_step_up.isNonNavigablePolicyId;
|
|
14815
|
+
exports.isPolicyAuthError = require_policy_fetcher.isPolicyAuthError;
|
|
14223
14816
|
exports.isPolicyUnavailableError = require_policy_fetcher.isPolicyUnavailableError;
|
|
14224
14817
|
exports.isPrivateOrReservedHost = isPrivateOrReservedHost;
|
|
14225
|
-
exports.isTraditionalBot = isTraditionalBot;
|
|
14226
14818
|
exports.isUnderAuthDomain = require_default_sign_in_host.isUnderAuthDomain;
|
|
14227
14819
|
exports.isValidAuthorizationHost = isValidAuthorizationHost;
|
|
14228
14820
|
exports.isValidMcpiOrgSlug = isValidMcpiOrgSlug;
|
|
14821
|
+
exports.isVerdictDictionaryId = isVerdictDictionaryId;
|
|
14229
14822
|
exports.lintMissingBaselinePermit = lintMissingBaselinePermit;
|
|
14230
14823
|
exports.lintUnnarrowedDenyRules = lintUnnarrowedDenyRules;
|
|
14231
14824
|
exports.loadRulesAsync = loadRulesAsync;
|
|
14232
14825
|
exports.mapDetectionToReasonCodes = require_detection_reason_mapping.mapDetectionToReasonCodes;
|
|
14233
14826
|
exports.mapLegacyAuthType = mapLegacyAuthType;
|
|
14234
|
-
exports.mapProxyAssertions = mapProxyAssertions;
|
|
14827
|
+
exports.mapProxyAssertions = require_proxy_assertion_mapping.mapProxyAssertions;
|
|
14235
14828
|
exports.mapToLegacyAuthType = mapToLegacyAuthType;
|
|
14236
14829
|
exports.matchPath = require_step_up.matchPath;
|
|
14237
14830
|
exports.mcpiOrgKeyFragment = mcpiOrgKeyFragment;
|
|
@@ -14252,6 +14845,7 @@ exports.normalizePostureReportPath = normalizePostureReportPath;
|
|
|
14252
14845
|
exports.normalizeStoredAllowedDomain = normalizeStoredAllowedDomain;
|
|
14253
14846
|
exports.normalizeWireMethod = require_verification.normalizeWireMethod;
|
|
14254
14847
|
exports.oauthClientSchema = oauthClientSchema;
|
|
14848
|
+
exports.packRequestFlags = packRequestFlags;
|
|
14255
14849
|
exports.parseAcceptedArtifactRevision = parseAcceptedArtifactRevision;
|
|
14256
14850
|
exports.parseCedarStatements = require_step_up.parseCedarStatements;
|
|
14257
14851
|
exports.parseClaimVerification = parseClaimVerification;
|
|
@@ -14266,20 +14860,28 @@ exports.pathHasUnnarrowedDenyRuleFor = require_step_up.pathHasUnnarrowedDenyRule
|
|
|
14266
14860
|
exports.pathLiteralsInBlock = require_step_up.pathLiteralsInBlock;
|
|
14267
14861
|
exports.permitDelegationVerdict = permitDelegationVerdict;
|
|
14268
14862
|
exports.projectResetRequestSchema = projectResetRequestSchema;
|
|
14863
|
+
exports.readBodyBounded = require_registered_sid.readBodyBounded;
|
|
14269
14864
|
exports.readPostureReportPathsSetting = readPostureReportPathsSetting;
|
|
14270
14865
|
exports.readableText = readableText;
|
|
14866
|
+
exports.reasonCodeForSignalSource = require_detection_reason_mapping.reasonCodeForSignalSource;
|
|
14271
14867
|
exports.reconstructConfidenceFromEvidence = reconstructConfidenceFromEvidence;
|
|
14272
14868
|
exports.refineClaudeDisplayLabel = refineClaudeDisplayLabel;
|
|
14273
14869
|
exports.refineSessionGrainClaudeLabel = refineSessionGrainClaudeLabel;
|
|
14870
|
+
exports.relayedRequestTarget = require_registered_sid.relayedRequestTarget;
|
|
14871
|
+
exports.reportedProxyType = reportedProxyType;
|
|
14274
14872
|
exports.requestCarriesDelegationProof = require_registered_sid.requestCarriesDelegationProof;
|
|
14873
|
+
exports.requestDeclaresBody = require_registered_sid.requestDeclaresBody;
|
|
14275
14874
|
exports.requestPresentedCredential = require_registered_sid.requestPresentedCredential;
|
|
14875
|
+
exports.requestPresentsKyaSignature = require_registered_sid.requestPresentsKyaSignature;
|
|
14276
14876
|
exports.requiredScopesForRequest = require_step_up.requiredScopesForRequest;
|
|
14277
14877
|
exports.resetPasswordSchema = resetPasswordSchema;
|
|
14278
14878
|
exports.resolveAuthorizationHost = resolveAuthorizationHost;
|
|
14279
14879
|
exports.resolveBotSignals = require_host_adapter.resolveBotSignals;
|
|
14280
14880
|
exports.resolveChallengeContext = require_host_adapter.resolveChallengeContext;
|
|
14281
14881
|
exports.resolveClientIp = require_client_ip.resolveClientIp;
|
|
14882
|
+
exports.resolveForwardedChainShadow = require_client_ip.resolveForwardedChainShadow;
|
|
14282
14883
|
exports.resolveObservedClientAddress = require_client_ip.resolveObservedClientAddress;
|
|
14884
|
+
exports.resolveTimezoneCountry = require_timezone_country.resolveTimezoneCountry;
|
|
14283
14885
|
exports.resolveTrustedDelegationRoots = resolveTrustedDelegationRoots;
|
|
14284
14886
|
exports.riskScoreColumnValue = riskScoreColumnValue;
|
|
14285
14887
|
exports.riskScoreFromMetadata = riskScoreFromMetadata;
|
|
@@ -14288,6 +14890,11 @@ exports.safeParsePolicyConfig = require_schemas$1.safeParsePolicyConfig;
|
|
|
14288
14890
|
exports.safeUrl = safeUrl;
|
|
14289
14891
|
exports.selectBodyReadable200 = require_host_adapter.selectBodyReadable200;
|
|
14290
14892
|
exports.serveBodyReadable200 = require_host_adapter.serveBodyReadable200;
|
|
14893
|
+
exports.sessionVelocityBucket = sessionVelocityBucket;
|
|
14894
|
+
exports.sessionVelocityBucketStart = sessionVelocityBucketStart;
|
|
14895
|
+
exports.sessionVelocityExpirySeconds = sessionVelocityExpirySeconds;
|
|
14896
|
+
exports.sessionVelocityPartition = sessionVelocityPartition;
|
|
14897
|
+
exports.sessionVelocitySketchCells = sessionVelocitySketchCells;
|
|
14291
14898
|
exports.splitCedarBlocks = require_step_up.splitCedarBlocks;
|
|
14292
14899
|
exports.statementApplies = require_step_up.statementApplies;
|
|
14293
14900
|
exports.statementId = require_step_up.statementId;
|
|
@@ -14303,6 +14910,7 @@ exports.toCoarseReasonKind = toCoarseReasonKind;
|
|
|
14303
14910
|
exports.toPercent = toPercent;
|
|
14304
14911
|
exports.toStoredCorrelationId = toStoredCorrelationId;
|
|
14305
14912
|
exports.unescapeCedarString = require_step_up.unescapeCedarString;
|
|
14913
|
+
exports.unpackRequestFlags = unpackRequestFlags;
|
|
14306
14914
|
exports.updateStepsState = updateStepsState;
|
|
14307
14915
|
exports.upstreamDiscoveryErrorSchema = upstreamDiscoveryErrorSchema;
|
|
14308
14916
|
exports.upstreamServerInputSchema = upstreamServerInputSchema;
|
|
@@ -14318,6 +14926,7 @@ exports.vaultResolveErrorSchema = vaultResolveErrorSchema;
|
|
|
14318
14926
|
exports.vaultResolveMetaSchema = vaultResolveMetaSchema;
|
|
14319
14927
|
exports.vaultResolveResponseSchema = vaultResolveResponseSchema;
|
|
14320
14928
|
exports.vaultResolveSuccessSchema = vaultResolveSuccessSchema;
|
|
14929
|
+
exports.verdictShardIndexFor = verdictShardIndexFor;
|
|
14321
14930
|
exports.verifyContractRecordIdentity = verifyContractRecordIdentity;
|
|
14322
14931
|
exports.withNoEvidenceExclusion = require_step_up.withNoEvidenceExclusion;
|
|
14323
14932
|
exports.withoutTrailingDots = require_default_sign_in_host.withoutTrailingDots;
|