@kya-os/checkpoint-shared 1.0.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 +62 -0
- package/README.md +112 -0
- package/dist/browser.d.mts +318 -0
- package/dist/browser.d.ts +318 -0
- package/dist/browser.js +2 -0
- package/dist/browser.js.map +1 -0
- package/dist/browser.mjs +2 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/index.d.mts +35796 -0
- package/dist/index.d.ts +35796 -0
- package/dist/index.js +14416 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13766 -0
- package/dist/index.mjs.map +1 -0
- package/dist/rules.json +371 -0
- package/dist/test-fixtures/index.d.mts +89 -0
- package/dist/test-fixtures/index.d.ts +89 -0
- package/dist/test-fixtures/index.js +117 -0
- package/dist/test-fixtures/index.js.map +1 -0
- package/dist/test-fixtures/index.mjs +100 -0
- package/dist/test-fixtures/index.mjs.map +1 -0
- package/package.json +99 -0
- package/src/data/compiled/merged-rules.json +890 -0
- package/src/data/default-rules.json +371 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"lastUpdated": "2025-01-10T00:00:00Z",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"author": "AgentShield Team",
|
|
6
|
+
"description": "Default detection rules for AI agents and bots",
|
|
7
|
+
"minVersion": "0.1.0",
|
|
8
|
+
"source": "https://github.com/kya-os/agent-shield"
|
|
9
|
+
},
|
|
10
|
+
"rules": {
|
|
11
|
+
"userAgents": {
|
|
12
|
+
"openai_chatgpt": {
|
|
13
|
+
"patterns": [
|
|
14
|
+
"ChatGPT-User",
|
|
15
|
+
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User"
|
|
16
|
+
],
|
|
17
|
+
"confidence": 0.95,
|
|
18
|
+
"description": "ChatGPT AI assistant with web browsing capability"
|
|
19
|
+
},
|
|
20
|
+
"openai_crawler": {
|
|
21
|
+
"patterns": [
|
|
22
|
+
"GPTBot",
|
|
23
|
+
"Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)"
|
|
24
|
+
],
|
|
25
|
+
"confidence": 0.95,
|
|
26
|
+
"description": "OpenAI's web crawler for training data (not ChatGPT assistant)"
|
|
27
|
+
},
|
|
28
|
+
"anthropic_claude": {
|
|
29
|
+
"patterns": [
|
|
30
|
+
"Claude-Web",
|
|
31
|
+
"Claude-User",
|
|
32
|
+
"anthropic-ai",
|
|
33
|
+
"claude-web",
|
|
34
|
+
"claude-user"
|
|
35
|
+
],
|
|
36
|
+
"confidence": 0.95,
|
|
37
|
+
"description": "Anthropic Claude AI assistant (not crawlers)"
|
|
38
|
+
},
|
|
39
|
+
"anthropic_crawler": {
|
|
40
|
+
"patterns": [
|
|
41
|
+
"ClaudeBot"
|
|
42
|
+
],
|
|
43
|
+
"confidence": 0.95,
|
|
44
|
+
"description": "Anthropic's web crawler for training data (not Claude AI assistant)"
|
|
45
|
+
},
|
|
46
|
+
"perplexity_bot": {
|
|
47
|
+
"patterns": [
|
|
48
|
+
"PerplexityBot",
|
|
49
|
+
"Perplexica",
|
|
50
|
+
"Perplexity",
|
|
51
|
+
"Mozilla/5.0.*Chrome/138.*headless"
|
|
52
|
+
],
|
|
53
|
+
"confidence": 0.95,
|
|
54
|
+
"description": "Perplexity AI search bot",
|
|
55
|
+
"advanced_detection": "perplexity-rules.yaml"
|
|
56
|
+
},
|
|
57
|
+
"google_ai": {
|
|
58
|
+
"patterns": [
|
|
59
|
+
"Google-Extended",
|
|
60
|
+
"Bard",
|
|
61
|
+
"Google-InspectionTool"
|
|
62
|
+
],
|
|
63
|
+
"confidence": 0.9,
|
|
64
|
+
"description": "Google AI and Bard bots"
|
|
65
|
+
},
|
|
66
|
+
"microsoft_ai": {
|
|
67
|
+
"patterns": [
|
|
68
|
+
"BingPreview/.*ChatGPT",
|
|
69
|
+
"Copilot"
|
|
70
|
+
],
|
|
71
|
+
"confidence": 0.9,
|
|
72
|
+
"description": "Microsoft Copilot and Bing AI"
|
|
73
|
+
},
|
|
74
|
+
"meta_crawler": {
|
|
75
|
+
"patterns": [
|
|
76
|
+
"Meta-ExternalAgent",
|
|
77
|
+
"facebookexternalhit"
|
|
78
|
+
],
|
|
79
|
+
"confidence": 0.9,
|
|
80
|
+
"description": "Meta/Facebook web crawlers (not Meta AI assistant)"
|
|
81
|
+
},
|
|
82
|
+
"cohere_bot": {
|
|
83
|
+
"patterns": [
|
|
84
|
+
"CohereBot",
|
|
85
|
+
"cohere-ai"
|
|
86
|
+
],
|
|
87
|
+
"confidence": 0.85,
|
|
88
|
+
"description": "Cohere AI bot"
|
|
89
|
+
},
|
|
90
|
+
"huggingface_bot": {
|
|
91
|
+
"patterns": [
|
|
92
|
+
"HuggingFace",
|
|
93
|
+
"transformers"
|
|
94
|
+
],
|
|
95
|
+
"confidence": 0.8,
|
|
96
|
+
"description": "HuggingFace model agents"
|
|
97
|
+
},
|
|
98
|
+
"generic_bot": {
|
|
99
|
+
"patterns": [
|
|
100
|
+
"bot",
|
|
101
|
+
"Bot",
|
|
102
|
+
"crawler",
|
|
103
|
+
"Crawler",
|
|
104
|
+
"spider",
|
|
105
|
+
"Spider",
|
|
106
|
+
"scraper",
|
|
107
|
+
"Scraper",
|
|
108
|
+
"agent",
|
|
109
|
+
"Agent"
|
|
110
|
+
],
|
|
111
|
+
"confidence": 0.7,
|
|
112
|
+
"description": "Generic bot patterns"
|
|
113
|
+
},
|
|
114
|
+
"dev_tools": {
|
|
115
|
+
"patterns": [
|
|
116
|
+
"PostmanRuntime",
|
|
117
|
+
"insomnia",
|
|
118
|
+
"curl",
|
|
119
|
+
"Wget",
|
|
120
|
+
"HTTPie"
|
|
121
|
+
],
|
|
122
|
+
"confidence": 0.6,
|
|
123
|
+
"description": "Development and testing tools"
|
|
124
|
+
},
|
|
125
|
+
"automation_tools": {
|
|
126
|
+
"patterns": [
|
|
127
|
+
"Puppeteer",
|
|
128
|
+
"HeadlessChrome",
|
|
129
|
+
"Playwright",
|
|
130
|
+
"selenium",
|
|
131
|
+
"webdriver",
|
|
132
|
+
"Scrapy"
|
|
133
|
+
],
|
|
134
|
+
"confidence": 0.8,
|
|
135
|
+
"description": "Browser automation tools"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"ipRanges": {
|
|
139
|
+
"providers": {
|
|
140
|
+
"openai": {
|
|
141
|
+
"ranges": [
|
|
142
|
+
"20.14.0.0/16",
|
|
143
|
+
"52.230.0.0/15",
|
|
144
|
+
"20.10.0.0/16",
|
|
145
|
+
"52.156.0.0/14"
|
|
146
|
+
],
|
|
147
|
+
"confidence": 0.9,
|
|
148
|
+
"provider": "OpenAI",
|
|
149
|
+
"lastUpdated": "2025-01-10"
|
|
150
|
+
},
|
|
151
|
+
"anthropic": {
|
|
152
|
+
"ranges": [
|
|
153
|
+
"35.160.0.0/13",
|
|
154
|
+
"44.230.0.0/16",
|
|
155
|
+
"54.190.0.0/16"
|
|
156
|
+
],
|
|
157
|
+
"confidence": 0.9,
|
|
158
|
+
"provider": "Anthropic",
|
|
159
|
+
"lastUpdated": "2025-01-10"
|
|
160
|
+
},
|
|
161
|
+
"aws": {
|
|
162
|
+
"ranges": [
|
|
163
|
+
"52.0.0.0/8",
|
|
164
|
+
"54.0.0.0/8",
|
|
165
|
+
"18.0.0.0/8",
|
|
166
|
+
"35.0.0.0/8"
|
|
167
|
+
],
|
|
168
|
+
"confidence": 0.5,
|
|
169
|
+
"provider": "AWS",
|
|
170
|
+
"lastUpdated": "2025-01-10"
|
|
171
|
+
},
|
|
172
|
+
"gcp": {
|
|
173
|
+
"ranges": [
|
|
174
|
+
"35.190.0.0/16",
|
|
175
|
+
"35.240.0.0/16",
|
|
176
|
+
"34.0.0.0/8"
|
|
177
|
+
],
|
|
178
|
+
"confidence": 0.5,
|
|
179
|
+
"provider": "Google Cloud",
|
|
180
|
+
"lastUpdated": "2025-01-10"
|
|
181
|
+
},
|
|
182
|
+
"azure": {
|
|
183
|
+
"ranges": [
|
|
184
|
+
"40.0.0.0/8",
|
|
185
|
+
"20.0.0.0/8",
|
|
186
|
+
"13.0.0.0/8"
|
|
187
|
+
],
|
|
188
|
+
"confidence": 0.5,
|
|
189
|
+
"provider": "Microsoft Azure",
|
|
190
|
+
"lastUpdated": "2025-01-10"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"updateUrl": "https://kya.vouched.id/ip-ranges/latest.json",
|
|
194
|
+
"updateFrequency": "daily",
|
|
195
|
+
"cacheDuration": 86400
|
|
196
|
+
},
|
|
197
|
+
"signatures": {
|
|
198
|
+
"chatgpt_browser": {
|
|
199
|
+
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0sOY3FvQRy...\n-----END PUBLIC KEY-----\n",
|
|
200
|
+
"algorithm": "RS256",
|
|
201
|
+
"headerName": "X-ChatGPT-Signature",
|
|
202
|
+
"confidence": 1,
|
|
203
|
+
"issuer": "OpenAI"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"behavioral": {
|
|
207
|
+
"thresholds": {
|
|
208
|
+
"minTimeOnPage": 100,
|
|
209
|
+
"maxRequestsPerSecond": 10,
|
|
210
|
+
"minMouseMovements": 0,
|
|
211
|
+
"minKeyboardEvents": 0,
|
|
212
|
+
"maxScrollVariance": 0,
|
|
213
|
+
"timeWindow": 5000
|
|
214
|
+
},
|
|
215
|
+
"patterns": [
|
|
216
|
+
{
|
|
217
|
+
"name": "rapid_sequential_requests",
|
|
218
|
+
"type": "rapid_requests",
|
|
219
|
+
"config": {
|
|
220
|
+
"threshold": 5,
|
|
221
|
+
"timeWindow": 1000
|
|
222
|
+
},
|
|
223
|
+
"confidenceModifier": 0.3
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "no_mouse_movement",
|
|
227
|
+
"type": "no_interaction",
|
|
228
|
+
"config": {
|
|
229
|
+
"afterPageLoad": 5000
|
|
230
|
+
},
|
|
231
|
+
"confidenceModifier": 0.2
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "perfect_scrolling",
|
|
235
|
+
"type": "perfect_scrolling",
|
|
236
|
+
"config": {
|
|
237
|
+
"variance": 0
|
|
238
|
+
},
|
|
239
|
+
"confidenceModifier": 0.2
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "sequential_pagination",
|
|
243
|
+
"type": "sequential_access",
|
|
244
|
+
"config": {
|
|
245
|
+
"pattern": "page|offset|cursor|id"
|
|
246
|
+
},
|
|
247
|
+
"confidenceModifier": 0.3
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"confidence": 0.8
|
|
251
|
+
},
|
|
252
|
+
"headers": {
|
|
253
|
+
"suspicious": [
|
|
254
|
+
{
|
|
255
|
+
"name": "signature-agent",
|
|
256
|
+
"confidence": 0.95,
|
|
257
|
+
"provider": "ChatGPT"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "Signature-Agent",
|
|
261
|
+
"confidence": 0.95,
|
|
262
|
+
"provider": "ChatGPT"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "signature",
|
|
266
|
+
"confidence": 0.95,
|
|
267
|
+
"provider": "ChatGPT"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "Signature",
|
|
271
|
+
"confidence": 0.95,
|
|
272
|
+
"provider": "ChatGPT"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "signature-input",
|
|
276
|
+
"confidence": 0.95,
|
|
277
|
+
"provider": "ChatGPT"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "Signature-Input",
|
|
281
|
+
"confidence": 0.95,
|
|
282
|
+
"provider": "ChatGPT"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "X-OpenAI-Assistant",
|
|
286
|
+
"confidence": 0.95
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "openai-conversation-id",
|
|
290
|
+
"confidence": 0.85
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "X-Anthropic-Client",
|
|
294
|
+
"confidence": 0.95
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "anthropic-client-id",
|
|
298
|
+
"confidence": 0.9
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "X-AI-Agent",
|
|
302
|
+
"confidence": 0.9
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "X-Bot-Token",
|
|
306
|
+
"confidence": 0.9
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "X-Agent-ID",
|
|
310
|
+
"confidence": 0.9
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "X-LLM-Request",
|
|
314
|
+
"confidence": 0.9
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "x-ms-copilot-id",
|
|
318
|
+
"confidence": 0.45
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "X-Automated-Browser",
|
|
322
|
+
"confidence": 0.85
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "X-Bot-Request",
|
|
326
|
+
"confidence": 0.85
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "X-Crawler",
|
|
330
|
+
"confidence": 0.8
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "X-Scraper",
|
|
334
|
+
"confidence": 0.8
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"required": [
|
|
338
|
+
{
|
|
339
|
+
"name": "User-Agent",
|
|
340
|
+
"suspiciousIfMissing": true,
|
|
341
|
+
"confidence": 0.7
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "Accept",
|
|
345
|
+
"suspiciousIfMissing": true,
|
|
346
|
+
"confidence": 0.5
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"name": "Accept-Language",
|
|
350
|
+
"suspiciousIfMissing": true,
|
|
351
|
+
"confidence": 0.4
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "Accept-Encoding",
|
|
355
|
+
"suspiciousIfMissing": true,
|
|
356
|
+
"confidence": 0.4
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"forbidden": [
|
|
360
|
+
{
|
|
361
|
+
"name": "X-Test-Request",
|
|
362
|
+
"confidence": 0.6
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "X-Debug-Mode",
|
|
366
|
+
"confidence": 0.6
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|