@highflame/policy 2.2.34 → 2.2.36

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.
Files changed (39) hide show
  1. package/_schemas/agent_ops/context.json +30 -0
  2. package/_schemas/agent_ops/schema.cedarschema +7 -0
  3. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_safety.cedar +3 -17
  4. package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +7 -19
  5. package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +7 -33
  6. package/_schemas/agent_ops/templates/templates.json +4 -6
  7. package/_schemas/ai_gateway/context.json +30 -0
  8. package/_schemas/ai_gateway/schema.cedarschema +7 -0
  9. package/_schemas/ai_gateway/templates/defaults/tools.cedar +3 -17
  10. package/_schemas/ai_gateway/templates/templates.json +1 -2
  11. package/_schemas/guardrails/context.json +30 -0
  12. package/_schemas/guardrails/schema.cedarschema +7 -0
  13. package/_schemas/guardrails/templates/defaults/security_patterns.cedar +7 -19
  14. package/_schemas/guardrails/templates/profiles/multi_agent/agent_safety.cedar +3 -17
  15. package/_schemas/guardrails/templates/templates.json +4 -6
  16. package/_schemas/overwatch/context.json +30 -0
  17. package/_schemas/overwatch/schema.cedarschema +7 -0
  18. package/_schemas/sentry/templates/templates.json +0 -14
  19. package/dist/agent_ops-context.gen.d.ts +6 -1
  20. package/dist/agent_ops-context.gen.js +10 -0
  21. package/dist/agent_ops-defaults.gen.js +25 -79
  22. package/dist/ai_gateway-context.gen.d.ts +6 -1
  23. package/dist/ai_gateway-context.gen.js +10 -0
  24. package/dist/ai_gateway-defaults.gen.js +6 -21
  25. package/dist/ai_gateway-detectors.gen.js +6 -1
  26. package/dist/guardrails-context.gen.d.ts +6 -1
  27. package/dist/guardrails-context.gen.js +10 -0
  28. package/dist/guardrails-defaults.gen.js +18 -46
  29. package/dist/guardrails-detectors.gen.js +6 -1
  30. package/dist/overwatch-context.gen.d.ts +6 -1
  31. package/dist/overwatch-context.gen.js +10 -0
  32. package/dist/overwatch-defaults.gen.js +11 -37
  33. package/dist/overwatch-detectors.gen.js +6 -1
  34. package/dist/sentry-defaults.gen.d.ts +1 -1
  35. package/dist/sentry-defaults.gen.js +0 -56
  36. package/dist/service-schemas.gen.d.ts +4 -4
  37. package/dist/service-schemas.gen.js +48 -0
  38. package/package.json +1 -1
  39. package/_schemas/sentry/templates/defaults/file_safety.cedar +0 -31
@@ -41,6 +41,7 @@ export declare const AgentOpsContextKey: {
41
41
  readonly EncodedTypes: "encoded_types";
42
42
  readonly Event: "event";
43
43
  readonly ExecAllowlist: "exec_allowlist";
44
+ readonly ExecTargetPaths: "exec_target_paths";
44
45
  readonly FactualityScore: "factuality_score";
45
46
  readonly FlowCompartments: "flow_compartments";
46
47
  readonly FlowConfidentiality: "flow_confidentiality";
@@ -108,7 +109,9 @@ export declare const AgentOpsContextKey: {
108
109
  readonly PrincipalCompartments: "principal_compartments";
109
110
  readonly PrivilegeScope: "privilege_scope";
110
111
  readonly ProfanityScore: "profanity_score";
112
+ readonly ReadTargetPaths: "read_target_paths";
111
113
  readonly RequestId: "request_id";
114
+ readonly ResolvedTargetPaths: "resolved_target_paths";
112
115
  readonly Role: "role";
113
116
  readonly RpmExceeded: "rpm_exceeded";
114
117
  readonly RpmRemainingPct: "rpm_remaining_pct";
@@ -158,15 +161,17 @@ export declare const AgentOpsContextKey: {
158
161
  readonly TopicConfidence: "topic_confidence";
159
162
  readonly TpmExceeded: "tpm_exceeded";
160
163
  readonly TpmRemainingPct: "tpm_remaining_pct";
164
+ readonly UnresolvedTarget: "unresolved_target";
161
165
  readonly UserEmail: "user_email";
162
166
  readonly ViolenceScore: "violence_score";
163
167
  readonly WeaponsScore: "weapons_score";
164
168
  readonly WorkspaceRoot: "workspace_root";
165
169
  readonly WritablePaths: "writable_paths";
170
+ readonly WriteTargetPaths: "write_target_paths";
166
171
  };
167
172
  export type AgentOpsContextKey = (typeof AgentOpsContextKey)[keyof typeof AgentOpsContextKey];
168
173
  /**
169
174
  * The full set of authorable context attribute keys for AgentOps.
170
175
  * Iterate this to enumerate the authorable surface (cockpit, conformance).
171
176
  */
172
- export declare const AgentOpsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "cwd", "detected_language", "detected_script", "detected_threats", "detector_count", "direction", "egress_hosts", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "event", "exec_allowlist", "factuality_score", "flow_compartments", "flow_confidentiality", "flow_data_types", "flow_integrity", "flow_origins", "flow_resolution_status", "flow_sink", "flow_sink_effects", "flow_sink_is_external", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "isolation_tier", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "mechanism_capabilities", "model_name", "model_provider", "multi_turn_detection", "network_egress", "package_check_status", "package_install_detected", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "principal_clearances", "principal_compartments", "privilege_scope", "profanity_score", "request_id", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "surface", "suspicious_pattern", "threat_categories", "threat_count", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "user_email", "violence_score", "weapons_score", "workspace_root", "writable_paths"];
177
+ export declare const AgentOpsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "cwd", "detected_language", "detected_script", "detected_threats", "detector_count", "direction", "egress_hosts", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "event", "exec_allowlist", "exec_target_paths", "factuality_score", "flow_compartments", "flow_confidentiality", "flow_data_types", "flow_integrity", "flow_origins", "flow_resolution_status", "flow_sink", "flow_sink_effects", "flow_sink_is_external", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "isolation_tier", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "mechanism_capabilities", "model_name", "model_provider", "multi_turn_detection", "network_egress", "package_check_status", "package_install_detected", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "principal_clearances", "principal_compartments", "privilege_scope", "profanity_score", "read_target_paths", "request_id", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "source", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "surface", "suspicious_pattern", "threat_categories", "threat_count", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "user_email", "violence_score", "weapons_score", "workspace_root", "writable_paths", "write_target_paths"];
@@ -43,6 +43,7 @@ export const AgentOpsContextKey = {
43
43
  EncodedTypes: 'encoded_types',
44
44
  Event: 'event',
45
45
  ExecAllowlist: 'exec_allowlist',
46
+ ExecTargetPaths: 'exec_target_paths',
46
47
  FactualityScore: 'factuality_score',
47
48
  FlowCompartments: 'flow_compartments',
48
49
  FlowConfidentiality: 'flow_confidentiality',
@@ -110,7 +111,9 @@ export const AgentOpsContextKey = {
110
111
  PrincipalCompartments: 'principal_compartments',
111
112
  PrivilegeScope: 'privilege_scope',
112
113
  ProfanityScore: 'profanity_score',
114
+ ReadTargetPaths: 'read_target_paths',
113
115
  RequestId: 'request_id',
116
+ ResolvedTargetPaths: 'resolved_target_paths',
114
117
  Role: 'role',
115
118
  RpmExceeded: 'rpm_exceeded',
116
119
  RpmRemainingPct: 'rpm_remaining_pct',
@@ -160,11 +163,13 @@ export const AgentOpsContextKey = {
160
163
  TopicConfidence: 'topic_confidence',
161
164
  TpmExceeded: 'tpm_exceeded',
162
165
  TpmRemainingPct: 'tpm_remaining_pct',
166
+ UnresolvedTarget: 'unresolved_target',
163
167
  UserEmail: 'user_email',
164
168
  ViolenceScore: 'violence_score',
165
169
  WeaponsScore: 'weapons_score',
166
170
  WorkspaceRoot: 'workspace_root',
167
171
  WritablePaths: 'writable_paths',
172
+ WriteTargetPaths: 'write_target_paths',
168
173
  };
169
174
  /**
170
175
  * The full set of authorable context attribute keys for AgentOps.
@@ -207,6 +212,7 @@ export const AgentOpsContextKeys = [
207
212
  AgentOpsContextKey.EncodedTypes,
208
213
  AgentOpsContextKey.Event,
209
214
  AgentOpsContextKey.ExecAllowlist,
215
+ AgentOpsContextKey.ExecTargetPaths,
210
216
  AgentOpsContextKey.FactualityScore,
211
217
  AgentOpsContextKey.FlowCompartments,
212
218
  AgentOpsContextKey.FlowConfidentiality,
@@ -274,7 +280,9 @@ export const AgentOpsContextKeys = [
274
280
  AgentOpsContextKey.PrincipalCompartments,
275
281
  AgentOpsContextKey.PrivilegeScope,
276
282
  AgentOpsContextKey.ProfanityScore,
283
+ AgentOpsContextKey.ReadTargetPaths,
277
284
  AgentOpsContextKey.RequestId,
285
+ AgentOpsContextKey.ResolvedTargetPaths,
278
286
  AgentOpsContextKey.Role,
279
287
  AgentOpsContextKey.RpmExceeded,
280
288
  AgentOpsContextKey.RpmRemainingPct,
@@ -324,9 +332,11 @@ export const AgentOpsContextKeys = [
324
332
  AgentOpsContextKey.TopicConfidence,
325
333
  AgentOpsContextKey.TpmExceeded,
326
334
  AgentOpsContextKey.TpmRemainingPct,
335
+ AgentOpsContextKey.UnresolvedTarget,
327
336
  AgentOpsContextKey.UserEmail,
328
337
  AgentOpsContextKey.ViolenceScore,
329
338
  AgentOpsContextKey.WeaponsScore,
330
339
  AgentOpsContextKey.WorkspaceRoot,
331
340
  AgentOpsContextKey.WritablePaths,
341
+ AgentOpsContextKey.WriteTargetPaths,
332
342
  ];
@@ -1263,38 +1263,26 @@ when {
1263
1263
  const AGENT_OPS_SECURITY_PATTERNS_CEDAR = `// =============================================================================
1264
1264
  // Security Pattern Detection (Default)
1265
1265
  // =============================================================================
1266
- // Blocks command injection, path traversal, and SQL injection using
1267
- // regex-based pattern detection from Shield's security detectors.
1266
+ // Blocks path traversal and SQL injection using regex-based pattern detection
1267
+ // from Shield's security detectors.
1268
+ //
1269
+ // The command-injection rule was removed while that detector is disabled, so
1270
+ // this template cannot instantiate a rule that can never fire. See
1271
+ // highflame-shield#386; restore the rule when the detector is re-enabled.
1268
1272
  //
1269
1273
  // Context keys consumed:
1270
- // - command_injection_detected: Bool
1271
1274
  // - path_traversal_detected: Bool
1272
1275
  // - path_traversal_severity: String
1273
1276
  // - sql_injection_detected: Bool
1274
1277
  // - sql_injection_score: Long (0-100)
1275
1278
  //
1276
1279
  // Compliance:
1277
- // - MITRE T1059 (Command Injection), T1005 (Data from Local System)
1280
+ // - MITRE T1005 (Data from Local System)
1278
1281
  //
1279
1282
  // Category: security
1280
1283
  // Namespace: AgentOps
1281
1284
  // =============================================================================
1282
1285
 
1283
- @id("security.block-command-injection")
1284
- @name("Block command injection")
1285
- @description("Blocks process_prompt and call_tool when command_injection_detected is true.")
1286
- @severity("critical")
1287
- @tags("category:security,threat:command-injection,detection:pattern,mitre:t1059")
1288
- @reject_message("Request blocked: command injection pattern detected — reverse shell, destructive command, or privilege escalation.")
1289
- forbid (
1290
- principal,
1291
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
1292
- resource
1293
- )
1294
- when {
1295
- context has command_injection_detected && context.command_injection_detected == true
1296
- };
1297
-
1298
1286
  @id("security.block-path-traversal")
1299
1287
  @name("Block path traversal")
1300
1288
  @description("Blocks process_prompt, call_tool, read_file, and write_file when path_traversal_detected is true and severity is high or critical.")
@@ -2552,7 +2540,6 @@ const AGENT_OPS_AGENT_IDENTITY_MULTI_AGENT_SAFETY_CEDAR = `// ==================
2552
2540
  // - agent_trust_level, agent_type, tool_name, tool_is_sensitive
2553
2541
  // - session_pii_detected, session_pii_types
2554
2542
  // - session_secrets_detected, session_injection_detected
2555
- // - session_command_injection
2556
2543
  // - session_threat_turns: Long
2557
2544
  // - session_cumulative_risk_score: Long
2558
2545
  // - suspicious_pattern: Bool
@@ -2648,22 +2635,9 @@ when {
2648
2635
  context has session_injection_detected && context.session_injection_detected == true
2649
2636
  };
2650
2637
 
2651
- @id("agent-identity.multi-agent-post-command-injection-shell")
2652
- @name("Block shell after command injection in session")
2653
- @description("Blocks call_tool when session_command_injection is true and tool_name is a shell tool.")
2654
- @severity("critical")
2655
- @tags("category:agent-identity,threat:command-injection,scope:per-agent,detection:aggregate,surface:call-tool,mitre:t1059")
2656
- @reject_message("Tool execution blocked: command injection was detected earlier in this session — no agent may execute shell commands afterwards.")
2657
- forbid (
2658
- principal is AgentOps::Agent,
2659
- action == AgentOps::Action::"call_tool",
2660
- resource
2661
- )
2662
- when {
2663
- context has session_command_injection && context.session_command_injection == true &&
2664
- context has tool_name &&
2665
- (context.tool_name == "shell" || context.tool_name == "execute_command" || context.tool_name == "bash")
2666
- };
2638
+ // The post-command-injection shell rule was removed while that detector is
2639
+ // disabled, so this template cannot instantiate a rule that can never fire.
2640
+ // See highflame-shield#386; restore it when the detector is re-enabled.
2667
2641
 
2668
2642
  // ---------------------------------------------------------------------------
2669
2643
  // Section 4: Cumulative risk circuit breakers
@@ -3918,11 +3892,15 @@ when {
3918
3892
  const AGENT_OPS_SEMANTIC_DEFAULTS_CEDAR = `// =============================================================================
3919
3893
  // Semantic Threat Detection (Default)
3920
3894
  // =============================================================================
3921
- // Blocks injection attacks (command, SQL, path traversal), prompt injection,
3922
- // jailbreak attempts, and encoded payloads using two detection tiers:
3895
+ // Blocks injection attacks (SQL, path traversal), prompt injection, jailbreak
3896
+ // attempts, and encoded payloads using two detection tiers:
3923
3897
  //
3924
3898
  // Tier 1 — Pattern-based (always available, no external dependency)
3925
- // command_injection, sql_injection, path_traversal, detect_encoded
3899
+ // sql_injection, path_traversal, detect_encoded
3900
+ //
3901
+ // The command-injection rules were removed while that detector is disabled, so
3902
+ // this template cannot instantiate rules that can never fire. See
3903
+ // highflame-shield#386; restore them when the detector is re-enabled.
3926
3904
  //
3927
3905
  // Tier 2 — ML classifiers (require Highflame API token)
3928
3906
  // injection_score, jailbreak_score
@@ -3947,36 +3925,6 @@ const AGENT_OPS_SEMANTIC_DEFAULTS_CEDAR = `// ==================================
3947
3925
  // Tier 1: Pattern-based injection detection
3948
3926
  // ---------------------------------------------------------------------------
3949
3927
 
3950
- @id("semantic.block-command-injection-tool")
3951
- @name("Block command injection in tool calls")
3952
- @description("Blocks call_tool when detected_threats contains \\"command_injection\\".")
3953
- @severity("critical")
3954
- @tags("category:semantic,threat:command-injection,detection:pattern,surface:call-tool,mitre:t1059,owasp:asi02")
3955
- @reject_message("Tool execution blocked: command injection pattern detected — reverse shell, destructive command, or privilege escalation.")
3956
- forbid (
3957
- principal,
3958
- action == AgentOps::Action::"call_tool",
3959
- resource
3960
- )
3961
- when {
3962
- context has detected_threats && context.detected_threats.contains("command_injection")
3963
- };
3964
-
3965
- @id("semantic.block-command-injection-prompt")
3966
- @name("Block command injection in prompts")
3967
- @description("Blocks process_prompt when detected_threats contains \\"command_injection\\".")
3968
- @severity("critical")
3969
- @tags("category:semantic,threat:command-injection,detection:pattern,surface:process-prompt,mitre:t1059")
3970
- @reject_message("Prompt blocked: command injection pattern detected.")
3971
- forbid (
3972
- principal,
3973
- action == AgentOps::Action::"process_prompt",
3974
- resource
3975
- )
3976
- when {
3977
- context has detected_threats && context.detected_threats.contains("command_injection")
3978
- };
3979
-
3980
3928
  @id("semantic.block-sql-injection-tool")
3981
3929
  @name("Block SQL injection in tool calls")
3982
3930
  @description("Blocks call_tool when detected_threats contains \\"sql_injection\\".")
@@ -4690,11 +4638,11 @@ export const AGENT_OPS_TEMPLATES = [
4690
4638
  {
4691
4639
  id: 'security.patterns',
4692
4640
  name: 'Security Pattern Detection',
4693
- description: 'Block command injection, path traversal, and SQL injection using regex-based pattern detection.',
4641
+ description: 'Block path traversal and SQL injection using regex-based pattern detection.',
4694
4642
  category: 'threat-detection',
4695
4643
  cedarText: AGENT_OPS_SECURITY_PATTERNS_CEDAR,
4696
- severity: 'critical',
4697
- tags: ['category:security', 'threat:command-injection', 'threat:sql-injection', 'threat:path-traversal', 'detection:pattern', 'mitre:t1059'],
4644
+ severity: 'high',
4645
+ tags: ['category:security', 'threat:sql-injection', 'threat:path-traversal', 'detection:pattern'],
4698
4646
  },
4699
4647
  {
4700
4648
  id: 'trust-safety.semantic',
@@ -4924,7 +4872,7 @@ export const AGENT_OPS_TEMPLATES = [
4924
4872
  {
4925
4873
  id: 'semantic.defaults',
4926
4874
  name: 'Semantic Threat Detection',
4927
- description: 'Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.',
4875
+ description: 'Block injection attacks (SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.',
4928
4876
  category: 'threat-detection',
4929
4877
  cedarText: AGENT_OPS_SEMANTIC_DEFAULTS_CEDAR,
4930
4878
  severity: 'critical',
@@ -5251,17 +5199,15 @@ export const AGENT_OPS_TEMPLATES_JSON = `{
5251
5199
  {
5252
5200
  "id": "security.patterns",
5253
5201
  "name": "Security Pattern Detection",
5254
- "description": "Block command injection, path traversal, and SQL injection using regex-based pattern detection.",
5202
+ "description": "Block path traversal and SQL injection using regex-based pattern detection.",
5255
5203
  "category": "threat-detection",
5256
5204
  "file": "ported/threat-detection/security_patterns.cedar",
5257
- "severity": "critical",
5205
+ "severity": "high",
5258
5206
  "tags": [
5259
5207
  "category:security",
5260
- "threat:command-injection",
5261
5208
  "threat:sql-injection",
5262
5209
  "threat:path-traversal",
5263
- "detection:pattern",
5264
- "mitre:t1059"
5210
+ "detection:pattern"
5265
5211
  ]
5266
5212
  },
5267
5213
  {
@@ -5610,7 +5556,7 @@ export const AGENT_OPS_TEMPLATES_JSON = `{
5610
5556
  {
5611
5557
  "id": "semantic.defaults",
5612
5558
  "name": "Semantic Threat Detection",
5613
- "description": "Block injection attacks (command, SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.",
5559
+ "description": "Block injection attacks (SQL, path, encoded) plus ML-detected prompt injection and jailbreak attempts.",
5614
5560
  "category": "threat-detection",
5615
5561
  "file": "ported/threat-detection/semantic_defaults.cedar",
5616
5562
  "severity": "critical",
@@ -8,6 +8,7 @@ export declare const AiGatewayContextKey: {
8
8
  readonly Content: "content";
9
9
  readonly CrimeScore: "crime_score";
10
10
  readonly DetectedThreats: "detected_threats";
11
+ readonly ExecTargetPaths: "exec_target_paths";
11
12
  readonly HateSpeechScore: "hate_speech_score";
12
13
  readonly HighestSeverity: "highest_severity";
13
14
  readonly IndirectInjectionScore: "indirect_injection_score";
@@ -42,6 +43,8 @@ export declare const AiGatewayContextKey: {
42
43
  readonly PiiTypes: "pii_types";
43
44
  readonly PrivilegeScope: "privilege_scope";
44
45
  readonly ProfanityScore: "profanity_score";
46
+ readonly ReadTargetPaths: "read_target_paths";
47
+ readonly ResolvedTargetPaths: "resolved_target_paths";
45
48
  readonly Role: "role";
46
49
  readonly RpmExceeded: "rpm_exceeded";
47
50
  readonly RpmRemainingPct: "rpm_remaining_pct";
@@ -78,12 +81,14 @@ export declare const AiGatewayContextKey: {
78
81
  readonly ToolRiskScore: "tool_risk_score";
79
82
  readonly TpmExceeded: "tpm_exceeded";
80
83
  readonly TpmRemainingPct: "tpm_remaining_pct";
84
+ readonly UnresolvedTarget: "unresolved_target";
81
85
  readonly ViolenceScore: "violence_score";
82
86
  readonly WeaponsScore: "weapons_score";
87
+ readonly WriteTargetPaths: "write_target_paths";
83
88
  };
84
89
  export type AiGatewayContextKey = (typeof AiGatewayContextKey)[keyof typeof AiGatewayContextKey];
85
90
  /**
86
91
  * The full set of authorable context attribute keys for AiGateway.
87
92
  * Iterate this to enumerate the authorable surface (cockpit, conformance).
88
93
  */
89
- export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
94
+ export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "exec_target_paths", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "malicious_package_detected", "malicious_package_score", "malicious_packages", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "read_target_paths", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "violence_score", "weapons_score", "write_target_paths"];
@@ -10,6 +10,7 @@ export const AiGatewayContextKey = {
10
10
  Content: 'content',
11
11
  CrimeScore: 'crime_score',
12
12
  DetectedThreats: 'detected_threats',
13
+ ExecTargetPaths: 'exec_target_paths',
13
14
  HateSpeechScore: 'hate_speech_score',
14
15
  HighestSeverity: 'highest_severity',
15
16
  IndirectInjectionScore: 'indirect_injection_score',
@@ -44,6 +45,8 @@ export const AiGatewayContextKey = {
44
45
  PiiTypes: 'pii_types',
45
46
  PrivilegeScope: 'privilege_scope',
46
47
  ProfanityScore: 'profanity_score',
48
+ ReadTargetPaths: 'read_target_paths',
49
+ ResolvedTargetPaths: 'resolved_target_paths',
47
50
  Role: 'role',
48
51
  RpmExceeded: 'rpm_exceeded',
49
52
  RpmRemainingPct: 'rpm_remaining_pct',
@@ -80,8 +83,10 @@ export const AiGatewayContextKey = {
80
83
  ToolRiskScore: 'tool_risk_score',
81
84
  TpmExceeded: 'tpm_exceeded',
82
85
  TpmRemainingPct: 'tpm_remaining_pct',
86
+ UnresolvedTarget: 'unresolved_target',
83
87
  ViolenceScore: 'violence_score',
84
88
  WeaponsScore: 'weapons_score',
89
+ WriteTargetPaths: 'write_target_paths',
85
90
  };
86
91
  /**
87
92
  * The full set of authorable context attribute keys for AiGateway.
@@ -91,6 +96,7 @@ export const AiGatewayContextKeys = [
91
96
  AiGatewayContextKey.Content,
92
97
  AiGatewayContextKey.CrimeScore,
93
98
  AiGatewayContextKey.DetectedThreats,
99
+ AiGatewayContextKey.ExecTargetPaths,
94
100
  AiGatewayContextKey.HateSpeechScore,
95
101
  AiGatewayContextKey.HighestSeverity,
96
102
  AiGatewayContextKey.IndirectInjectionScore,
@@ -125,6 +131,8 @@ export const AiGatewayContextKeys = [
125
131
  AiGatewayContextKey.PiiTypes,
126
132
  AiGatewayContextKey.PrivilegeScope,
127
133
  AiGatewayContextKey.ProfanityScore,
134
+ AiGatewayContextKey.ReadTargetPaths,
135
+ AiGatewayContextKey.ResolvedTargetPaths,
128
136
  AiGatewayContextKey.Role,
129
137
  AiGatewayContextKey.RpmExceeded,
130
138
  AiGatewayContextKey.RpmRemainingPct,
@@ -161,6 +169,8 @@ export const AiGatewayContextKeys = [
161
169
  AiGatewayContextKey.ToolRiskScore,
162
170
  AiGatewayContextKey.TpmExceeded,
163
171
  AiGatewayContextKey.TpmRemainingPct,
172
+ AiGatewayContextKey.UnresolvedTarget,
164
173
  AiGatewayContextKey.ViolenceScore,
165
174
  AiGatewayContextKey.WeaponsScore,
175
+ AiGatewayContextKey.WriteTargetPaths,
166
176
  ];
@@ -168,7 +168,6 @@ const AI_GATEWAY_TOOLS_DEFAULTS_CEDAR = `// ====================================
168
168
  // - Computed risk score (tool_risk_score)
169
169
  // - Detector category labels (tool_category, tool_is_sensitive)
170
170
  // - Threat aggregation (threat_count, max_threat_severity)
171
- // - Detection rule triggers (detected_threats)
172
171
  //
173
172
  // Context keys consumed:
174
173
  // - tool_risk_score: Long (0-100)
@@ -176,11 +175,9 @@ const AI_GATEWAY_TOOLS_DEFAULTS_CEDAR = `// ====================================
176
175
  // - tool_is_sensitive: Bool
177
176
  // - threat_count: Long
178
177
  // - max_threat_severity: Long (0-4)
179
- // - detected_threats: Set<String>
180
178
  //
181
179
  // Compliance:
182
180
  // - OWASP LLM06, OWASP ASI02
183
- // - MITRE T1059
184
181
  //
185
182
  // Category: tools
186
183
  // Namespace: AIGateway
@@ -248,20 +245,9 @@ when {
248
245
  context.threat_count >= 1 && context.max_threat_severity >= 3
249
246
  };
250
247
 
251
- @id("tools.block-command-injection")
252
- @name("Block command injection")
253
- @description("Blocks call_tool when detected_threats contains \\"command_injection\\".")
254
- @severity("critical")
255
- @tags("category:tools,threat:command-injection,detection:rule,surface:call-tool,mitre:t1059,owasp:asi02")
256
- @reject_message("Tool execution blocked: command injection pattern detected in tool arguments.")
257
- forbid (
258
- principal,
259
- action == AIGateway::Action::"call_tool",
260
- resource
261
- )
262
- when {
263
- context has detected_threats && context.detected_threats.contains("command_injection")
264
- };
248
+ // The command-injection rule was removed while that detector is disabled, so
249
+ // this template cannot instantiate a rule that can never fire. See
250
+ // highflame-shield#386; restore it when the detector is re-enabled.
265
251
  `;
266
252
  const AI_GATEWAY_AGENT_SECURITY_DEFAULTS_CEDAR = `// =============================================================================
267
253
  // Agent Security (Default)
@@ -1411,11 +1397,11 @@ export const AI_GATEWAY_TEMPLATES = [
1411
1397
  {
1412
1398
  id: 'tools.defaults',
1413
1399
  name: 'Tool Permissioning',
1414
- description: 'Enforce tool risk scoring, block dangerous tools, and detect command injection in MCP tool arguments.',
1400
+ description: 'Enforce tool risk scoring and block dangerous tools in MCP tool arguments.',
1415
1401
  category: 'tools',
1416
1402
  cedarText: AI_GATEWAY_TOOLS_DEFAULTS_CEDAR,
1417
1403
  severity: 'critical',
1418
- tags: ['category:tools', 'threat:command-injection', 'owasp:llm06', 'owasp:asi02'],
1404
+ tags: ['category:tools', 'owasp:llm06', 'owasp:asi02'],
1419
1405
  },
1420
1406
  {
1421
1407
  id: 'agent-security.defaults',
@@ -1571,13 +1557,12 @@ export const AI_GATEWAY_TEMPLATES_JSON = `{
1571
1557
  {
1572
1558
  "id": "tools.defaults",
1573
1559
  "name": "Tool Permissioning",
1574
- "description": "Enforce tool risk scoring, block dangerous tools, and detect command injection in MCP tool arguments.",
1560
+ "description": "Enforce tool risk scoring and block dangerous tools in MCP tool arguments.",
1575
1561
  "category": "tools",
1576
1562
  "file": "defaults/tools.cedar",
1577
1563
  "severity": "critical",
1578
1564
  "tags": [
1579
1565
  "category:tools",
1580
- "threat:command-injection",
1581
1566
  "owasp:llm06",
1582
1567
  "owasp:asi02"
1583
1568
  ]
@@ -107,7 +107,7 @@ export const AI_GATEWAY_DETECTORS = [
107
107
  inhouse: false,
108
108
  model: null,
109
109
  latencyP50Ms: 1,
110
- emits: [{ name: "tool_name", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_category", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_is_builtin", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_is_sensitive", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_operation_classes", type: "Set<String>", modifiable: false, semantic: "category_set" }, { name: "tool_risk_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "Tool-call risk score (0-100)." }],
110
+ emits: [{ name: "tool_name", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_category", type: "String", modifiable: false, semantic: "category_label" }, { name: "tool_is_builtin", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_is_sensitive", type: "Bool", modifiable: false, semantic: "boolean_flag" }, { name: "tool_operation_classes", type: "Set<String>", modifiable: false, semantic: "category_set" }, { name: "resolved_target_paths", type: "String", modifiable: false, description: "Newline-delimited (leading+trailing \\n) union of statically-resolved absolute target paths, any capability. Cedar `like` is anchored so patterns start with `*`: sub-tree `*\\n/etc/*`, bare dir `*\\n/etc\\n*`, exact `*\\n/etc/passwd\\n*`." }, { name: "read_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths the command reads or enumerates. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "write_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths the command writes, creates, or destroys. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "exec_target_paths", type: "String", modifiable: false, description: "Newline-delimited resolved absolute paths executed as a script. \\n-anchored — match with `like` patterns starting with `*`." }, { name: "unresolved_target", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True when a shell command's target hid behind a variable, glob, command substitution, or inline shell code that static analysis could not resolve, or when the 64-path / 4096-byte path-list cap truncated the results. Benign dev traffic sets this frequently (variables, globs, and command substitution are everywhere, and the truncation cap trips it too), so it is NOT a deny signal on its own — combine it with a path or operation match, and reserve a blanket deny-on-unresolved rule for high-assurance or allowlisted environments." }, { name: "tool_risk_score", type: "Long", modifiable: false, semantic: "severity_0_100", description: "Tool-call risk score (0-100)." }],
111
111
  supportedModes: ["enforce", "monitor", "alert"],
112
112
  defendsAgainst: ["excessive_agency", "unauthorized_access", "tool_hijacking"],
113
113
  exampleAttacks: [],
@@ -187,6 +187,7 @@ export const AI_GATEWAY_DETECTORS = [
187
187
  // resolved at codegen). Used by the client field→detector resolver — no Shield round-trip.
188
188
  export const AI_GATEWAY_FIELD_TO_DETECTORS = {
189
189
  "crime_score": ["toxicity"],
190
+ "exec_target_paths": ["tool_risk"],
190
191
  "hate_speech_score": ["toxicity"],
191
192
  "indirect_injection_score": ["deepcontext"],
192
193
  "injection_score": ["injection"],
@@ -216,6 +217,8 @@ export const AI_GATEWAY_FIELD_TO_DETECTORS = {
216
217
  "pii_score": ["pii"],
217
218
  "pii_types": ["pii"],
218
219
  "profanity_score": ["toxicity"],
220
+ "read_target_paths": ["tool_risk"],
221
+ "resolved_target_paths": ["tool_risk"],
219
222
  "rug_pull_detected": ["rug_pull"],
220
223
  "rug_pull_score": ["rug_pull"],
221
224
  "secret_count": ["secrets"],
@@ -241,8 +244,10 @@ export const AI_GATEWAY_FIELD_TO_DETECTORS = {
241
244
  "tool_poisoning_detected": ["tool_poisoning"],
242
245
  "tool_poisoning_score": ["tool_poisoning"],
243
246
  "tool_risk_score": ["tool_risk"],
247
+ "unresolved_target": ["tool_risk"],
244
248
  "violence_score": ["toxicity"],
245
249
  "weapons_score": ["toxicity"],
250
+ "write_target_paths": ["tool_risk"],
246
251
  };
247
252
  export function aiGatewayDetectorById(id) {
248
253
  return AI_GATEWAY_DETECTORS.find((d) => d.id === id);
@@ -36,6 +36,7 @@ export declare const GuardrailsContextKey: {
36
36
  readonly EncodedCount: "encoded_count";
37
37
  readonly EncodedScore: "encoded_score";
38
38
  readonly EncodedTypes: "encoded_types";
39
+ readonly ExecTargetPaths: "exec_target_paths";
39
40
  readonly FactualityScore: "factuality_score";
40
41
  readonly HallucinationScore: "hallucination_score";
41
42
  readonly HateSpeechScore: "hate_speech_score";
@@ -97,7 +98,9 @@ export declare const GuardrailsContextKey: {
97
98
  readonly Principal: "principal";
98
99
  readonly PrivilegeScope: "privilege_scope";
99
100
  readonly ProfanityScore: "profanity_score";
101
+ readonly ReadTargetPaths: "read_target_paths";
100
102
  readonly RequestId: "request_id";
103
+ readonly ResolvedTargetPaths: "resolved_target_paths";
101
104
  readonly Role: "role";
102
105
  readonly RpmExceeded: "rpm_exceeded";
103
106
  readonly RpmRemainingPct: "rpm_remaining_pct";
@@ -143,12 +146,14 @@ export declare const GuardrailsContextKey: {
143
146
  readonly TopicConfidence: "topic_confidence";
144
147
  readonly TpmExceeded: "tpm_exceeded";
145
148
  readonly TpmRemainingPct: "tpm_remaining_pct";
149
+ readonly UnresolvedTarget: "unresolved_target";
146
150
  readonly ViolenceScore: "violence_score";
147
151
  readonly WeaponsScore: "weapons_score";
152
+ readonly WriteTargetPaths: "write_target_paths";
148
153
  };
149
154
  export type GuardrailsContextKey = (typeof GuardrailsContextKey)[keyof typeof GuardrailsContextKey];
150
155
  /**
151
156
  * The full set of authorable context attribute keys for Guardrails.
152
157
  * Iterate this to enumerate the authorable surface (cockpit, conformance).
153
158
  */
154
- export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "mcp_config_risk", "mcp_input_request_detected", "mcp_input_request_methods", "mcp_input_request_score", "mcp_input_request_types", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "request_id", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
159
+ export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "exec_target_paths", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "malicious_package_detected", "malicious_package_score", "malicious_packages", "mcp_config_risk", "mcp_input_request_detected", "mcp_input_request_methods", "mcp_input_request_score", "mcp_input_request_types", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "package_advisory_count", "package_check_status", "package_ecosystems", "package_install_detected", "package_names", "package_risk_score", "packages_checked", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "read_target_paths", "request_id", "resolved_target_paths", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "unresolved_target", "violence_score", "weapons_score", "write_target_paths"];
@@ -38,6 +38,7 @@ export const GuardrailsContextKey = {
38
38
  EncodedCount: 'encoded_count',
39
39
  EncodedScore: 'encoded_score',
40
40
  EncodedTypes: 'encoded_types',
41
+ ExecTargetPaths: 'exec_target_paths',
41
42
  FactualityScore: 'factuality_score',
42
43
  HallucinationScore: 'hallucination_score',
43
44
  HateSpeechScore: 'hate_speech_score',
@@ -99,7 +100,9 @@ export const GuardrailsContextKey = {
99
100
  Principal: 'principal',
100
101
  PrivilegeScope: 'privilege_scope',
101
102
  ProfanityScore: 'profanity_score',
103
+ ReadTargetPaths: 'read_target_paths',
102
104
  RequestId: 'request_id',
105
+ ResolvedTargetPaths: 'resolved_target_paths',
103
106
  Role: 'role',
104
107
  RpmExceeded: 'rpm_exceeded',
105
108
  RpmRemainingPct: 'rpm_remaining_pct',
@@ -145,8 +148,10 @@ export const GuardrailsContextKey = {
145
148
  TopicConfidence: 'topic_confidence',
146
149
  TpmExceeded: 'tpm_exceeded',
147
150
  TpmRemainingPct: 'tpm_remaining_pct',
151
+ UnresolvedTarget: 'unresolved_target',
148
152
  ViolenceScore: 'violence_score',
149
153
  WeaponsScore: 'weapons_score',
154
+ WriteTargetPaths: 'write_target_paths',
150
155
  };
151
156
  /**
152
157
  * The full set of authorable context attribute keys for Guardrails.
@@ -184,6 +189,7 @@ export const GuardrailsContextKeys = [
184
189
  GuardrailsContextKey.EncodedCount,
185
190
  GuardrailsContextKey.EncodedScore,
186
191
  GuardrailsContextKey.EncodedTypes,
192
+ GuardrailsContextKey.ExecTargetPaths,
187
193
  GuardrailsContextKey.FactualityScore,
188
194
  GuardrailsContextKey.HallucinationScore,
189
195
  GuardrailsContextKey.HateSpeechScore,
@@ -245,7 +251,9 @@ export const GuardrailsContextKeys = [
245
251
  GuardrailsContextKey.Principal,
246
252
  GuardrailsContextKey.PrivilegeScope,
247
253
  GuardrailsContextKey.ProfanityScore,
254
+ GuardrailsContextKey.ReadTargetPaths,
248
255
  GuardrailsContextKey.RequestId,
256
+ GuardrailsContextKey.ResolvedTargetPaths,
249
257
  GuardrailsContextKey.Role,
250
258
  GuardrailsContextKey.RpmExceeded,
251
259
  GuardrailsContextKey.RpmRemainingPct,
@@ -291,6 +299,8 @@ export const GuardrailsContextKeys = [
291
299
  GuardrailsContextKey.TopicConfidence,
292
300
  GuardrailsContextKey.TpmExceeded,
293
301
  GuardrailsContextKey.TpmRemainingPct,
302
+ GuardrailsContextKey.UnresolvedTarget,
294
303
  GuardrailsContextKey.ViolenceScore,
295
304
  GuardrailsContextKey.WeaponsScore,
305
+ GuardrailsContextKey.WriteTargetPaths,
296
306
  ];