@highflame/policy 2.2.35 → 2.2.37
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/agent_ops/context.json +822 -0
- package/_schemas/agent_ops/schema.cedarschema +134 -109
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar +6 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_escalation.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_inter_agent_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_claude_block_injection.cedar +2 -2
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_defaults.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_trust.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_defaults.cedar +18 -12
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_semantic.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_toxicity.cedar +4 -4
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_advanced_secrets.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_data_pipeline.cedar +2 -1
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_defaults.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_advanced_pii.cedar +42 -21
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_defaults.cedar +14 -7
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_pii_model.cedar +10 -5
- package/_schemas/agent_ops/templates/ported/organization/organization_team_permissions.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_advanced_block_critical_severity.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/security_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/threat-detection/security_data_pipeline_block_injection.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +5 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +9 -7
- package/_schemas/ai_gateway/context.json +308 -0
- package/_schemas/ai_gateway/schema.cedarschema +44 -7
- package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +5 -16
- package/_schemas/ai_gateway/templates/defaults/pii.cedar +14 -7
- package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +42 -21
- package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/ai_gateway/templates/defaults/semantic.cedar +9 -74
- package/_schemas/ai_gateway/templates/defaults/tools.cedar +7 -38
- package/_schemas/ai_gateway/templates/secrets.cedar +3 -3
- package/_schemas/guardrails/context.json +701 -0
- package/_schemas/guardrails/schema.cedarschema +30 -2
- package/_schemas/guardrails/templates/defaults/agent_identity.cedar +3 -3
- package/_schemas/guardrails/templates/defaults/injection.cedar +9 -8
- package/_schemas/guardrails/templates/defaults/pii.cedar +14 -7
- package/_schemas/guardrails/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/guardrails/templates/defaults/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/defaults/security_patterns.cedar +5 -3
- package/_schemas/guardrails/templates/defaults/semantic.cedar +6 -6
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +6 -6
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +6 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +9 -8
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +42 -21
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +2 -1
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +3 -2
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +6 -6
- package/_schemas/guardrails/templates/templates.json +0 -9
- package/_schemas/overwatch/context.json +30 -0
- package/_schemas/overwatch/schema.cedarschema +7 -0
- package/dist/agent_ops-context.gen.d.ts +6 -1
- package/dist/agent_ops-context.gen.js +10 -0
- package/dist/agent_ops-defaults.gen.js +177 -120
- package/dist/agent_ops-entities.gen.js +5 -1
- package/dist/ai_gateway-context.gen.d.ts +6 -1
- package/dist/ai_gateway-context.gen.js +10 -0
- package/dist/ai_gateway-defaults.gen.js +90 -164
- package/dist/ai_gateway-detectors.gen.js +6 -1
- package/dist/ai_gateway-entities.gen.js +6 -2
- package/dist/guardrails-context.gen.d.ts +6 -1
- package/dist/guardrails-context.gen.js +10 -0
- package/dist/guardrails-defaults.gen.js +144 -145
- package/dist/guardrails-detectors.gen.js +6 -1
- package/dist/guardrails-entities.gen.js +5 -1
- package/dist/overwatch-context.gen.d.ts +6 -1
- package/dist/overwatch-context.gen.js +10 -0
- package/dist/overwatch-detectors.gen.js +6 -1
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +528 -118
- package/package.json +1 -1
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +0 -30
|
@@ -60,13 +60,23 @@ namespace AgentOps {
|
|
|
60
60
|
// Actions
|
|
61
61
|
// =========================================================================
|
|
62
62
|
|
|
63
|
-
/// Process user prompts
|
|
63
|
+
/// Process user prompts for security threats and content violations
|
|
64
64
|
action "process_prompt" appliesTo {
|
|
65
65
|
principal: [User, Agent],
|
|
66
66
|
resource: [App, Agent, Session],
|
|
67
67
|
context: ProcessPromptContext
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
/// Process model responses for security threats and content violations.
|
|
71
|
+
/// Distinct trigger from process_prompt (ADR 0031). Declared ahead of a
|
|
72
|
+
/// caller: no AgentOps producer emits model responses today, so this is
|
|
73
|
+
/// namespace symmetry with ai_gateway/guardrails until one does.
|
|
74
|
+
action "process_response" appliesTo {
|
|
75
|
+
principal: [User, Agent],
|
|
76
|
+
resource: [App, Agent, Session],
|
|
77
|
+
context: ProcessResponseContext
|
|
78
|
+
};
|
|
79
|
+
|
|
70
80
|
/// Execute tool calls (shell, file operations, MCP tools)
|
|
71
81
|
action "call_tool" appliesTo {
|
|
72
82
|
principal: [User, Agent],
|
|
@@ -112,7 +122,15 @@ namespace AgentOps {
|
|
|
112
122
|
// Context Types (Action-Specific)
|
|
113
123
|
// =========================================================================
|
|
114
124
|
|
|
115
|
-
/// Context for
|
|
125
|
+
/// Context for the process_response action.
|
|
126
|
+
///
|
|
127
|
+
/// An alias, not a copy: prompts and responses are inspected by the same
|
|
128
|
+
/// detector pipeline and carry the same keys — only the trigger differs
|
|
129
|
+
/// (ADR 0031). Aliasing means a new detector key cannot land on one
|
|
130
|
+
/// direction and go missing on the other.
|
|
131
|
+
type ProcessResponseContext = ProcessPromptContext;
|
|
132
|
+
|
|
133
|
+
/// Context for process_prompt action (user prompts)
|
|
116
134
|
type ProcessPromptContext = {
|
|
117
135
|
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
118
136
|
"role"?: String,
|
|
@@ -148,12 +166,12 @@ namespace AgentOps {
|
|
|
148
166
|
"indirect_injection_score"?: Long, // Indirect injection via tool outputs (0-100)
|
|
149
167
|
|
|
150
168
|
// Privacy - Secrets (optional)
|
|
151
|
-
"secrets_detected"?:
|
|
169
|
+
"secrets_detected"?: Bool,
|
|
152
170
|
"secret_count"?: Long,
|
|
153
171
|
"secret_types"?: Set<String>, // ["aws_access_key", "github_token", ...]
|
|
154
172
|
|
|
155
173
|
// Privacy - PII (optional)
|
|
156
|
-
"pii_detected"?:
|
|
174
|
+
"pii_detected"?: Bool,
|
|
157
175
|
"pii_count"?: Long,
|
|
158
176
|
"pii_types"?: Set<String>, // ["email", "phone", "ssn", "credit_card", ...]
|
|
159
177
|
"pii_score"?: Long, // PII ML classifier confidence (0-100)
|
|
@@ -177,65 +195,65 @@ namespace AgentOps {
|
|
|
177
195
|
"topic_confidence"?: Long, // 0-100
|
|
178
196
|
|
|
179
197
|
// Security - Invisible Character Detection (optional)
|
|
180
|
-
"invisible_chars_detected"?:
|
|
198
|
+
"invisible_chars_detected"?: Bool,
|
|
181
199
|
"invisible_chars_score"?: Long, // 0-100
|
|
182
200
|
|
|
183
201
|
// Security - Pattern Detection (optional)
|
|
184
|
-
"command_injection_detected"?:
|
|
202
|
+
"command_injection_detected"?: Bool,
|
|
185
203
|
"command_injection_type"?: String, // "reverse_shell" | "privilege_escalation" | ...
|
|
186
204
|
"command_injection_score"?: Long, // 0-100
|
|
187
|
-
"path_traversal_detected"?:
|
|
205
|
+
"path_traversal_detected"?: Bool,
|
|
188
206
|
"path_traversal_severity"?: String, // "critical" | "high" | "medium" | "low" | "none"
|
|
189
207
|
"path_traversal_type"?: String,
|
|
190
|
-
"sql_injection_detected"?:
|
|
208
|
+
"sql_injection_detected"?: Bool,
|
|
191
209
|
"sql_injection_type"?: String, // "tautology" | "union_based" | "destructive" | ...
|
|
192
210
|
"sql_injection_score"?: Long, // 0-100
|
|
193
211
|
|
|
194
212
|
// Security - Cross-Origin Escalation (optional)
|
|
195
|
-
"cross_origin_detected"?:
|
|
213
|
+
"cross_origin_detected"?: Bool,
|
|
196
214
|
"cross_origin_type"?: String, // "cross_origin_tool" | "cross_origin_server" | "none"
|
|
197
215
|
"cross_origin_score"?: Long, // 0-100
|
|
198
216
|
|
|
199
217
|
// Security - Encoded Injection (optional)
|
|
200
|
-
"encoded_content_detected"?:
|
|
218
|
+
"encoded_content_detected"?: Bool,
|
|
201
219
|
"encoded_types"?: Set<String>, // ["base64", "hex", "unicode", "url", ...]
|
|
202
220
|
"encoded_count"?: Long,
|
|
203
221
|
"encoded_score"?: Long, // 0-100
|
|
204
222
|
|
|
205
223
|
// Language & Script Detection (optional)
|
|
206
224
|
"detected_language"?: String, // ISO language code
|
|
207
|
-
"is_english"?:
|
|
225
|
+
"is_english"?: Bool,
|
|
208
226
|
"language_confidence"?: Long, // 0-100
|
|
209
227
|
"detected_script"?: String, // "latin" | "cyrillic" | "arabic" | "unknown" | ...
|
|
210
|
-
"is_latin_script"?:
|
|
228
|
+
"is_latin_script"?: Bool,
|
|
211
229
|
"script_confidence"?: Long, // 0-100
|
|
212
230
|
|
|
213
231
|
// Content Analysis (optional)
|
|
214
232
|
"hallucination_score"?: Long,
|
|
215
233
|
"factuality_score"?: Long, // 0-100
|
|
216
234
|
"sentiment_score"?: Long,
|
|
217
|
-
"contains_code"?:
|
|
235
|
+
"contains_code"?: Bool,
|
|
218
236
|
"code_languages"?: Set<String>,
|
|
219
237
|
"code_ratio"?: Long, // 0-100
|
|
220
|
-
"keyword_matched"?:
|
|
238
|
+
"keyword_matched"?: Bool,
|
|
221
239
|
"keyword_categories"?: Set<String>,
|
|
222
240
|
"keyword_count"?: Long,
|
|
223
|
-
"contains_non_ascii"?:
|
|
224
|
-
"phishing_detected"?:
|
|
241
|
+
"contains_non_ascii"?: Bool,
|
|
242
|
+
"phishing_detected"?: Bool,
|
|
225
243
|
"content_safety_score"?: Long, // 0-100
|
|
226
|
-
"content_safety_blocked"?:
|
|
244
|
+
"content_safety_blocked"?: Bool,
|
|
227
245
|
|
|
228
246
|
// Agentic - Multi-Turn Context (optional)
|
|
229
247
|
"conversation_turn"?: Long,
|
|
230
|
-
"multi_turn_detection"?:
|
|
248
|
+
"multi_turn_detection"?: Bool,
|
|
231
249
|
|
|
232
250
|
// Session Detection History — cross-turn sticky flags (optional)
|
|
233
|
-
"session_pii_detected"?:
|
|
251
|
+
"session_pii_detected"?: Bool,
|
|
234
252
|
"session_pii_types"?: Set<String>,
|
|
235
|
-
"session_secrets_detected"?:
|
|
253
|
+
"session_secrets_detected"?: Bool,
|
|
236
254
|
"session_secret_types"?: Set<String>,
|
|
237
|
-
"session_injection_detected"?:
|
|
238
|
-
"session_command_injection"?:
|
|
255
|
+
"session_injection_detected"?: Bool,
|
|
256
|
+
"session_command_injection"?: Bool,
|
|
239
257
|
"session_threat_turns"?: Long,
|
|
240
258
|
"session_max_injection_score"?: Long,
|
|
241
259
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -265,14 +283,14 @@ namespace AgentOps {
|
|
|
265
283
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
266
284
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
267
285
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
268
|
-
"flow_sink_is_external"?:
|
|
286
|
+
"flow_sink_is_external"?: Bool,
|
|
269
287
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
270
288
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
271
289
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
272
290
|
|
|
273
291
|
// Usage Budget — multi-window token & cost enforcement (optional)
|
|
274
292
|
"budget_remaining_pct"?: Long,
|
|
275
|
-
"budget_exceeded"?:
|
|
293
|
+
"budget_exceeded"?: Bool,
|
|
276
294
|
"budget_cost_micros_this_turn"?: Long,
|
|
277
295
|
"budget_model"?: String,
|
|
278
296
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -280,15 +298,15 @@ namespace AgentOps {
|
|
|
280
298
|
"budget_tokens_pct_monthly"?: Long,
|
|
281
299
|
"budget_cost_pct_daily"?: Long,
|
|
282
300
|
"budget_cost_pct_monthly"?: Long,
|
|
283
|
-
"budget_exceeded_session"?:
|
|
284
|
-
"budget_exceeded_daily"?:
|
|
285
|
-
"budget_exceeded_monthly"?:
|
|
301
|
+
"budget_exceeded_session"?: Bool,
|
|
302
|
+
"budget_exceeded_daily"?: Bool,
|
|
303
|
+
"budget_exceeded_monthly"?: Bool,
|
|
286
304
|
|
|
287
305
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
288
306
|
"rpm_remaining_pct"?: Long,
|
|
289
|
-
"rpm_exceeded"?:
|
|
307
|
+
"rpm_exceeded"?: Bool,
|
|
290
308
|
"tpm_remaining_pct"?: Long,
|
|
291
|
-
"tpm_exceeded"?:
|
|
309
|
+
"tpm_exceeded"?: Bool,
|
|
292
310
|
|
|
293
311
|
// Agent Identity — authenticated agent principal metadata (optional)
|
|
294
312
|
"agent_id"?: String,
|
|
@@ -300,8 +318,8 @@ namespace AgentOps {
|
|
|
300
318
|
// Supply-chain / package safety + aggregate threat severity (optional —
|
|
301
319
|
// ADR 0012 unified port). Projected by Shield's malicious-package and
|
|
302
320
|
// threat-severity detectors; every read is `has`-guarded in policy.
|
|
303
|
-
"malicious_package_detected"?:
|
|
304
|
-
"package_install_detected"?:
|
|
321
|
+
"malicious_package_detected"?: Bool,
|
|
322
|
+
"package_install_detected"?: Bool,
|
|
305
323
|
"package_check_status"?: String,
|
|
306
324
|
"max_threat_severity"?: Long,
|
|
307
325
|
|
|
@@ -328,9 +346,9 @@ namespace AgentOps {
|
|
|
328
346
|
// Tool Risk (optional)
|
|
329
347
|
"tool_name"?: String,
|
|
330
348
|
"tool_risk_score"?: Long, // 0-100
|
|
331
|
-
"tool_is_sensitive"?:
|
|
349
|
+
"tool_is_sensitive"?: Bool,
|
|
332
350
|
"tool_category"?: String, // "safe" | "sensitive" | "dangerous"
|
|
333
|
-
"tool_is_builtin"?:
|
|
351
|
+
"tool_is_builtin"?: Bool,
|
|
334
352
|
|
|
335
353
|
// AARM R3 (CAP-ENF-007) — Action Parameter Validation
|
|
336
354
|
"action_params"?: {
|
|
@@ -343,29 +361,29 @@ namespace AgentOps {
|
|
|
343
361
|
"target"?: String,
|
|
344
362
|
"query"?: String,
|
|
345
363
|
},
|
|
346
|
-
"param_type_violation"?:
|
|
364
|
+
"param_type_violation"?: Bool,
|
|
347
365
|
"param_type_violations"?: Set<String>,
|
|
348
366
|
|
|
349
367
|
// MCP context (optional)
|
|
350
368
|
"mcp_server"?: String,
|
|
351
369
|
"mcp_tool"?: String,
|
|
352
|
-
"mcp_server_verified"?:
|
|
370
|
+
"mcp_server_verified"?: Bool,
|
|
353
371
|
|
|
354
372
|
// Agentic - Behavioral Patterns (optional)
|
|
355
|
-
"suspicious_pattern"?:
|
|
373
|
+
"suspicious_pattern"?: Bool,
|
|
356
374
|
"pattern_type"?: String, // "data_exfiltration" | "secret_exfiltration" | ...
|
|
357
375
|
"sequence_risk"?: Long, // 0-100
|
|
358
376
|
|
|
359
377
|
// Agentic - Loop Detection (optional)
|
|
360
|
-
"loop_detected"?:
|
|
378
|
+
"loop_detected"?: Bool,
|
|
361
379
|
"loop_count"?: Long,
|
|
362
380
|
"loop_tool"?: String,
|
|
363
381
|
|
|
364
382
|
// Security checks on tool arguments (optional)
|
|
365
|
-
"secrets_detected"?:
|
|
383
|
+
"secrets_detected"?: Bool,
|
|
366
384
|
"secret_count"?: Long,
|
|
367
385
|
"secret_types"?: Set<String>,
|
|
368
|
-
"pii_detected"?:
|
|
386
|
+
"pii_detected"?: Bool,
|
|
369
387
|
"pii_types"?: Set<String>,
|
|
370
388
|
"pii_count"?: Long,
|
|
371
389
|
"pii_score"?: Long,
|
|
@@ -380,58 +398,65 @@ namespace AgentOps {
|
|
|
380
398
|
"topic_confidence"?: Long, // 0-100
|
|
381
399
|
|
|
382
400
|
// Security - Pattern Detection (optional)
|
|
383
|
-
"command_injection_detected"?:
|
|
401
|
+
"command_injection_detected"?: Bool,
|
|
384
402
|
"command_injection_type"?: String,
|
|
385
403
|
"command_injection_score"?: Long,
|
|
386
|
-
"path_traversal_detected"?:
|
|
404
|
+
"path_traversal_detected"?: Bool,
|
|
387
405
|
"path_traversal_severity"?: String,
|
|
388
406
|
"path_traversal_type"?: String,
|
|
389
|
-
"sql_injection_detected"?:
|
|
407
|
+
"sql_injection_detected"?: Bool,
|
|
390
408
|
"sql_injection_type"?: String,
|
|
391
409
|
"sql_injection_score"?: Long,
|
|
392
410
|
|
|
393
411
|
// Security - Cross-Origin Escalation (optional)
|
|
394
|
-
"cross_origin_detected"?:
|
|
412
|
+
"cross_origin_detected"?: Bool,
|
|
395
413
|
"cross_origin_type"?: String,
|
|
396
414
|
"cross_origin_score"?: Long,
|
|
397
415
|
|
|
398
416
|
// Security - Invisible Character Detection (optional)
|
|
399
|
-
"invisible_chars_detected"?:
|
|
417
|
+
"invisible_chars_detected"?: Bool,
|
|
400
418
|
"invisible_chars_score"?: Long,
|
|
401
419
|
|
|
402
420
|
// Security - Encoded Injection (optional)
|
|
403
|
-
"encoded_content_detected"?:
|
|
421
|
+
"encoded_content_detected"?: Bool,
|
|
404
422
|
"encoded_types"?: Set<String>,
|
|
405
423
|
"encoded_count"?: Long,
|
|
406
424
|
"encoded_score"?: Long,
|
|
407
425
|
|
|
408
426
|
// Agentic - Agent Security (optional)
|
|
409
|
-
"tool_poisoning_detected"?:
|
|
427
|
+
"tool_poisoning_detected"?: Bool,
|
|
410
428
|
"tool_poisoning_score"?: Long,
|
|
411
429
|
"tool_poisoning_type"?: String,
|
|
412
|
-
"rug_pull_detected"?:
|
|
430
|
+
"rug_pull_detected"?: Bool,
|
|
413
431
|
"rug_pull_score"?: Long,
|
|
414
432
|
"rug_pull_type"?: String,
|
|
415
433
|
|
|
416
434
|
// Agentic - MCP Risk (optional)
|
|
417
|
-
"mcp_config_risk"?:
|
|
435
|
+
"mcp_config_risk"?: Bool,
|
|
418
436
|
"mcp_risk_type"?: String,
|
|
419
437
|
"mcp_risk_score"?: Long,
|
|
420
438
|
|
|
421
439
|
// Tool Operation Classifier (optional)
|
|
422
440
|
"tool_operation_classes"?: Set<String>,
|
|
423
441
|
|
|
442
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
443
|
+
"resolved_target_paths"?: String, // union of resolved absolute target paths, any capability
|
|
444
|
+
"read_target_paths"?: String, // paths the command reads or enumerates
|
|
445
|
+
"write_target_paths"?: String, // paths the command writes, creates, or destroys
|
|
446
|
+
"exec_target_paths"?: String, // paths executed as a script
|
|
447
|
+
"unresolved_target"?: Bool, // a target hid behind a variable/glob/$()/inline code, or the path-list cap truncated
|
|
448
|
+
|
|
424
449
|
// Agentic - Multi-Turn Context (optional)
|
|
425
450
|
"conversation_turn"?: Long,
|
|
426
|
-
"multi_turn_detection"?:
|
|
451
|
+
"multi_turn_detection"?: Bool,
|
|
427
452
|
|
|
428
453
|
// Session Detection History — cross-turn sticky flags (optional)
|
|
429
|
-
"session_pii_detected"?:
|
|
454
|
+
"session_pii_detected"?: Bool,
|
|
430
455
|
"session_pii_types"?: Set<String>,
|
|
431
|
-
"session_secrets_detected"?:
|
|
456
|
+
"session_secrets_detected"?: Bool,
|
|
432
457
|
"session_secret_types"?: Set<String>,
|
|
433
|
-
"session_injection_detected"?:
|
|
434
|
-
"session_command_injection"?:
|
|
458
|
+
"session_injection_detected"?: Bool,
|
|
459
|
+
"session_command_injection"?: Bool,
|
|
435
460
|
"session_threat_turns"?: Long,
|
|
436
461
|
"session_max_injection_score"?: Long,
|
|
437
462
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -461,14 +486,14 @@ namespace AgentOps {
|
|
|
461
486
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
462
487
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
463
488
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
464
|
-
"flow_sink_is_external"?:
|
|
489
|
+
"flow_sink_is_external"?: Bool,
|
|
465
490
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
466
491
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
467
492
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
468
493
|
|
|
469
494
|
// Usage Budget (optional)
|
|
470
495
|
"budget_remaining_pct"?: Long,
|
|
471
|
-
"budget_exceeded"?:
|
|
496
|
+
"budget_exceeded"?: Bool,
|
|
472
497
|
"budget_cost_micros_this_turn"?: Long,
|
|
473
498
|
"budget_model"?: String,
|
|
474
499
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -476,15 +501,15 @@ namespace AgentOps {
|
|
|
476
501
|
"budget_tokens_pct_monthly"?: Long,
|
|
477
502
|
"budget_cost_pct_daily"?: Long,
|
|
478
503
|
"budget_cost_pct_monthly"?: Long,
|
|
479
|
-
"budget_exceeded_session"?:
|
|
480
|
-
"budget_exceeded_daily"?:
|
|
481
|
-
"budget_exceeded_monthly"?:
|
|
504
|
+
"budget_exceeded_session"?: Bool,
|
|
505
|
+
"budget_exceeded_daily"?: Bool,
|
|
506
|
+
"budget_exceeded_monthly"?: Bool,
|
|
482
507
|
|
|
483
508
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
484
509
|
"rpm_remaining_pct"?: Long,
|
|
485
|
-
"rpm_exceeded"?:
|
|
510
|
+
"rpm_exceeded"?: Bool,
|
|
486
511
|
"tpm_remaining_pct"?: Long,
|
|
487
|
-
"tpm_exceeded"?:
|
|
512
|
+
"tpm_exceeded"?: Bool,
|
|
488
513
|
|
|
489
514
|
// Aggregated threat summary (optional)
|
|
490
515
|
"highest_severity"?: String,
|
|
@@ -504,8 +529,8 @@ namespace AgentOps {
|
|
|
504
529
|
// Supply-chain / package safety + aggregate threat severity (optional —
|
|
505
530
|
// ADR 0012 unified port). Projected by Shield's malicious-package and
|
|
506
531
|
// threat-severity detectors; every read is `has`-guarded in policy.
|
|
507
|
-
"malicious_package_detected"?:
|
|
508
|
-
"package_install_detected"?:
|
|
532
|
+
"malicious_package_detected"?: Bool,
|
|
533
|
+
"package_install_detected"?: Bool,
|
|
509
534
|
"package_check_status"?: String,
|
|
510
535
|
"max_threat_severity"?: Long,
|
|
511
536
|
|
|
@@ -533,14 +558,14 @@ namespace AgentOps {
|
|
|
533
558
|
"path"?: String,
|
|
534
559
|
|
|
535
560
|
// Security checks on file content (optional)
|
|
536
|
-
"secrets_detected"?:
|
|
561
|
+
"secrets_detected"?: Bool,
|
|
537
562
|
"secret_count"?: Long,
|
|
538
563
|
"secret_types"?: Set<String>,
|
|
539
|
-
"pii_detected"?:
|
|
564
|
+
"pii_detected"?: Bool,
|
|
540
565
|
"pii_types"?: Set<String>,
|
|
541
566
|
|
|
542
567
|
// Security - Path Traversal (optional)
|
|
543
|
-
"path_traversal_detected"?:
|
|
568
|
+
"path_traversal_detected"?: Bool,
|
|
544
569
|
"path_traversal_severity"?: String,
|
|
545
570
|
"path_traversal_type"?: String,
|
|
546
571
|
|
|
@@ -550,12 +575,12 @@ namespace AgentOps {
|
|
|
550
575
|
"detected_threats"?: Set<String>,
|
|
551
576
|
|
|
552
577
|
// Session Detection History (optional)
|
|
553
|
-
"session_pii_detected"?:
|
|
578
|
+
"session_pii_detected"?: Bool,
|
|
554
579
|
"session_pii_types"?: Set<String>,
|
|
555
|
-
"session_secrets_detected"?:
|
|
580
|
+
"session_secrets_detected"?: Bool,
|
|
556
581
|
"session_secret_types"?: Set<String>,
|
|
557
|
-
"session_injection_detected"?:
|
|
558
|
-
"session_command_injection"?:
|
|
582
|
+
"session_injection_detected"?: Bool,
|
|
583
|
+
"session_command_injection"?: Bool,
|
|
559
584
|
"session_threat_turns"?: Long,
|
|
560
585
|
"session_max_injection_score"?: Long,
|
|
561
586
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -585,14 +610,14 @@ namespace AgentOps {
|
|
|
585
610
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
586
611
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
587
612
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
588
|
-
"flow_sink_is_external"?:
|
|
613
|
+
"flow_sink_is_external"?: Bool,
|
|
589
614
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
590
615
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
591
616
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
592
617
|
|
|
593
618
|
// Usage Budget (optional)
|
|
594
619
|
"budget_remaining_pct"?: Long,
|
|
595
|
-
"budget_exceeded"?:
|
|
620
|
+
"budget_exceeded"?: Bool,
|
|
596
621
|
"budget_cost_micros_this_turn"?: Long,
|
|
597
622
|
"budget_model"?: String,
|
|
598
623
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -600,15 +625,15 @@ namespace AgentOps {
|
|
|
600
625
|
"budget_tokens_pct_monthly"?: Long,
|
|
601
626
|
"budget_cost_pct_daily"?: Long,
|
|
602
627
|
"budget_cost_pct_monthly"?: Long,
|
|
603
|
-
"budget_exceeded_session"?:
|
|
604
|
-
"budget_exceeded_daily"?:
|
|
605
|
-
"budget_exceeded_monthly"?:
|
|
628
|
+
"budget_exceeded_session"?: Bool,
|
|
629
|
+
"budget_exceeded_daily"?: Bool,
|
|
630
|
+
"budget_exceeded_monthly"?: Bool,
|
|
606
631
|
|
|
607
632
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
608
633
|
"rpm_remaining_pct"?: Long,
|
|
609
|
-
"rpm_exceeded"?:
|
|
634
|
+
"rpm_exceeded"?: Bool,
|
|
610
635
|
"tpm_remaining_pct"?: Long,
|
|
611
|
-
"tpm_exceeded"?:
|
|
636
|
+
"tpm_exceeded"?: Bool,
|
|
612
637
|
|
|
613
638
|
// Agent Identity (optional)
|
|
614
639
|
"agent_id"?: String,
|
|
@@ -641,18 +666,18 @@ namespace AgentOps {
|
|
|
641
666
|
"path"?: String,
|
|
642
667
|
|
|
643
668
|
// Security - Invisible Character Detection in write content (optional)
|
|
644
|
-
"invisible_chars_detected"?:
|
|
669
|
+
"invisible_chars_detected"?: Bool,
|
|
645
670
|
"invisible_chars_score"?: Long,
|
|
646
671
|
|
|
647
672
|
// Security checks on content being written (optional)
|
|
648
|
-
"secrets_detected"?:
|
|
673
|
+
"secrets_detected"?: Bool,
|
|
649
674
|
"secret_count"?: Long,
|
|
650
675
|
"secret_types"?: Set<String>,
|
|
651
|
-
"pii_detected"?:
|
|
676
|
+
"pii_detected"?: Bool,
|
|
652
677
|
"pii_types"?: Set<String>,
|
|
653
678
|
|
|
654
679
|
// Security - Path Traversal (optional)
|
|
655
|
-
"path_traversal_detected"?:
|
|
680
|
+
"path_traversal_detected"?: Bool,
|
|
656
681
|
"path_traversal_severity"?: String,
|
|
657
682
|
"path_traversal_type"?: String,
|
|
658
683
|
|
|
@@ -662,12 +687,12 @@ namespace AgentOps {
|
|
|
662
687
|
"detected_threats"?: Set<String>,
|
|
663
688
|
|
|
664
689
|
// Session Detection History (optional)
|
|
665
|
-
"session_pii_detected"?:
|
|
690
|
+
"session_pii_detected"?: Bool,
|
|
666
691
|
"session_pii_types"?: Set<String>,
|
|
667
|
-
"session_secrets_detected"?:
|
|
692
|
+
"session_secrets_detected"?: Bool,
|
|
668
693
|
"session_secret_types"?: Set<String>,
|
|
669
|
-
"session_injection_detected"?:
|
|
670
|
-
"session_command_injection"?:
|
|
694
|
+
"session_injection_detected"?: Bool,
|
|
695
|
+
"session_command_injection"?: Bool,
|
|
671
696
|
"session_threat_turns"?: Long,
|
|
672
697
|
"session_max_injection_score"?: Long,
|
|
673
698
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -697,14 +722,14 @@ namespace AgentOps {
|
|
|
697
722
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
698
723
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
699
724
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
700
|
-
"flow_sink_is_external"?:
|
|
725
|
+
"flow_sink_is_external"?: Bool,
|
|
701
726
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
702
727
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
703
728
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
704
729
|
|
|
705
730
|
// Usage Budget (optional)
|
|
706
731
|
"budget_remaining_pct"?: Long,
|
|
707
|
-
"budget_exceeded"?:
|
|
732
|
+
"budget_exceeded"?: Bool,
|
|
708
733
|
"budget_cost_micros_this_turn"?: Long,
|
|
709
734
|
"budget_model"?: String,
|
|
710
735
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -712,15 +737,15 @@ namespace AgentOps {
|
|
|
712
737
|
"budget_tokens_pct_monthly"?: Long,
|
|
713
738
|
"budget_cost_pct_daily"?: Long,
|
|
714
739
|
"budget_cost_pct_monthly"?: Long,
|
|
715
|
-
"budget_exceeded_session"?:
|
|
716
|
-
"budget_exceeded_daily"?:
|
|
717
|
-
"budget_exceeded_monthly"?:
|
|
740
|
+
"budget_exceeded_session"?: Bool,
|
|
741
|
+
"budget_exceeded_daily"?: Bool,
|
|
742
|
+
"budget_exceeded_monthly"?: Bool,
|
|
718
743
|
|
|
719
744
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
720
745
|
"rpm_remaining_pct"?: Long,
|
|
721
|
-
"rpm_exceeded"?:
|
|
746
|
+
"rpm_exceeded"?: Bool,
|
|
722
747
|
"tpm_remaining_pct"?: Long,
|
|
723
|
-
"tpm_exceeded"?:
|
|
748
|
+
"tpm_exceeded"?: Bool,
|
|
724
749
|
|
|
725
750
|
// Agent Identity (optional)
|
|
726
751
|
"agent_id"?: String,
|
|
@@ -751,20 +776,20 @@ namespace AgentOps {
|
|
|
751
776
|
|
|
752
777
|
// MCP context (optional)
|
|
753
778
|
"mcp_server"?: String,
|
|
754
|
-
"mcp_server_verified"?:
|
|
779
|
+
"mcp_server_verified"?: Bool,
|
|
755
780
|
|
|
756
781
|
// Agentic - Agent Security (optional)
|
|
757
|
-
"tool_poisoning_detected"?:
|
|
782
|
+
"tool_poisoning_detected"?: Bool,
|
|
758
783
|
"tool_poisoning_score"?: Long,
|
|
759
784
|
"tool_poisoning_type"?: String,
|
|
760
785
|
|
|
761
786
|
// Agentic - MCP Risk (optional)
|
|
762
|
-
"mcp_config_risk"?:
|
|
787
|
+
"mcp_config_risk"?: Bool,
|
|
763
788
|
"mcp_risk_type"?: String,
|
|
764
789
|
"mcp_risk_score"?: Long,
|
|
765
790
|
|
|
766
791
|
// Security - Cross-Origin Escalation (optional)
|
|
767
|
-
"cross_origin_detected"?:
|
|
792
|
+
"cross_origin_detected"?: Bool,
|
|
768
793
|
"cross_origin_type"?: String,
|
|
769
794
|
"cross_origin_score"?: Long,
|
|
770
795
|
|
|
@@ -774,12 +799,12 @@ namespace AgentOps {
|
|
|
774
799
|
"detected_threats"?: Set<String>,
|
|
775
800
|
|
|
776
801
|
// Session Detection History (optional)
|
|
777
|
-
"session_pii_detected"?:
|
|
802
|
+
"session_pii_detected"?: Bool,
|
|
778
803
|
"session_pii_types"?: Set<String>,
|
|
779
|
-
"session_secrets_detected"?:
|
|
804
|
+
"session_secrets_detected"?: Bool,
|
|
780
805
|
"session_secret_types"?: Set<String>,
|
|
781
|
-
"session_injection_detected"?:
|
|
782
|
-
"session_command_injection"?:
|
|
806
|
+
"session_injection_detected"?: Bool,
|
|
807
|
+
"session_command_injection"?: Bool,
|
|
783
808
|
"session_threat_turns"?: Long,
|
|
784
809
|
"session_max_injection_score"?: Long,
|
|
785
810
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -809,14 +834,14 @@ namespace AgentOps {
|
|
|
809
834
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
810
835
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
811
836
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
812
|
-
"flow_sink_is_external"?:
|
|
837
|
+
"flow_sink_is_external"?: Bool,
|
|
813
838
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
814
839
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
815
840
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
816
841
|
|
|
817
842
|
// Usage Budget (optional)
|
|
818
843
|
"budget_remaining_pct"?: Long,
|
|
819
|
-
"budget_exceeded"?:
|
|
844
|
+
"budget_exceeded"?: Bool,
|
|
820
845
|
"budget_cost_micros_this_turn"?: Long,
|
|
821
846
|
"budget_model"?: String,
|
|
822
847
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -824,15 +849,15 @@ namespace AgentOps {
|
|
|
824
849
|
"budget_tokens_pct_monthly"?: Long,
|
|
825
850
|
"budget_cost_pct_daily"?: Long,
|
|
826
851
|
"budget_cost_pct_monthly"?: Long,
|
|
827
|
-
"budget_exceeded_session"?:
|
|
828
|
-
"budget_exceeded_daily"?:
|
|
829
|
-
"budget_exceeded_monthly"?:
|
|
852
|
+
"budget_exceeded_session"?: Bool,
|
|
853
|
+
"budget_exceeded_daily"?: Bool,
|
|
854
|
+
"budget_exceeded_monthly"?: Bool,
|
|
830
855
|
|
|
831
856
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
832
857
|
"rpm_remaining_pct"?: Long,
|
|
833
|
-
"rpm_exceeded"?:
|
|
858
|
+
"rpm_exceeded"?: Bool,
|
|
834
859
|
"tpm_remaining_pct"?: Long,
|
|
835
|
-
"tpm_exceeded"?:
|
|
860
|
+
"tpm_exceeded"?: Bool,
|
|
836
861
|
|
|
837
862
|
// Agent Identity (optional)
|
|
838
863
|
"agent_id"?: String,
|
|
@@ -844,8 +869,8 @@ namespace AgentOps {
|
|
|
844
869
|
// Supply-chain / package safety + aggregate threat severity (optional —
|
|
845
870
|
// ADR 0012 unified port). Projected by Shield's malicious-package and
|
|
846
871
|
// threat-severity detectors; every read is `has`-guarded in policy.
|
|
847
|
-
"malicious_package_detected"?:
|
|
848
|
-
"package_install_detected"?:
|
|
872
|
+
"malicious_package_detected"?: Bool,
|
|
873
|
+
"package_install_detected"?: Bool,
|
|
849
874
|
"package_check_status"?: String,
|
|
850
875
|
"max_threat_severity"?: Long,
|
|
851
876
|
|
|
@@ -891,7 +916,7 @@ namespace AgentOps {
|
|
|
891
916
|
// requested (i.e. whenever egress_hosts is non-empty), so a "no network"
|
|
892
917
|
// profile can gate on this single boolean. egress_hosts then narrows the
|
|
893
918
|
// host allowlist for profiles that DO permit egress.
|
|
894
|
-
"network_egress"?:
|
|
919
|
+
"network_egress"?: Bool,
|
|
895
920
|
"egress_hosts"?: Set<String>, // Host allowlist for egress, e.g. {"pypi.org"}
|
|
896
921
|
"exec_allowlist"?: Set<String>, // Executables the sandbox may run, e.g. {"python", "python3"}
|
|
897
922
|
// Curated mechanism toggles (ADR 0017 D1.3) — authorization facts only;
|
package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar
CHANGED
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
|
|
25
25
|
@id("agent-identity.a2a-block-cross-origin-critical")
|
|
26
26
|
@name("Block critical cross-origin from any agent")
|
|
27
|
-
@description("Blocks process_prompt and call_tool when cross_origin_detected is true and cross_origin_score >= 80.")
|
|
27
|
+
@description("Blocks process_prompt, process_response, and call_tool when cross_origin_detected is true and cross_origin_score >= 80.")
|
|
28
28
|
@severity("critical")
|
|
29
29
|
@tags("category:agent-identity,threat:supply-chain,detection:ml,owasp:llm08")
|
|
30
30
|
@reject_message("Request blocked: high-confidence cross-origin trust-boundary violation detected — confused-deputy attack.")
|
|
31
31
|
forbid (
|
|
32
32
|
principal is AgentOps::Agent,
|
|
33
|
-
action in [AgentOps::Action::"process_prompt",
|
|
33
|
+
action in [AgentOps::Action::"process_prompt",
|
|
34
|
+
AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
|
|
34
35
|
resource
|
|
35
36
|
)
|
|
36
37
|
when {
|
|
@@ -41,13 +42,14 @@ when {
|
|
|
41
42
|
|
|
42
43
|
@id("agent-identity.a2a-block-cross-origin-unverified")
|
|
43
44
|
@name("Block cross-origin from unverified agents")
|
|
44
|
-
@description("Blocks process_prompt and call_tool when agent_trust_level is \"unverified\", cross_origin_detected is true, and cross_origin_score >= 60.")
|
|
45
|
+
@description("Blocks process_prompt, process_response, and call_tool when agent_trust_level is \"unverified\", cross_origin_detected is true, and cross_origin_score >= 60.")
|
|
45
46
|
@severity("high")
|
|
46
47
|
@tags("category:agent-identity,threat:supply-chain,scope:per-agent,detection:ml,owasp:asi03")
|
|
47
48
|
@reject_message("Request blocked: unverified agent attempted cross-origin activity — no trust attestation across trust domains.")
|
|
48
49
|
forbid (
|
|
49
50
|
principal is AgentOps::Agent,
|
|
50
|
-
action in [AgentOps::Action::"process_prompt",
|
|
51
|
+
action in [AgentOps::Action::"process_prompt",
|
|
52
|
+
AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
|
|
51
53
|
resource
|
|
52
54
|
)
|
|
53
55
|
when {
|