@highflame/policy 2.2.36 → 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 +792 -0
- package/_schemas/agent_ops/schema.cedarschema +127 -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 +278 -0
- package/_schemas/ai_gateway/schema.cedarschema +37 -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 +671 -0
- package/_schemas/guardrails/schema.cedarschema +23 -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/dist/agent_ops-defaults.gen.js +177 -120
- package/dist/agent_ops-entities.gen.js +5 -1
- package/dist/ai_gateway-defaults.gen.js +90 -164
- package/dist/ai_gateway-entities.gen.js +6 -2
- package/dist/guardrails-defaults.gen.js +144 -145
- package/dist/guardrails-entities.gen.js +5 -1
- package/dist/service-schemas.gen.d.ts +3 -3
- package/dist/service-schemas.gen.js +480 -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,41 +398,41 @@ 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
|
|
|
@@ -430,15 +448,15 @@ namespace AgentOps {
|
|
|
430
448
|
|
|
431
449
|
// Agentic - Multi-Turn Context (optional)
|
|
432
450
|
"conversation_turn"?: Long,
|
|
433
|
-
"multi_turn_detection"?:
|
|
451
|
+
"multi_turn_detection"?: Bool,
|
|
434
452
|
|
|
435
453
|
// Session Detection History — cross-turn sticky flags (optional)
|
|
436
|
-
"session_pii_detected"?:
|
|
454
|
+
"session_pii_detected"?: Bool,
|
|
437
455
|
"session_pii_types"?: Set<String>,
|
|
438
|
-
"session_secrets_detected"?:
|
|
456
|
+
"session_secrets_detected"?: Bool,
|
|
439
457
|
"session_secret_types"?: Set<String>,
|
|
440
|
-
"session_injection_detected"?:
|
|
441
|
-
"session_command_injection"?:
|
|
458
|
+
"session_injection_detected"?: Bool,
|
|
459
|
+
"session_command_injection"?: Bool,
|
|
442
460
|
"session_threat_turns"?: Long,
|
|
443
461
|
"session_max_injection_score"?: Long,
|
|
444
462
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -468,14 +486,14 @@ namespace AgentOps {
|
|
|
468
486
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
469
487
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
470
488
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
471
|
-
"flow_sink_is_external"?:
|
|
489
|
+
"flow_sink_is_external"?: Bool,
|
|
472
490
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
473
491
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
474
492
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
475
493
|
|
|
476
494
|
// Usage Budget (optional)
|
|
477
495
|
"budget_remaining_pct"?: Long,
|
|
478
|
-
"budget_exceeded"?:
|
|
496
|
+
"budget_exceeded"?: Bool,
|
|
479
497
|
"budget_cost_micros_this_turn"?: Long,
|
|
480
498
|
"budget_model"?: String,
|
|
481
499
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -483,15 +501,15 @@ namespace AgentOps {
|
|
|
483
501
|
"budget_tokens_pct_monthly"?: Long,
|
|
484
502
|
"budget_cost_pct_daily"?: Long,
|
|
485
503
|
"budget_cost_pct_monthly"?: Long,
|
|
486
|
-
"budget_exceeded_session"?:
|
|
487
|
-
"budget_exceeded_daily"?:
|
|
488
|
-
"budget_exceeded_monthly"?:
|
|
504
|
+
"budget_exceeded_session"?: Bool,
|
|
505
|
+
"budget_exceeded_daily"?: Bool,
|
|
506
|
+
"budget_exceeded_monthly"?: Bool,
|
|
489
507
|
|
|
490
508
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
491
509
|
"rpm_remaining_pct"?: Long,
|
|
492
|
-
"rpm_exceeded"?:
|
|
510
|
+
"rpm_exceeded"?: Bool,
|
|
493
511
|
"tpm_remaining_pct"?: Long,
|
|
494
|
-
"tpm_exceeded"?:
|
|
512
|
+
"tpm_exceeded"?: Bool,
|
|
495
513
|
|
|
496
514
|
// Aggregated threat summary (optional)
|
|
497
515
|
"highest_severity"?: String,
|
|
@@ -511,8 +529,8 @@ namespace AgentOps {
|
|
|
511
529
|
// Supply-chain / package safety + aggregate threat severity (optional —
|
|
512
530
|
// ADR 0012 unified port). Projected by Shield's malicious-package and
|
|
513
531
|
// threat-severity detectors; every read is `has`-guarded in policy.
|
|
514
|
-
"malicious_package_detected"?:
|
|
515
|
-
"package_install_detected"?:
|
|
532
|
+
"malicious_package_detected"?: Bool,
|
|
533
|
+
"package_install_detected"?: Bool,
|
|
516
534
|
"package_check_status"?: String,
|
|
517
535
|
"max_threat_severity"?: Long,
|
|
518
536
|
|
|
@@ -540,14 +558,14 @@ namespace AgentOps {
|
|
|
540
558
|
"path"?: String,
|
|
541
559
|
|
|
542
560
|
// Security checks on file content (optional)
|
|
543
|
-
"secrets_detected"?:
|
|
561
|
+
"secrets_detected"?: Bool,
|
|
544
562
|
"secret_count"?: Long,
|
|
545
563
|
"secret_types"?: Set<String>,
|
|
546
|
-
"pii_detected"?:
|
|
564
|
+
"pii_detected"?: Bool,
|
|
547
565
|
"pii_types"?: Set<String>,
|
|
548
566
|
|
|
549
567
|
// Security - Path Traversal (optional)
|
|
550
|
-
"path_traversal_detected"?:
|
|
568
|
+
"path_traversal_detected"?: Bool,
|
|
551
569
|
"path_traversal_severity"?: String,
|
|
552
570
|
"path_traversal_type"?: String,
|
|
553
571
|
|
|
@@ -557,12 +575,12 @@ namespace AgentOps {
|
|
|
557
575
|
"detected_threats"?: Set<String>,
|
|
558
576
|
|
|
559
577
|
// Session Detection History (optional)
|
|
560
|
-
"session_pii_detected"?:
|
|
578
|
+
"session_pii_detected"?: Bool,
|
|
561
579
|
"session_pii_types"?: Set<String>,
|
|
562
|
-
"session_secrets_detected"?:
|
|
580
|
+
"session_secrets_detected"?: Bool,
|
|
563
581
|
"session_secret_types"?: Set<String>,
|
|
564
|
-
"session_injection_detected"?:
|
|
565
|
-
"session_command_injection"?:
|
|
582
|
+
"session_injection_detected"?: Bool,
|
|
583
|
+
"session_command_injection"?: Bool,
|
|
566
584
|
"session_threat_turns"?: Long,
|
|
567
585
|
"session_max_injection_score"?: Long,
|
|
568
586
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -592,14 +610,14 @@ namespace AgentOps {
|
|
|
592
610
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
593
611
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
594
612
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
595
|
-
"flow_sink_is_external"?:
|
|
613
|
+
"flow_sink_is_external"?: Bool,
|
|
596
614
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
597
615
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
598
616
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
599
617
|
|
|
600
618
|
// Usage Budget (optional)
|
|
601
619
|
"budget_remaining_pct"?: Long,
|
|
602
|
-
"budget_exceeded"?:
|
|
620
|
+
"budget_exceeded"?: Bool,
|
|
603
621
|
"budget_cost_micros_this_turn"?: Long,
|
|
604
622
|
"budget_model"?: String,
|
|
605
623
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -607,15 +625,15 @@ namespace AgentOps {
|
|
|
607
625
|
"budget_tokens_pct_monthly"?: Long,
|
|
608
626
|
"budget_cost_pct_daily"?: Long,
|
|
609
627
|
"budget_cost_pct_monthly"?: Long,
|
|
610
|
-
"budget_exceeded_session"?:
|
|
611
|
-
"budget_exceeded_daily"?:
|
|
612
|
-
"budget_exceeded_monthly"?:
|
|
628
|
+
"budget_exceeded_session"?: Bool,
|
|
629
|
+
"budget_exceeded_daily"?: Bool,
|
|
630
|
+
"budget_exceeded_monthly"?: Bool,
|
|
613
631
|
|
|
614
632
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
615
633
|
"rpm_remaining_pct"?: Long,
|
|
616
|
-
"rpm_exceeded"?:
|
|
634
|
+
"rpm_exceeded"?: Bool,
|
|
617
635
|
"tpm_remaining_pct"?: Long,
|
|
618
|
-
"tpm_exceeded"?:
|
|
636
|
+
"tpm_exceeded"?: Bool,
|
|
619
637
|
|
|
620
638
|
// Agent Identity (optional)
|
|
621
639
|
"agent_id"?: String,
|
|
@@ -648,18 +666,18 @@ namespace AgentOps {
|
|
|
648
666
|
"path"?: String,
|
|
649
667
|
|
|
650
668
|
// Security - Invisible Character Detection in write content (optional)
|
|
651
|
-
"invisible_chars_detected"?:
|
|
669
|
+
"invisible_chars_detected"?: Bool,
|
|
652
670
|
"invisible_chars_score"?: Long,
|
|
653
671
|
|
|
654
672
|
// Security checks on content being written (optional)
|
|
655
|
-
"secrets_detected"?:
|
|
673
|
+
"secrets_detected"?: Bool,
|
|
656
674
|
"secret_count"?: Long,
|
|
657
675
|
"secret_types"?: Set<String>,
|
|
658
|
-
"pii_detected"?:
|
|
676
|
+
"pii_detected"?: Bool,
|
|
659
677
|
"pii_types"?: Set<String>,
|
|
660
678
|
|
|
661
679
|
// Security - Path Traversal (optional)
|
|
662
|
-
"path_traversal_detected"?:
|
|
680
|
+
"path_traversal_detected"?: Bool,
|
|
663
681
|
"path_traversal_severity"?: String,
|
|
664
682
|
"path_traversal_type"?: String,
|
|
665
683
|
|
|
@@ -669,12 +687,12 @@ namespace AgentOps {
|
|
|
669
687
|
"detected_threats"?: Set<String>,
|
|
670
688
|
|
|
671
689
|
// Session Detection History (optional)
|
|
672
|
-
"session_pii_detected"?:
|
|
690
|
+
"session_pii_detected"?: Bool,
|
|
673
691
|
"session_pii_types"?: Set<String>,
|
|
674
|
-
"session_secrets_detected"?:
|
|
692
|
+
"session_secrets_detected"?: Bool,
|
|
675
693
|
"session_secret_types"?: Set<String>,
|
|
676
|
-
"session_injection_detected"?:
|
|
677
|
-
"session_command_injection"?:
|
|
694
|
+
"session_injection_detected"?: Bool,
|
|
695
|
+
"session_command_injection"?: Bool,
|
|
678
696
|
"session_threat_turns"?: Long,
|
|
679
697
|
"session_max_injection_score"?: Long,
|
|
680
698
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -704,14 +722,14 @@ namespace AgentOps {
|
|
|
704
722
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
705
723
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
706
724
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
707
|
-
"flow_sink_is_external"?:
|
|
725
|
+
"flow_sink_is_external"?: Bool,
|
|
708
726
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
709
727
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
710
728
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
711
729
|
|
|
712
730
|
// Usage Budget (optional)
|
|
713
731
|
"budget_remaining_pct"?: Long,
|
|
714
|
-
"budget_exceeded"?:
|
|
732
|
+
"budget_exceeded"?: Bool,
|
|
715
733
|
"budget_cost_micros_this_turn"?: Long,
|
|
716
734
|
"budget_model"?: String,
|
|
717
735
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -719,15 +737,15 @@ namespace AgentOps {
|
|
|
719
737
|
"budget_tokens_pct_monthly"?: Long,
|
|
720
738
|
"budget_cost_pct_daily"?: Long,
|
|
721
739
|
"budget_cost_pct_monthly"?: Long,
|
|
722
|
-
"budget_exceeded_session"?:
|
|
723
|
-
"budget_exceeded_daily"?:
|
|
724
|
-
"budget_exceeded_monthly"?:
|
|
740
|
+
"budget_exceeded_session"?: Bool,
|
|
741
|
+
"budget_exceeded_daily"?: Bool,
|
|
742
|
+
"budget_exceeded_monthly"?: Bool,
|
|
725
743
|
|
|
726
744
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
727
745
|
"rpm_remaining_pct"?: Long,
|
|
728
|
-
"rpm_exceeded"?:
|
|
746
|
+
"rpm_exceeded"?: Bool,
|
|
729
747
|
"tpm_remaining_pct"?: Long,
|
|
730
|
-
"tpm_exceeded"?:
|
|
748
|
+
"tpm_exceeded"?: Bool,
|
|
731
749
|
|
|
732
750
|
// Agent Identity (optional)
|
|
733
751
|
"agent_id"?: String,
|
|
@@ -758,20 +776,20 @@ namespace AgentOps {
|
|
|
758
776
|
|
|
759
777
|
// MCP context (optional)
|
|
760
778
|
"mcp_server"?: String,
|
|
761
|
-
"mcp_server_verified"?:
|
|
779
|
+
"mcp_server_verified"?: Bool,
|
|
762
780
|
|
|
763
781
|
// Agentic - Agent Security (optional)
|
|
764
|
-
"tool_poisoning_detected"?:
|
|
782
|
+
"tool_poisoning_detected"?: Bool,
|
|
765
783
|
"tool_poisoning_score"?: Long,
|
|
766
784
|
"tool_poisoning_type"?: String,
|
|
767
785
|
|
|
768
786
|
// Agentic - MCP Risk (optional)
|
|
769
|
-
"mcp_config_risk"?:
|
|
787
|
+
"mcp_config_risk"?: Bool,
|
|
770
788
|
"mcp_risk_type"?: String,
|
|
771
789
|
"mcp_risk_score"?: Long,
|
|
772
790
|
|
|
773
791
|
// Security - Cross-Origin Escalation (optional)
|
|
774
|
-
"cross_origin_detected"?:
|
|
792
|
+
"cross_origin_detected"?: Bool,
|
|
775
793
|
"cross_origin_type"?: String,
|
|
776
794
|
"cross_origin_score"?: Long,
|
|
777
795
|
|
|
@@ -781,12 +799,12 @@ namespace AgentOps {
|
|
|
781
799
|
"detected_threats"?: Set<String>,
|
|
782
800
|
|
|
783
801
|
// Session Detection History (optional)
|
|
784
|
-
"session_pii_detected"?:
|
|
802
|
+
"session_pii_detected"?: Bool,
|
|
785
803
|
"session_pii_types"?: Set<String>,
|
|
786
|
-
"session_secrets_detected"?:
|
|
804
|
+
"session_secrets_detected"?: Bool,
|
|
787
805
|
"session_secret_types"?: Set<String>,
|
|
788
|
-
"session_injection_detected"?:
|
|
789
|
-
"session_command_injection"?:
|
|
806
|
+
"session_injection_detected"?: Bool,
|
|
807
|
+
"session_command_injection"?: Bool,
|
|
790
808
|
"session_threat_turns"?: Long,
|
|
791
809
|
"session_max_injection_score"?: Long,
|
|
792
810
|
"session_max_jailbreak_score"?: Long,
|
|
@@ -816,14 +834,14 @@ namespace AgentOps {
|
|
|
816
834
|
"flow_resolution_status"?: String, // "known" | "inferred" | "unknown" | "conflicted"
|
|
817
835
|
"flow_origins"?: Set<String>, // "mcp_tool_result" | "model" | "file" | "database" | "user"
|
|
818
836
|
"flow_sink"?: String, // "external_model" | "local_model" | "external_mcp" | "trusted_mcp" | "user_secure_output" | "public_network" | "file"
|
|
819
|
-
"flow_sink_is_external"?:
|
|
837
|
+
"flow_sink_is_external"?: Bool,
|
|
820
838
|
"flow_sink_effects"?: Set<String>, // "network.send" | "financial.transfer" | "filesystem.write" | ...
|
|
821
839
|
"principal_clearances"?: Set<String>, // ADR 0020 D8 — clearances AuthN mints for the principal
|
|
822
840
|
"principal_compartments"?: Set<String>, // ADR 0020 D8 — compartments the principal is admitted to
|
|
823
841
|
|
|
824
842
|
// Usage Budget (optional)
|
|
825
843
|
"budget_remaining_pct"?: Long,
|
|
826
|
-
"budget_exceeded"?:
|
|
844
|
+
"budget_exceeded"?: Bool,
|
|
827
845
|
"budget_cost_micros_this_turn"?: Long,
|
|
828
846
|
"budget_model"?: String,
|
|
829
847
|
"budget_tokens_pct_session"?: Long,
|
|
@@ -831,15 +849,15 @@ namespace AgentOps {
|
|
|
831
849
|
"budget_tokens_pct_monthly"?: Long,
|
|
832
850
|
"budget_cost_pct_daily"?: Long,
|
|
833
851
|
"budget_cost_pct_monthly"?: Long,
|
|
834
|
-
"budget_exceeded_session"?:
|
|
835
|
-
"budget_exceeded_daily"?:
|
|
836
|
-
"budget_exceeded_monthly"?:
|
|
852
|
+
"budget_exceeded_session"?: Bool,
|
|
853
|
+
"budget_exceeded_daily"?: Bool,
|
|
854
|
+
"budget_exceeded_monthly"?: Bool,
|
|
837
855
|
|
|
838
856
|
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
839
857
|
"rpm_remaining_pct"?: Long,
|
|
840
|
-
"rpm_exceeded"?:
|
|
858
|
+
"rpm_exceeded"?: Bool,
|
|
841
859
|
"tpm_remaining_pct"?: Long,
|
|
842
|
-
"tpm_exceeded"?:
|
|
860
|
+
"tpm_exceeded"?: Bool,
|
|
843
861
|
|
|
844
862
|
// Agent Identity (optional)
|
|
845
863
|
"agent_id"?: String,
|
|
@@ -851,8 +869,8 @@ namespace AgentOps {
|
|
|
851
869
|
// Supply-chain / package safety + aggregate threat severity (optional —
|
|
852
870
|
// ADR 0012 unified port). Projected by Shield's malicious-package and
|
|
853
871
|
// threat-severity detectors; every read is `has`-guarded in policy.
|
|
854
|
-
"malicious_package_detected"?:
|
|
855
|
-
"package_install_detected"?:
|
|
872
|
+
"malicious_package_detected"?: Bool,
|
|
873
|
+
"package_install_detected"?: Bool,
|
|
856
874
|
"package_check_status"?: String,
|
|
857
875
|
"max_threat_severity"?: Long,
|
|
858
876
|
|
|
@@ -898,7 +916,7 @@ namespace AgentOps {
|
|
|
898
916
|
// requested (i.e. whenever egress_hosts is non-empty), so a "no network"
|
|
899
917
|
// profile can gate on this single boolean. egress_hosts then narrows the
|
|
900
918
|
// host allowlist for profiles that DO permit egress.
|
|
901
|
-
"network_egress"?:
|
|
919
|
+
"network_egress"?: Bool,
|
|
902
920
|
"egress_hosts"?: Set<String>, // Host allowlist for egress, e.g. {"pypi.org"}
|
|
903
921
|
"exec_allowlist"?: Set<String>, // Executables the sandbox may run, e.g. {"python", "python3"}
|
|
904
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 {
|