-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfull.yaml
More file actions
130 lines (116 loc) · 2.35 KB
/
Copy pathfull.yaml
File metadata and controls
130 lines (116 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: crawlwall.io/v1
site:
id: local-dev
host: localhost
mode: enforce
runtime:
fail_mode: block
default_action:
type: allow
ledger:
enabled: true
receipts:
enabled: true
signer:
type: ed25519
key_file: ./crawlwall.key
bots:
- id: googlebot
name: Googlebot
class: search
match:
user_agents:
- "Googlebot"
verify:
type: reverse_dns
allowed_suffixes:
- ".googlebot.com"
- ".google.com"
- id: gptbot
name: GPTBot
class: ai_training
match:
user_agents:
- "GPTBot"
verify:
type: ip_ranges
sources:
- "https://openai.com/gptbot.json"
refresh: 1h
stale_action: fail_closed
max_stale: 0s
- id: unknown
name: Unknown
class: unknown
match:
default: true
verify:
type: none
sets:
protected_paths:
- "/archive"
- "/datasets"
- "/reports"
known_ai_training:
- "gptbot"
- "claudebot"
rules:
- id: block_spoofed_known_bots
priority: 10
when: >
bot.claimed && !bot.verified
action:
type: block
status: 403
reason: spoofed_bot
audit:
receipt: true
tags: ["spoofed", "security"]
- id: allow_verified_search
priority: 100
when: >
bot.verified && bot.class == "search"
action:
type: allow
audit:
receipt: false
tags: ["search"]
- id: meter_training_on_protected_paths
priority: 200
when: >
bot.verified &&
bot.class == "ai_training" &&
sets.protected_paths.exists(p, request.path.startsWith(p))
action:
type: allow_metered
price:
amount: 0.002
currency: USD
unit: request
audit:
receipt: true
tags: ["ai_training", "metered"]
- id: rate_limit_ai_training_elsewhere
priority: 300
when: >
bot.verified && bot.class == "ai_training"
action:
type: rate_limit
limit:
key: "bot.id"
rpm: 120
audit:
receipt: true
tags: ["ai_training"]
- id: block_unknown_protected_paths
priority: 900
when: >
bot.class == "unknown" &&
sets.protected_paths.exists(p, request.path.startsWith(p))
action:
type: block
status: 403
reason: unknown_crawler_protected_path
audit:
receipt: true
tags: ["unknown", "blocked"]