@highflame/policy 2.2.31 → 2.2.33

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 (63) hide show
  1. package/_schemas/agent_ops/context.json +1274 -441
  2. package/_schemas/agent_ops/schema.cedarschema +24 -0
  3. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar +92 -0
  4. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_escalation.cedar +99 -0
  5. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_identity_enforcement.cedar +101 -0
  6. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_inter_agent_injection.cedar +120 -0
  7. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_claude_block_injection.cedar +30 -0
  8. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_defaults.cedar +122 -0
  9. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_safety.cedar +164 -0
  10. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_trust.cedar +143 -0
  11. package/_schemas/agent_ops/templates/ported/agent-security/agent_security_data_pipeline.cedar +45 -0
  12. package/_schemas/agent_ops/templates/ported/agent-security/agent_security_defaults.cedar +164 -0
  13. package/_schemas/agent_ops/templates/ported/agent-security/agent_security_malicious_package.cedar +59 -0
  14. package/_schemas/agent_ops/templates/ported/agent-security/agent_security_param_validation.cedar +119 -0
  15. package/_schemas/agent_ops/templates/ported/agent-security/agent_security_tool_risk.cedar +66 -0
  16. package/_schemas/agent_ops/templates/ported/code-security/agent_identity_a2a_supply_chain.cedar +101 -0
  17. package/_schemas/agent_ops/templates/ported/code-security/agent_security_code_agent.cedar +130 -0
  18. package/_schemas/agent_ops/templates/ported/code-security/agent_security_code_agent_supply_chain.cedar +116 -0
  19. package/_schemas/agent_ops/templates/ported/code-security/security_code_agent_encoding.cedar +51 -0
  20. package/_schemas/agent_ops/templates/ported/code-security/security_code_agent_path_security.cedar +149 -0
  21. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_chat_assistant.cedar +58 -0
  22. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_defaults.cedar +111 -0
  23. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_semantic.cedar +78 -0
  24. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_toxicity.cedar +71 -0
  25. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_advanced_secrets.cedar +74 -0
  26. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_code_block_write_secrets.cedar +26 -0
  27. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_data_pipeline.cedar +52 -0
  28. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_defaults.cedar +57 -0
  29. package/_schemas/agent_ops/templates/ported/data-protection/privacy_advanced_pii.cedar +465 -0
  30. package/_schemas/agent_ops/templates/ported/data-protection/privacy_defaults.cedar +164 -0
  31. package/_schemas/agent_ops/templates/ported/data-protection/privacy_pii_model.cedar +90 -0
  32. package/_schemas/agent_ops/templates/ported/organization/organization_deny_baseline.cedar +22 -0
  33. package/_schemas/agent_ops/templates/ported/organization/organization_team_permissions.cedar +38 -0
  34. package/_schemas/agent_ops/templates/ported/threat-detection/security_advanced_block_critical_severity.cedar +30 -0
  35. package/_schemas/agent_ops/templates/ported/threat-detection/security_chat_assistant.cedar +47 -0
  36. package/_schemas/agent_ops/templates/ported/threat-detection/security_data_pipeline_block_injection.cedar +31 -0
  37. package/_schemas/agent_ops/templates/ported/threat-detection/security_injection.cedar +82 -0
  38. package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +72 -0
  39. package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +155 -0
  40. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_bash_operation_classes.cedar +142 -0
  41. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_block_shell.cedar +40 -0
  42. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_defaults.cedar +76 -0
  43. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_mcp_server_allowlist.cedar +41 -0
  44. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_mcp_tool_permissions.cedar +103 -0
  45. package/_schemas/agent_ops/templates/templates.json +752 -8
  46. package/_schemas/ai_gateway/context.json +2 -2
  47. package/_schemas/guardrails/context.json +27 -2
  48. package/_schemas/guardrails/schema.cedarschema +13 -0
  49. package/_schemas/guardrails/templates/templates.json +6 -1
  50. package/_schemas/overwatch/context.json +3 -3
  51. package/dist/aarm-annotations.gen.js +1 -1
  52. package/dist/agent_ops-context.gen.d.ts +5 -1
  53. package/dist/agent_ops-context.gen.js +8 -0
  54. package/dist/agent_ops-defaults.gen.js +5168 -8
  55. package/dist/guardrails-context.gen.d.ts +5 -1
  56. package/dist/guardrails-context.gen.js +8 -0
  57. package/dist/guardrails-defaults.gen.js +6 -1
  58. package/dist/guardrails-detectors.gen.d.ts +1 -1
  59. package/dist/guardrails-detectors.gen.js +19 -1
  60. package/dist/overwatch-defaults.gen.js +109 -0
  61. package/dist/service-schemas.gen.d.ts +2 -2
  62. package/dist/service-schemas.gen.js +65 -12
  63. package/package.json +1 -1
@@ -315,6 +315,14 @@ namespace AgentOps {
315
315
  "agent_framework"?: String,
316
316
  "agent_publisher"?: String,
317
317
 
318
+ // Supply-chain / package safety + aggregate threat severity (optional —
319
+ // ADR 0012 unified port). Projected by Shield's malicious-package and
320
+ // threat-severity detectors; every read is \`has\`-guarded in policy.
321
+ "malicious_package_detected"?: Boolean,
322
+ "package_install_detected"?: Boolean,
323
+ "package_check_status"?: String,
324
+ "max_threat_severity"?: Long,
325
+
318
326
  };
319
327
 
320
328
  /// Context for call_tool action (agentic tool execution)
@@ -511,6 +519,14 @@ namespace AgentOps {
511
519
  // File & Path (optional)
512
520
  "path"?: String,
513
521
 
522
+ // Supply-chain / package safety + aggregate threat severity (optional —
523
+ // ADR 0012 unified port). Projected by Shield's malicious-package and
524
+ // threat-severity detectors; every read is \`has\`-guarded in policy.
525
+ "malicious_package_detected"?: Boolean,
526
+ "package_install_detected"?: Boolean,
527
+ "package_check_status"?: String,
528
+ "max_threat_severity"?: Long,
529
+
514
530
  };
515
531
 
516
532
  /// Context for read_file action
@@ -843,6 +859,14 @@ namespace AgentOps {
843
859
  "agent_framework"?: String,
844
860
  "agent_publisher"?: String,
845
861
 
862
+ // Supply-chain / package safety + aggregate threat severity (optional —
863
+ // ADR 0012 unified port). Projected by Shield's malicious-package and
864
+ // threat-severity detectors; every read is \`has\`-guarded in policy.
865
+ "malicious_package_detected"?: Boolean,
866
+ "package_install_detected"?: Boolean,
867
+ "package_check_status"?: String,
868
+ "max_threat_severity"?: Long,
869
+
846
870
  };
847
871
 
848
872
  /// Context for provision_sandbox action (Forge sandbox-create envelope).
@@ -1781,6 +1805,19 @@ namespace Guardrails {
1781
1805
  "mcp_risk_type"?: String, // "inline_execution" | "suspicious_url" | "cross_origin"
1782
1806
  "mcp_risk_score"?: Long, // 0-100
1783
1807
 
1808
+ // Agentic - MCP Input Requests (optional) — an MCP server asking the CLIENT to act
1809
+ // on its behalf: elicitation/create (prompt a human), sampling/createMessage (drive
1810
+ // the client's model), roots/list (enumerate its filesystem). Carried in-band as
1811
+ // InputRequiredResult.inputRequests under the MRTR pattern (MCP 2026-07-28), and
1812
+ // out-of-band by the gateway relay for earlier peers. INV-DET-002.
1813
+ "mcp_input_request_detected"?: Bool,
1814
+ "mcp_input_request_score"?: Long, // 0-100
1815
+ "mcp_input_request_types"?: Set<String>, // subset of {"credential_elicitation", "sampling_injection", "root_probe"}
1816
+ // The requested methods, independent of content. Lets a policy refuse a capability
1817
+ // outright ("never permit sampling/createMessage from an unverified server") rather
1818
+ // than only reacting to a payload we managed to classify.
1819
+ "mcp_input_request_methods"?: Set<String>, // subset of {"elicitation/create", "sampling/createMessage", "roots/list"}
1820
+
1784
1821
  // Tool Operation Classifier (optional) — populated by AST-based classifiers (bash, python, etc.)
1785
1822
  "tool_operation_classes"?: Set<String>, // subset of {"readonly", "write_enabling", "execute_enabling", "network_access", "unknown"}
1786
1823
 
@@ -3187,7 +3224,11 @@ export const AGENT_OPS_CONTEXT = {
3187
3224
  { "key": "flow_sink_effects", "type": "array", "required": false, "description": "Side effects the destination can exercise (ADR 0020), e.g. \'network.send\', \'financial.transfer\', \'filesystem.write\'. Enables \'untrusted content MUST NOT reach a financial.transfer sink\'. Set<String>." },
3188
3225
  { "key": "principal_clearances", "type": "array", "required": false, "description": "Clearances AuthN/ZeroID mints for the principal (ADR 0020 D8), e.g. \'restricted\', \'pii\'. Coarse scopes gate the capability; clearances gate which protected data that capability may touch. Set<String>." },
3189
3226
  { "key": "principal_compartments", "type": "array", "required": false, "description": "Compartments the principal is admitted to (ADR 0020 D8), e.g. \'tenant:acme\', \'customer:123\'. A flow into a compartment the principal lacks is deniable independent of confidentiality tier. Set<String>." },
3190
- { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." }
3227
+ { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." },
3228
+ { "key": "malicious_package_detected", "type": "boolean", "required": false, "description": "Whether a referenced package carries a known-malicious osv.dev (MAL-) advisory." },
3229
+ { "key": "package_install_detected", "type": "boolean", "required": false, "description": "Whether the request installs or downloads a package (pip/npm/cargo/etc.)." },
3230
+ { "key": "package_check_status", "type": "string", "required": false, "description": "Malicious-package lookup status: empty (ok) or degraded (OSV unavailable, fail-open)." },
3231
+ { "key": "max_threat_severity", "type": "number", "required": false, "description": "Aggregate max threat severity across detectors (0=none,1=low,2=medium,3=high,4=critical)." }
3191
3232
  ]
3192
3233
  },
3193
3234
  {
@@ -3206,7 +3247,7 @@ export const AGENT_OPS_CONTEXT = {
3206
3247
  { "key": "cwd", "type": "string", "required": false, "description": "Current working directory" },
3207
3248
  { "key": "workspace_root", "type": "string", "required": false, "description": "IDE workspace root path" },
3208
3249
  { "key": "tool_name", "type": "string", "required": false, "description": "Name of the tool being called (e.g., \'shell\', \'write_file\', \'http_post\')" },
3209
- { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed risk score for this tool call (0-100)." },
3250
+ { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed risk score for this tool call (0-100). Typical condition: tool_risk_score >= 86 (>= 71 for sensitive tools)." },
3210
3251
  { "key": "tool_is_sensitive", "type": "boolean", "required": false, "description": "Whether the tool is classified as sensitive" },
3211
3252
  { "key": "tool_category", "type": "string", "required": false, "description": "Tool classification: \'safe\', \'sensitive\', or \'dangerous\'" },
3212
3253
  { "key": "tool_is_builtin", "type": "boolean", "required": false, "description": "Whether the tool is a built-in tool (vs MCP external tool)" },
@@ -3262,7 +3303,7 @@ export const AGENT_OPS_CONTEXT = {
3262
3303
  { "key": "encoded_types", "type": "array", "required": false, "description": "Array of encoding types detected in tool arguments" },
3263
3304
  { "key": "encoded_count", "type": "number", "required": false, "description": "Number of encoded segments found in tool arguments" },
3264
3305
  { "key": "encoded_score", "type": "number", "required": false, "description": "Risk score for encoded injection in tool arguments (0-100)." },
3265
- { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'" },
3306
+ { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). \'unknown\' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy." },
3266
3307
  { "key": "path", "type": "string", "required": false, "description": "File path targeted by the tool call" },
3267
3308
  { "key": "conversation_turn", "type": "number", "required": false, "description": "Current conversation turn number" },
3268
3309
  { "key": "multi_turn_detection", "type": "boolean", "required": false, "description": "Whether multi-turn injection patterns were detected across tool calls" },
@@ -3306,7 +3347,11 @@ export const AGENT_OPS_CONTEXT = {
3306
3347
  { "key": "flow_sink_effects", "type": "array", "required": false, "description": "Side effects the destination can exercise (ADR 0020), e.g. \'network.send\', \'financial.transfer\', \'filesystem.write\'. Enables \'untrusted content MUST NOT reach a financial.transfer sink\'. Set<String>." },
3307
3348
  { "key": "principal_clearances", "type": "array", "required": false, "description": "Clearances AuthN/ZeroID mints for the principal (ADR 0020 D8), e.g. \'restricted\', \'pii\'. Coarse scopes gate the capability; clearances gate which protected data that capability may touch. Set<String>." },
3308
3349
  { "key": "principal_compartments", "type": "array", "required": false, "description": "Compartments the principal is admitted to (ADR 0020 D8), e.g. \'tenant:acme\', \'customer:123\'. A flow into a compartment the principal lacks is deniable independent of confidentiality tier. Set<String>." },
3309
- { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." }
3350
+ { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." },
3351
+ { "key": "malicious_package_detected", "type": "boolean", "required": false, "description": "Whether a referenced package carries a known-malicious osv.dev (MAL-) advisory." },
3352
+ { "key": "package_install_detected", "type": "boolean", "required": false, "description": "Whether the request installs or downloads a package (pip/npm/cargo/etc.)." },
3353
+ { "key": "package_check_status", "type": "string", "required": false, "description": "Malicious-package lookup status: empty (ok) or degraded (OSV unavailable, fail-open)." },
3354
+ { "key": "max_threat_severity", "type": "number", "required": false, "description": "Aggregate max threat severity across detectors (0=none,1=low,2=medium,3=high,4=critical)." }
3310
3355
  ]
3311
3356
  },
3312
3357
  {
@@ -3511,7 +3556,11 @@ export const AGENT_OPS_CONTEXT = {
3511
3556
  { "key": "flow_sink_effects", "type": "array", "required": false, "description": "Side effects the destination can exercise (ADR 0020), e.g. \'network.send\', \'financial.transfer\', \'filesystem.write\'. Enables \'untrusted content MUST NOT reach a financial.transfer sink\'. Set<String>." },
3512
3557
  { "key": "principal_clearances", "type": "array", "required": false, "description": "Clearances AuthN/ZeroID mints for the principal (ADR 0020 D8), e.g. \'restricted\', \'pii\'. Coarse scopes gate the capability; clearances gate which protected data that capability may touch. Set<String>." },
3513
3558
  { "key": "principal_compartments", "type": "array", "required": false, "description": "Compartments the principal is admitted to (ADR 0020 D8), e.g. \'tenant:acme\', \'customer:123\'. A flow into a compartment the principal lacks is deniable independent of confidentiality tier. Set<String>." },
3514
- { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." }
3559
+ { "key": "surface", "type": "string", "required": true, "description": "Origin surface of the request (ADR 0012 D14.2) — REQUIRED; projected by Shield from the ingress product, never user-supplied. Values are the product identifiers: \'guardrails\', \'overwatch\', \'ai_gateway\' (\'sentry\' joins at D17 phase 2). The \'Applies to\' narrowing target: test with an ordinary condition (context.surface == \'ai_gateway\'); no \'has\' guard needed because it is required. A policy with no surface condition applies to every surface, including ones added later." },
3560
+ { "key": "malicious_package_detected", "type": "boolean", "required": false, "description": "Whether a referenced package carries a known-malicious osv.dev (MAL-) advisory." },
3561
+ { "key": "package_install_detected", "type": "boolean", "required": false, "description": "Whether the request installs or downloads a package (pip/npm/cargo/etc.)." },
3562
+ { "key": "package_check_status", "type": "string", "required": false, "description": "Malicious-package lookup status: empty (ok) or degraded (OSV unavailable, fail-open)." },
3563
+ { "key": "max_threat_severity", "type": "number", "required": false, "description": "Aggregate max threat severity across detectors (0=none,1=low,2=medium,3=high,4=critical)." }
3515
3564
  ]
3516
3565
  },
3517
3566
  {
@@ -3572,11 +3621,11 @@ export const AI_GATEWAY_CONTEXT = {
3572
3621
  { "key": "rug_pull_score", "type": "number", "required": false, "description": "Rug pull risk score (0-100)" },
3573
3622
  { "key": "rug_pull_detected", "type": "boolean", "required": false, "description": "Rug pull detected flag" },
3574
3623
  { "key": "indirect_injection_score", "type": "number", "required": false, "description": "Indirect injection score (0-100)" },
3575
- { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed tool risk (0-100)" },
3624
+ { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed tool risk (0-100). Typical condition: tool_risk_score >= 86 (>= 71 for sensitive tools)" },
3576
3625
  { "key": "tool_category", "type": "string", "required": false, "description": "Tool category: safe/sensitive/dangerous" },
3577
3626
  { "key": "tool_is_sensitive", "type": "boolean", "required": false, "description": "Tool sensitivity flag" },
3578
3627
  { "key": "tool_is_builtin", "type": "boolean", "required": false, "description": "Built-in tool flag" },
3579
- { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. \'unknown\' appears when any unrecognized or variable-expanded command was seen." },
3628
+ { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). \'unknown\' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy." },
3580
3629
  { "key": "mcp_server_verified", "type": "boolean", "required": false, "description": "Whether server is from verified registry" },
3581
3630
  { "key": "violence_score", "type": "number", "required": false, "description": "Violence content score (0-100)" },
3582
3631
  { "key": "weapons_score", "type": "number", "required": false, "description": "Weapons content score (0-100)" },
@@ -3937,7 +3986,7 @@ export const GUARDRAILS_CONTEXT = {
3937
3986
  { "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request" },
3938
3987
  { "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds" },
3939
3988
  { "key": "tool_name", "type": "string", "required": false, "description": "Name of the tool being called (e.g., \'shell\', \'write_file\', \'http_post\'). Use this to block specific dangerous tools" },
3940
- { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed risk score for this tool call (0-100). Considers tool sensitivity, argument patterns, and MCP verification status. Typical threshold: >85 for dangerous tools" },
3989
+ { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed risk score for this tool call (0-100). Considers tool sensitivity, argument patterns, and MCP verification status. Typical condition: tool_risk_score >= 86 (used by the Tool Risk template; >= 71 for sensitive tools)." },
3941
3990
  { "key": "tool_is_sensitive", "type": "boolean", "required": false, "description": "Whether the tool is classified as sensitive (shell, file operations, network access, etc.)" },
3942
3991
  { "key": "tool_category", "type": "string", "required": false, "description": "Tool classification: \'safe\', \'sensitive\', or \'dangerous\'. Based on tool type and argument patterns" },
3943
3992
  { "key": "tool_is_builtin", "type": "boolean", "required": false, "description": "Whether the tool is a built-in tool (vs MCP external tool). Built-in tools are generally more trusted" },
@@ -3987,7 +4036,11 @@ export const GUARDRAILS_CONTEXT = {
3987
4036
  { "key": "mcp_config_risk", "type": "boolean", "required": false, "description": "Whether MCP configuration risk was detected (inline code execution, suspicious URLs, cross-origin issues)" },
3988
4037
  { "key": "mcp_risk_type", "type": "string", "required": false, "description": "Type of MCP risk: \'inline_execution\', \'suspicious_url\', or \'cross_origin\'" },
3989
4038
  { "key": "mcp_risk_score", "type": "number", "required": false, "description": "Risk score for MCP configuration issues (0-100). Typical threshold: >=70 for blocks" },
3990
- { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. \'unknown\' appears when any unrecognized or variable-expanded command was seen." },
4039
+ { "key": "mcp_input_request_detected", "type": "boolean", "required": false, "description": "Whether an MCP server-to-client input request was flagged. These ask the CLIENT to act on the server\'s behalf — elicitation/create prompts a human, sampling/createMessage drives the client\'s own model, roots/list enumerates its filesystem" },
4040
+ { "key": "mcp_input_request_score", "type": "number", "required": false, "description": "Risk score for the MCP input request (0-100). Credential-soliciting elicitation and injection aimed at the client\'s model score highest" },
4041
+ { "key": "mcp_input_request_types", "type": "array", "required": false, "description": "Threat shapes found in the input request (e.g. [\'credential_elicitation\', \'sampling_injection\', \'root_probe\']). Use .contains() to block a specific shape" },
4042
+ { "key": "mcp_input_request_methods", "type": "array", "required": false, "description": "MCP methods the server asked the client to perform (e.g. [\'elicitation/create\', \'sampling/createMessage\', \'roots/list\']). Independent of content, so a policy can refuse a capability outright — e.g. mcp_input_request_methods.contains(\"sampling/createMessage\") on an unverified server — rather than only reacting to a payload that was successfully classified" },
4043
+ { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). \'unknown\' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy." },
3991
4044
  { "key": "cross_origin_detected", "type": "boolean", "required": false, "description": "Whether cross-origin escalation patterns were detected in tool calls crossing trust boundaries" },
3992
4045
  { "key": "cross_origin_type", "type": "string", "required": false, "description": "Type of cross-origin escalation detected in tool call" },
3993
4046
  { "key": "cross_origin_score", "type": "number", "required": false, "description": "Risk score for cross-origin escalation in tool calls (0-100)" },
@@ -4295,7 +4348,7 @@ export const OVERWATCH_CONTEXT = {
4295
4348
  { "key": "rug_pull_score", "type": "number", "required": false, "description": "Tool behavioral drift score (0-100) — deviation from established tool behavior patterns" },
4296
4349
  { "key": "rug_pull_detected", "type": "boolean", "required": false, "description": "Whether a rug pull attack was explicitly detected" },
4297
4350
  { "key": "indirect_injection_score", "type": "number", "required": false, "description": "Indirect prompt injection risk score (0-100) — injection via tool outputs" },
4298
- { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed tool risk score (0-100) combining tool type, arguments, and context" },
4351
+ { "key": "tool_risk_score", "type": "number", "required": false, "description": "Computed tool risk score (0-100) combining tool type, arguments, and context. Typical condition: tool_risk_score >= 86 (>= 71 for sensitive tools)" },
4299
4352
  { "key": "tool_category", "type": "string", "required": false, "description": "Tool risk classification: safe, sensitive, dangerous" },
4300
4353
  { "key": "tool_is_sensitive", "type": "boolean", "required": false, "description": "Whether the tool is classified as sensitive (shell, file write, network)" },
4301
4354
  { "key": "tool_is_builtin", "type": "boolean", "required": false, "description": "Whether the tool is a built-in IDE tool (true) or MCP tool (false)" },
@@ -4303,10 +4356,10 @@ export const OVERWATCH_CONTEXT = {
4303
4356
  { "key": "loop_count", "type": "number", "required": false, "description": "Number of consecutive calls to the same tool" },
4304
4357
  { "key": "loop_tool", "type": "string", "required": false, "description": "The tool name involved in the detected loop" },
4305
4358
  { "key": "suspicious_pattern", "type": "boolean", "required": false, "description": "Whether a suspicious action sequence was detected (exfiltration, theft, destructive)" },
4306
- { "key": "pattern_type", "type": "string", "required": false, "description": "Type of suspicious pattern: data_exfiltration, secret_exfiltration, credential_theft, destructive_sequence" },
4359
+ { "key": "pattern_type", "type": "string", "required": false, "description": "Type of suspicious pattern: data_exfiltration, secret_exfiltration, db_exfiltration, credential_theft, destructive_sequence" },
4307
4360
  { "key": "sequence_risk", "type": "number", "required": false, "description": "Behavioral sequence risk score (0-100)" },
4308
4361
  { "key": "mcp_server_verified", "type": "boolean", "required": false, "description": "Whether the MCP server is from a verified registry" },
4309
- { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. \'unknown\' appears when any unrecognized or variable-expanded command was seen." },
4362
+ { "key": "tool_operation_classes", "type": "array", "required": false, "description": "All operation classes observed in the tool call, emitted by the AST command classifiers. Subset of: \'readonly\', \'write_enabling\', \'execute_enabling\', \'network_access\', \'unknown\'. A single command can carry several classes; combine with contains() to match shapes — e.g. tool_operation_classes.contains(\"network_access\") && tool_operation_classes.contains(\"execute_enabling\") catches download-and-run (curl | sh). Used by the Bash Operation Classes template. \'unknown\' appears when any unrecognized or variable-expanded command was seen and should be treated as deny-worthy." },
4310
4363
  { "key": "package_install_detected", "type": "boolean", "required": false, "description": "True iff a package install/download command was recognized in the tool call arguments." },
4311
4364
  { "key": "malicious_package_detected", "type": "boolean", "required": false, "description": "True iff any referenced package has a known-malicious (MAL-) OSV advisory." },
4312
4365
  { "key": "malicious_package_score", "type": "number", "required": false, "description": "100 when a malicious package was detected, 0 otherwise." },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highflame/policy",
3
- "version": "2.2.31",
3
+ "version": "2.2.33",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },