@highflame/policy 2.2.4 → 2.2.5
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/_schemas/ai_gateway/templates/defaults/pii.cedar +164 -0
- package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +465 -0
- package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +90 -0
- package/_schemas/ai_gateway/templates/secrets.cedar +46 -0
- package/_schemas/ai_gateway/templates/templates.json +88 -11
- package/_schemas/guardrails/templates/defaults/pii.cedar +137 -28
- package/_schemas/guardrails/templates/defaults/pii_model.cedar +90 -0
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +433 -31
- package/_schemas/guardrails/templates/templates.json +158 -43
- package/_schemas/sentry/templates/defaults/clipboard.cedar +3 -18
- package/_schemas/sentry/templates/defaults/file_safety.cedar +2 -17
- package/_schemas/sentry/templates/defaults/pii.cedar +102 -96
- package/_schemas/sentry/templates/defaults/pii_advanced.cedar +465 -0
- package/_schemas/sentry/templates/defaults/pii_model.cedar +90 -0
- package/_schemas/sentry/templates/templates.json +68 -11
- package/dist/ai_gateway-defaults.gen.d.ts +1 -1
- package/dist/ai_gateway-defaults.gen.js +838 -59
- package/dist/guardrails-defaults.gen.js +834 -226
- package/dist/overwatch-defaults.gen.js +703 -114
- package/dist/sentry-defaults.gen.js +746 -138
- package/package.json +1 -1
- package/_schemas/ai_gateway/templates/pii_redaction.cedar +0 -94
- package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +0 -35
- package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +0 -63
|
@@ -83,16 +83,44 @@
|
|
|
83
83
|
"category": "security",
|
|
84
84
|
"file": "defaults/injection.cedar",
|
|
85
85
|
"severity": "high",
|
|
86
|
-
"tags": [
|
|
86
|
+
"tags": [
|
|
87
|
+
"category:security",
|
|
88
|
+
"threat:injection",
|
|
89
|
+
"threat:jailbreak",
|
|
90
|
+
"detection:ml",
|
|
91
|
+
"owasp:llm01",
|
|
92
|
+
"owasp:llm02"
|
|
93
|
+
]
|
|
87
94
|
},
|
|
88
95
|
{
|
|
89
96
|
"id": "privacy.defaults",
|
|
90
|
-
"name": "PII
|
|
91
|
-
"description": "Block
|
|
97
|
+
"name": "Structural PII",
|
|
98
|
+
"description": "Block well-formatted sensitive identifiers — SSNs, credit cards, IBANs, API keys — via fast deterministic pattern matching. High precision, low latency, few false positives; use as the always-on baseline.",
|
|
92
99
|
"category": "privacy",
|
|
93
100
|
"file": "defaults/pii.cedar",
|
|
94
101
|
"severity": "critical",
|
|
95
|
-
"tags": [
|
|
102
|
+
"tags": [
|
|
103
|
+
"category:privacy",
|
|
104
|
+
"threat:pii",
|
|
105
|
+
"detection:pattern",
|
|
106
|
+
"compliance:pci-dss",
|
|
107
|
+
"compliance:hipaa"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "privacy.pii-model",
|
|
112
|
+
"name": "Contextual PII",
|
|
113
|
+
"description": "Block the same sensitive identifiers when the ML model infers them from surrounding context — catches unstructured or novel PII the structural patterns miss. Higher recall; requires the pii_model detector.",
|
|
114
|
+
"category": "privacy",
|
|
115
|
+
"file": "defaults/pii_model.cedar",
|
|
116
|
+
"severity": "critical",
|
|
117
|
+
"tags": [
|
|
118
|
+
"category:privacy",
|
|
119
|
+
"threat:pii",
|
|
120
|
+
"detection:ml",
|
|
121
|
+
"compliance:pci-dss",
|
|
122
|
+
"compliance:hipaa"
|
|
123
|
+
]
|
|
96
124
|
},
|
|
97
125
|
{
|
|
98
126
|
"id": "trust-safety.toxicity",
|
|
@@ -101,7 +129,13 @@
|
|
|
101
129
|
"category": "trust-safety",
|
|
102
130
|
"file": "defaults/toxicity.cedar",
|
|
103
131
|
"severity": "critical",
|
|
104
|
-
"tags": [
|
|
132
|
+
"tags": [
|
|
133
|
+
"category:trust-safety",
|
|
134
|
+
"threat:harmful",
|
|
135
|
+
"threat:hate-speech",
|
|
136
|
+
"detection:ml",
|
|
137
|
+
"compliance:eu-ai-act"
|
|
138
|
+
]
|
|
105
139
|
},
|
|
106
140
|
{
|
|
107
141
|
"id": "agent-security.tool-risk",
|
|
@@ -110,7 +144,12 @@
|
|
|
110
144
|
"category": "agent-security",
|
|
111
145
|
"file": "defaults/tool_risk.cedar",
|
|
112
146
|
"severity": "critical",
|
|
113
|
-
"tags": [
|
|
147
|
+
"tags": [
|
|
148
|
+
"category:agent-security",
|
|
149
|
+
"threat:command-injection",
|
|
150
|
+
"owasp:llm06",
|
|
151
|
+
"owasp:asi02"
|
|
152
|
+
]
|
|
114
153
|
},
|
|
115
154
|
{
|
|
116
155
|
"id": "agent-security.defaults",
|
|
@@ -119,7 +158,15 @@
|
|
|
119
158
|
"category": "agent-security",
|
|
120
159
|
"file": "defaults/agentic_safety.cedar",
|
|
121
160
|
"severity": "critical",
|
|
122
|
-
"tags": [
|
|
161
|
+
"tags": [
|
|
162
|
+
"category:agent-security",
|
|
163
|
+
"threat:loop",
|
|
164
|
+
"threat:exfiltration",
|
|
165
|
+
"threat:tool-poisoning",
|
|
166
|
+
"threat:rug-pull",
|
|
167
|
+
"owasp:asi01",
|
|
168
|
+
"owasp:asi04"
|
|
169
|
+
]
|
|
123
170
|
},
|
|
124
171
|
{
|
|
125
172
|
"id": "security.patterns",
|
|
@@ -128,7 +175,14 @@
|
|
|
128
175
|
"category": "security",
|
|
129
176
|
"file": "defaults/security_patterns.cedar",
|
|
130
177
|
"severity": "critical",
|
|
131
|
-
"tags": [
|
|
178
|
+
"tags": [
|
|
179
|
+
"category:security",
|
|
180
|
+
"threat:command-injection",
|
|
181
|
+
"threat:sql-injection",
|
|
182
|
+
"threat:path-traversal",
|
|
183
|
+
"detection:pattern",
|
|
184
|
+
"mitre:t1059"
|
|
185
|
+
]
|
|
132
186
|
},
|
|
133
187
|
{
|
|
134
188
|
"id": "trust-safety.semantic",
|
|
@@ -137,7 +191,13 @@
|
|
|
137
191
|
"category": "trust-safety",
|
|
138
192
|
"file": "defaults/semantic.cedar",
|
|
139
193
|
"severity": "critical",
|
|
140
|
-
"tags": [
|
|
194
|
+
"tags": [
|
|
195
|
+
"category:trust-safety",
|
|
196
|
+
"threat:harmful",
|
|
197
|
+
"detection:ml",
|
|
198
|
+
"compliance:eu-ai-act",
|
|
199
|
+
"compliance:iso-42001"
|
|
200
|
+
]
|
|
141
201
|
},
|
|
142
202
|
{
|
|
143
203
|
"id": "agent-identity.defaults",
|
|
@@ -164,16 +224,12 @@
|
|
|
164
224
|
"category": "security",
|
|
165
225
|
"file": "profiles/chat_assistant/security.cedar",
|
|
166
226
|
"severity": "high",
|
|
167
|
-
"tags": [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
"category": "privacy",
|
|
174
|
-
"file": "profiles/chat_assistant/privacy.cedar",
|
|
175
|
-
"severity": "high",
|
|
176
|
-
"tags": ["category:privacy", "threat:pii", "compliance:gdpr"]
|
|
227
|
+
"tags": [
|
|
228
|
+
"category:security",
|
|
229
|
+
"threat:injection",
|
|
230
|
+
"threat:jailbreak",
|
|
231
|
+
"detection:ml"
|
|
232
|
+
]
|
|
177
233
|
},
|
|
178
234
|
{
|
|
179
235
|
"id": "trust-safety.chat-assistant",
|
|
@@ -182,7 +238,11 @@
|
|
|
182
238
|
"category": "trust-safety",
|
|
183
239
|
"file": "profiles/chat_assistant/trust_safety.cedar",
|
|
184
240
|
"severity": "critical",
|
|
185
|
-
"tags": [
|
|
241
|
+
"tags": [
|
|
242
|
+
"category:trust-safety",
|
|
243
|
+
"threat:harmful",
|
|
244
|
+
"compliance:eu-ai-act"
|
|
245
|
+
]
|
|
186
246
|
},
|
|
187
247
|
{
|
|
188
248
|
"id": "data-protection.code-block-write-secrets",
|
|
@@ -200,7 +260,11 @@
|
|
|
200
260
|
"category": "security",
|
|
201
261
|
"file": "profiles/code_agent/encoding.cedar",
|
|
202
262
|
"severity": "critical",
|
|
203
|
-
"tags": [
|
|
263
|
+
"tags": [
|
|
264
|
+
"category:security",
|
|
265
|
+
"threat:invisible-chars",
|
|
266
|
+
"threat:injection"
|
|
267
|
+
]
|
|
204
268
|
},
|
|
205
269
|
{
|
|
206
270
|
"id": "security.code-agent-path-security",
|
|
@@ -218,7 +282,12 @@
|
|
|
218
282
|
"category": "agent-security",
|
|
219
283
|
"file": "profiles/code_agent/agentic_security.cedar",
|
|
220
284
|
"severity": "critical",
|
|
221
|
-
"tags": [
|
|
285
|
+
"tags": [
|
|
286
|
+
"category:agent-security",
|
|
287
|
+
"threat:exfiltration",
|
|
288
|
+
"threat:loop",
|
|
289
|
+
"owasp:llm06"
|
|
290
|
+
]
|
|
222
291
|
},
|
|
223
292
|
{
|
|
224
293
|
"id": "agent-security.code-agent-supply-chain",
|
|
@@ -227,16 +296,14 @@
|
|
|
227
296
|
"category": "agent-security",
|
|
228
297
|
"file": "profiles/code_agent/supply_chain.cedar",
|
|
229
298
|
"severity": "critical",
|
|
230
|
-
"tags": [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"severity": "critical",
|
|
239
|
-
"tags": ["category:privacy", "threat:pii", "compliance:gdpr", "compliance:hipaa"]
|
|
299
|
+
"tags": [
|
|
300
|
+
"category:agent-security",
|
|
301
|
+
"threat:tool-poisoning",
|
|
302
|
+
"threat:indirect-injection",
|
|
303
|
+
"threat:exfiltration",
|
|
304
|
+
"owasp:asi01",
|
|
305
|
+
"owasp:asi04"
|
|
306
|
+
]
|
|
240
307
|
},
|
|
241
308
|
{
|
|
242
309
|
"id": "data-protection.data-pipeline",
|
|
@@ -272,7 +339,12 @@
|
|
|
272
339
|
"category": "agent-identity",
|
|
273
340
|
"file": "profiles/multi_agent/agent_trust.cedar",
|
|
274
341
|
"severity": "critical",
|
|
275
|
-
"tags": [
|
|
342
|
+
"tags": [
|
|
343
|
+
"category:agent-identity",
|
|
344
|
+
"scope:per-agent",
|
|
345
|
+
"owasp:llm01",
|
|
346
|
+
"owasp:llm02"
|
|
347
|
+
]
|
|
276
348
|
},
|
|
277
349
|
{
|
|
278
350
|
"id": "agent-identity.multi-agent-safety",
|
|
@@ -281,7 +353,13 @@
|
|
|
281
353
|
"category": "agent-identity",
|
|
282
354
|
"file": "profiles/multi_agent/agent_safety.cedar",
|
|
283
355
|
"severity": "critical",
|
|
284
|
-
"tags": [
|
|
356
|
+
"tags": [
|
|
357
|
+
"category:agent-identity",
|
|
358
|
+
"scope:per-agent",
|
|
359
|
+
"threat:pii",
|
|
360
|
+
"threat:secrets",
|
|
361
|
+
"threat:injection"
|
|
362
|
+
]
|
|
285
363
|
},
|
|
286
364
|
{
|
|
287
365
|
"id": "agent-identity.a2a-cross-origin",
|
|
@@ -290,7 +368,12 @@
|
|
|
290
368
|
"category": "agent-identity",
|
|
291
369
|
"file": "profiles/a2a_security/cross_origin.cedar",
|
|
292
370
|
"severity": "critical",
|
|
293
|
-
"tags": [
|
|
371
|
+
"tags": [
|
|
372
|
+
"category:agent-identity",
|
|
373
|
+
"threat:supply-chain",
|
|
374
|
+
"owasp:llm08",
|
|
375
|
+
"owasp:asi03"
|
|
376
|
+
]
|
|
294
377
|
},
|
|
295
378
|
{
|
|
296
379
|
"id": "agent-identity.a2a-inter-agent-injection",
|
|
@@ -299,7 +382,12 @@
|
|
|
299
382
|
"category": "agent-identity",
|
|
300
383
|
"file": "profiles/a2a_security/inter_agent_injection.cedar",
|
|
301
384
|
"severity": "critical",
|
|
302
|
-
"tags": [
|
|
385
|
+
"tags": [
|
|
386
|
+
"category:agent-identity",
|
|
387
|
+
"threat:indirect-injection",
|
|
388
|
+
"threat:encoded-payload",
|
|
389
|
+
"owasp:llm01"
|
|
390
|
+
]
|
|
303
391
|
},
|
|
304
392
|
{
|
|
305
393
|
"id": "agent-identity.a2a-supply-chain",
|
|
@@ -308,7 +396,13 @@
|
|
|
308
396
|
"category": "agent-identity",
|
|
309
397
|
"file": "profiles/a2a_security/supply_chain.cedar",
|
|
310
398
|
"severity": "critical",
|
|
311
|
-
"tags": [
|
|
399
|
+
"tags": [
|
|
400
|
+
"category:agent-identity",
|
|
401
|
+
"threat:tool-poisoning",
|
|
402
|
+
"threat:rug-pull",
|
|
403
|
+
"threat:exfiltration",
|
|
404
|
+
"owasp:asi04"
|
|
405
|
+
]
|
|
312
406
|
},
|
|
313
407
|
{
|
|
314
408
|
"id": "agent-identity.a2a-identity-enforcement",
|
|
@@ -317,7 +411,12 @@
|
|
|
317
411
|
"category": "agent-identity",
|
|
318
412
|
"file": "profiles/a2a_security/identity_enforcement.cedar",
|
|
319
413
|
"severity": "critical",
|
|
320
|
-
"tags": [
|
|
414
|
+
"tags": [
|
|
415
|
+
"category:agent-identity",
|
|
416
|
+
"threat:spoofing",
|
|
417
|
+
"scope:per-agent",
|
|
418
|
+
"owasp:asi04"
|
|
419
|
+
]
|
|
321
420
|
},
|
|
322
421
|
{
|
|
323
422
|
"id": "agent-identity.a2a-escalation",
|
|
@@ -326,7 +425,12 @@
|
|
|
326
425
|
"category": "agent-identity",
|
|
327
426
|
"file": "profiles/a2a_security/escalation_detection.cedar",
|
|
328
427
|
"severity": "critical",
|
|
329
|
-
"tags": [
|
|
428
|
+
"tags": [
|
|
429
|
+
"category:agent-identity",
|
|
430
|
+
"threat:escalation",
|
|
431
|
+
"scope:per-agent",
|
|
432
|
+
"owasp:llm01"
|
|
433
|
+
]
|
|
330
434
|
},
|
|
331
435
|
{
|
|
332
436
|
"id": "data-protection.advanced-secrets",
|
|
@@ -339,12 +443,18 @@
|
|
|
339
443
|
},
|
|
340
444
|
{
|
|
341
445
|
"id": "privacy.advanced-pii",
|
|
342
|
-
"name": "
|
|
343
|
-
"description": "
|
|
446
|
+
"name": "Comprehensive PII",
|
|
447
|
+
"description": "Block every PII type — structural and contextual, sensitive and situational. Situational entities (names, locations, dates, etc.) are real PII but appear in ordinary text, so this tier flags often; one forbid rule per entity lets you disable the ones you don't need. Opt-in for strict environments.",
|
|
344
448
|
"category": "privacy",
|
|
345
449
|
"file": "profiles/advanced_detection/pii.cedar",
|
|
346
450
|
"severity": "critical",
|
|
347
|
-
"tags": [
|
|
451
|
+
"tags": [
|
|
452
|
+
"category:privacy",
|
|
453
|
+
"threat:pii",
|
|
454
|
+
"detection:pattern",
|
|
455
|
+
"compliance:pci-dss",
|
|
456
|
+
"compliance:hipaa"
|
|
457
|
+
]
|
|
348
458
|
},
|
|
349
459
|
{
|
|
350
460
|
"id": "security.advanced-block-critical-severity",
|
|
@@ -362,7 +472,12 @@
|
|
|
362
472
|
"category": "agent-security",
|
|
363
473
|
"file": "param_validation.cedar",
|
|
364
474
|
"severity": "high",
|
|
365
|
-
"tags": [
|
|
475
|
+
"tags": [
|
|
476
|
+
"category:agent-security",
|
|
477
|
+
"surface:call-tool",
|
|
478
|
+
"aarm:r3",
|
|
479
|
+
"posture:deny-default"
|
|
480
|
+
]
|
|
366
481
|
}
|
|
367
482
|
]
|
|
368
483
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Clipboard Policy (Default)
|
|
3
3
|
// =============================================================================
|
|
4
4
|
// Controls paste operations into AI chat services. Covers blanket paste
|
|
5
|
-
// blocking, paste-with-secrets,
|
|
6
|
-
//
|
|
5
|
+
// blocking, paste-with-secrets, encoded payload pastes, and pastes containing
|
|
6
|
+
// invisible Unicode characters. PII pastes are handled by the canonical
|
|
7
|
+
// privacy.* templates (defaults/pii*.cedar), which scope to paste_content.
|
|
7
8
|
//
|
|
8
9
|
// All rules scope to action == "paste_content". Other templates
|
|
9
10
|
// (semantic, content_safety, pii, secrets) cover process_prompt and
|
|
@@ -11,7 +12,6 @@
|
|
|
11
12
|
//
|
|
12
13
|
// Context keys consumed:
|
|
13
14
|
// - secrets_detected: Bool
|
|
14
|
-
// - pii_detected: Bool
|
|
15
15
|
// - encoded_content_detected: Bool
|
|
16
16
|
// - encoded_score: Long (0-100)
|
|
17
17
|
// - invisible_chars_detected: Bool
|
|
@@ -51,21 +51,6 @@ when {
|
|
|
51
51
|
context has secrets_detected && context.secrets_detected == true
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
@id("clipboard.block-paste-pii")
|
|
55
|
-
@name("Block paste with PII")
|
|
56
|
-
@description("Blocks paste_content when pii_detected is true.")
|
|
57
|
-
@severity("critical")
|
|
58
|
-
@tags("category:clipboard,threat:pii,detection:rule,compliance:gdpr")
|
|
59
|
-
@reject_message("Paste blocked: personally identifiable information detected in pasted content.")
|
|
60
|
-
forbid (
|
|
61
|
-
principal,
|
|
62
|
-
action == Sentry::Action::"paste_content",
|
|
63
|
-
resource
|
|
64
|
-
)
|
|
65
|
-
when {
|
|
66
|
-
context has pii_detected && context.pii_detected == true
|
|
67
|
-
};
|
|
68
|
-
|
|
69
54
|
@id("clipboard.block-paste-encoded")
|
|
70
55
|
@name("Block paste with encoded payloads")
|
|
71
56
|
@description("Blocks paste_content when encoded_content_detected is true and encoded_score >= 60.")
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// File & Attachment Safety (Default)
|
|
3
3
|
// =============================================================================
|
|
4
4
|
// Blocks file uploads to AI chat services when document content contains
|
|
5
|
-
// secrets
|
|
5
|
+
// secrets. PII in uploads is handled by the canonical privacy.* templates
|
|
6
|
+
// (defaults/pii*.cedar), which scope to upload_file.
|
|
6
7
|
//
|
|
7
8
|
// Context keys consumed:
|
|
8
9
|
// - secrets_detected: Bool
|
|
9
|
-
// - pii_detected: Bool
|
|
10
10
|
//
|
|
11
11
|
// Compliance:
|
|
12
12
|
// - NIST 800-53 SC-28; GDPR Art. 32
|
|
@@ -29,18 +29,3 @@ forbid (
|
|
|
29
29
|
when {
|
|
30
30
|
context has secrets_detected && context.secrets_detected == true
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
@id("file-safety.block-upload-pii")
|
|
34
|
-
@name("Block file uploads with PII")
|
|
35
|
-
@description("Blocks upload_file when pii_detected is true.")
|
|
36
|
-
@severity("critical")
|
|
37
|
-
@tags("category:file-safety,threat:pii,detection:rule,surface:upload-file,compliance:gdpr")
|
|
38
|
-
@reject_message("File upload blocked: personally identifiable information detected in document content.")
|
|
39
|
-
forbid (
|
|
40
|
-
principal,
|
|
41
|
-
action == Sentry::Action::"upload_file",
|
|
42
|
-
resource
|
|
43
|
-
)
|
|
44
|
-
when {
|
|
45
|
-
context has pii_detected && context.pii_detected == true
|
|
46
|
-
};
|