-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathevals.json
More file actions
174 lines (174 loc) · 5.62 KB
/
Copy pathevals.json
File metadata and controls
174 lines (174 loc) · 5.62 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
"skill_name": "cloudflare-waf-author",
"evals": [
{
"id": 1,
"prompt": "Our upload endpoint is being blocked by Cloudflare WAF. Add an allow rule so uploads work again.",
"expected_output": "Stop before drafting. Ask which authoring interface is authoritative, classify custom rule versus managed-rule exception, and request the ticket, owner, exact traffic shape, observed child-rule IDs, peer rule, and soak plan.",
"files": [],
"checks": [
{
"id": "asks-interface",
"type": "contains_all",
"values": [
"Terraform",
"Dashboard",
"API"
]
},
{
"id": "asks-rule-type",
"type": "contains_any",
"values": [
"managed-rule exception",
"custom rule",
"rule type"
]
},
{
"id": "asks-provenance",
"type": "contains_all",
"values": [
"ticket",
"host",
"path",
"method"
]
},
{
"id": "does-not-draft-rule",
"type": "not_regex",
"pattern": "(?:\"action\"\\s*:|action\\s*=|\"expression\"\\s*:|expression\\s*=|\\(http\\.host\\b|(?:^|\\n)\\s*http\\.host\\s+eq)"
}
]
},
{
"id": 2,
"prompt": "Using the attached Terraform peer rules, draft a managed-rule exception for ticket CHG-2048. The legitimate browser upload is POST https://uploads.acme.com/api/v1/documents/ and Security Events show only child rules 6179ae15870a4bb7b2d480d4843b323c and 5de7edfa648c4d6891dc3e7f84534ffa. Scope it to multipart uploads with a filename marker and preserve the execute rule.",
"expected_output": "Draft a narrow http_request_firewall_managed skip rule before the execute rule, skip only the two observed child IDs, guard exact host/path/method/content type/body marker, and use concise direct CHG-2048 provenance without guard-by-guard, approval-rollup, or peer-shape boilerplate.",
"files": [
"evals/fixtures/current-managed-rules.tf"
],
"checks": [
{
"id": "managed-phase",
"type": "contains",
"value": "http_request_firewall_managed"
},
{
"id": "child-rules-only",
"type": "contains_all",
"values": [
"6179ae15870a4bb7b2d480d4843b323c",
"5de7edfa648c4d6891dc3e7f84534ffa"
]
},
{
"id": "narrow-traffic-shape",
"type": "contains_all",
"values": [
"uploads.acme.com",
"/api/v1/documents/",
"POST",
"multipart/form-data",
"filename="
]
},
{
"id": "uses-multivalue-header",
"type": "contains",
"value": "any("
},
{
"id": "states-child-only-scope",
"type": "contains_any",
"values": [
"only these two",
"only the two",
"only these child rules",
"skip only"
]
},
{
"id": "does-not-skip-whole-ruleset",
"type": "not_regex",
"pattern": "(?:\"ruleset\"\\s*:\\s*\"current\"|ruleset\\s*=\\s*\"current\"|\"rulesets\"\\s*:|rulesets\\s*=)"
},
{
"id": "keeps-direct-ticket-provenance",
"type": "contains",
"value": "CHG-2048"
},
{
"id": "rejects-comment-slop",
"type": "not_regex",
"pattern": "(?i)(why each guard|approval:|same shape as|peer rule:)"
}
]
},
{
"id": 3,
"prompt": "We maintain WAF rules through the Rulesets API. Update the attached current-state payload with a narrow custom managed_challenge rule for GET /admin/ on admin.acme.com from outside the named trusted IP list. Explain the safe mutation sequence and rollback evidence; do not perform the API call.",
"expected_output": "Capture current state and ETag, validate the expression, use If-Match and explicit position semantics, preserve a rollback artifact, and scope the expression to host, path, method, and named trusted list.",
"files": [
"evals/fixtures/current-custom-ruleset.json"
],
"checks": [
{
"id": "optimistic-concurrency",
"type": "contains_all",
"values": [
"GET",
"ETag",
"If-Match"
]
},
{
"id": "rollback",
"type": "contains",
"value": "rollback"
},
{
"id": "expression-validation",
"type": "contains_any",
"values": [
"expression test",
"validate the expression",
"expression validation"
]
},
{
"id": "position-semantics",
"type": "contains_any",
"values": [
"position.before",
"position.after",
"\"position\""
]
},
{
"id": "custom-phase-and-action",
"type": "contains_all",
"values": [
"http_request_firewall_custom",
"managed_challenge"
]
},
{
"id": "named-list-scope",
"type": "contains_all",
"values": [
"admin.acme.com",
"/admin/",
"$trusted_egress_ips"
]
},
{
"id": "negates-trusted-list",
"type": "regex",
"pattern": "(?:not\\s+ip\\.src\\s+in\\s+\\$trusted_egress_ips|ip\\.src\\s+not\\s+in\\s+\\$trusted_egress_ips)"
}
]
}
]
}