@highflame/policy 2.1.6 → 2.1.8

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 (27) hide show
  1. package/_schemas/guardrails/context.json +78 -0
  2. package/_schemas/guardrails/schema.cedarschema +28 -1
  3. package/_schemas/guardrails/templates/defaults/agent_identity.cedar +5 -5
  4. package/_schemas/guardrails/templates/defaults/semantic.cedar +10 -7
  5. package/_schemas/guardrails/templates/mcp_tool_permissions.cedar +7 -5
  6. package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +105 -0
  7. package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +113 -0
  8. package/_schemas/guardrails/templates/profiles/a2a_security/identity_enforcement.cedar +118 -0
  9. package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +134 -0
  10. package/_schemas/guardrails/templates/profiles/a2a_security/supply_chain.cedar +117 -0
  11. package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +73 -0
  12. package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +66 -0
  13. package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +35 -0
  14. package/_schemas/guardrails/templates/profiles/code_agent/encoding.cedar +55 -0
  15. package/_schemas/guardrails/templates/profiles/code_agent/path_security.cedar +148 -0
  16. package/_schemas/guardrails/templates/profiles/code_agent/supply_chain.cedar +120 -0
  17. package/_schemas/guardrails/templates/profiles/multi_agent/agent_safety.cedar +6 -6
  18. package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +7 -7
  19. package/_schemas/guardrails/templates/templates.json +128 -14
  20. package/dist/engine.d.ts +1 -1
  21. package/dist/engine.js +1 -1
  22. package/dist/guardrails-context.gen.d.ts +5 -0
  23. package/dist/guardrails-context.gen.js +5 -0
  24. package/dist/guardrails-defaults.gen.js +1517 -208
  25. package/dist/service-schemas.gen.d.ts +1 -1
  26. package/dist/service-schemas.gen.js +41 -1
  27. package/package.json +1 -1
@@ -0,0 +1,120 @@
1
+ // =============================================================================
2
+ // Code Agent — Supply Chain Security
3
+ // =============================================================================
4
+ // Detects and blocks MCP server poisoning, indirect prompt injection from tool
5
+ // outputs, credential theft chains, and destructive operation sequences.
6
+ //
7
+ // These are agentic AI-specific attack vectors where tool descriptions, server
8
+ // responses, or behavioral drift manipulate agent behavior.
9
+ //
10
+ // Adapted from Overwatch agent security and behavioral analysis policies for
11
+ // the Guardrails namespace.
12
+ //
13
+ // Compliance:
14
+ // OWASP ASI01 (Agent Goal Hijack)
15
+ // OWASP ASI02 (Tool Misuse)
16
+ // OWASP ASI04 (Supply Chain)
17
+ // OWASP LLM01 (Prompt Injection) — indirect variant
18
+ // OWASP MCP01-05
19
+ // MITRE ATLAS AML.T0051 (Prompt Injection)
20
+ // MITRE ATT&CK T1552 (Unsecured Credentials)
21
+ //
22
+ // Category: agentic_security
23
+ // Namespace: Guardrails
24
+ // =============================================================================
25
+
26
+ // ---------------------------------------------------------------------------
27
+ // Section 1: MCP Server Poisoning
28
+ // Blocks connections to MCP servers with poisoned tool descriptions.
29
+ // Lower threshold than tool-level poisoning since it affects all tools.
30
+ // ---------------------------------------------------------------------------
31
+
32
+ @id("code-block-server-poisoning")
33
+ @name("Block poisoned MCP servers")
34
+ @description("Block connections to MCP servers when tool poisoning patterns are detected in tool descriptions (score >= 60). Lower threshold than tool-level poisoning since server-level poisoning affects all tools on the server.")
35
+ @severity("critical")
36
+ @tags("profile,code-agent,supply-chain,tool-poisoning,mcp-security,owasp-asi04")
37
+ @reject_message("MCP server connection blocked: tool poisoning patterns detected in server tool descriptions. Review server tools before connecting.")
38
+ forbid (
39
+ principal,
40
+ action == Guardrails::Action::"connect_server",
41
+ resource
42
+ )
43
+ when {
44
+ context has tool_poisoning_score && context.tool_poisoning_score >= 60
45
+ };
46
+
47
+ // ---------------------------------------------------------------------------
48
+ // Section 2: Indirect Prompt Injection
49
+ // Blocks injection from tool outputs and retrieved content — not direct
50
+ // user input but external content that manipulates agent behavior.
51
+ // Ref: EchoLeak CVE-2025-32711, IDEsaster (30+ CVEs)
52
+ // ---------------------------------------------------------------------------
53
+
54
+ @id("code-block-indirect-injection")
55
+ @name("Block indirect prompt injection")
56
+ @description("Block tool execution when indirect prompt injection is detected in tool outputs, file contents, or retrieved documents (score >= 70). Defends against injection via external content that manipulates agent behavior.")
57
+ @severity("critical")
58
+ @tags("profile,code-agent,supply-chain,indirect-injection,owasp-llm01,owasp-asi01")
59
+ @reject_message("Content blocked: indirect prompt injection detected in tool output or retrieved content. An external source may be attempting to hijack agent behavior.")
60
+ forbid (
61
+ principal,
62
+ action == Guardrails::Action::"call_tool",
63
+ resource
64
+ )
65
+ when {
66
+ context has indirect_injection_score && context.indirect_injection_score >= 70
67
+ };
68
+
69
+ @id("code-block-indirect-injection-sensitive")
70
+ @name("Block indirect injection on sensitive tools")
71
+ @description("Lower threshold (>= 50) for indirect injection when the tool is classified as sensitive. Even moderate injection risk on sensitive tools (shell, file write, network) warrants blocking.")
72
+ @severity("critical")
73
+ @tags("profile,code-agent,supply-chain,indirect-injection,sensitive-tools,owasp-asi02")
74
+ @reject_message("Sensitive tool execution blocked: moderate indirect injection risk detected. Sensitive tools require higher confidence that content is safe.")
75
+ forbid (
76
+ principal,
77
+ action == Guardrails::Action::"call_tool",
78
+ resource
79
+ )
80
+ when {
81
+ context has indirect_injection_score && context.indirect_injection_score >= 50 &&
82
+ context has tool_is_sensitive && context.tool_is_sensitive == true
83
+ };
84
+
85
+ // ---------------------------------------------------------------------------
86
+ // Section 3: Behavioral Attack Patterns
87
+ // Detects multi-step attack chains targeting credentials and workspace integrity.
88
+ // ---------------------------------------------------------------------------
89
+
90
+ @id("code-block-credential-theft")
91
+ @name("Block credential theft chains")
92
+ @description("Block tool execution when a credential theft chain is detected — accessing SSH keys, cloud credentials, or API tokens followed by encoding, compression, or transfer operations. Multi-step attack pattern for autonomous credential harvesting.")
93
+ @severity("critical")
94
+ @tags("profile,code-agent,supply-chain,credential-theft,behavioral,mitre-t1552")
95
+ @reject_message("Tool execution blocked: credential theft chain detected. The agent is performing a multi-step operation to harvest and exfiltrate credentials.")
96
+ forbid (
97
+ principal,
98
+ action == Guardrails::Action::"call_tool",
99
+ resource
100
+ )
101
+ when {
102
+ context has suspicious_pattern && context.suspicious_pattern == true &&
103
+ context has pattern_type && context.pattern_type == "credential_theft"
104
+ };
105
+
106
+ @id("code-block-destructive-sequence")
107
+ @name("Block destructive operation sequences")
108
+ @description("Block tool execution when a destructive operation sequence is detected — bulk file deletions, permission changes, config overwrites, or repository manipulation patterns. Prevents agent-initiated workspace damage.")
109
+ @severity("critical")
110
+ @tags("profile,code-agent,supply-chain,destructive,behavioral,owasp-asi02")
111
+ @reject_message("Tool execution blocked: destructive operation sequence detected. The agent is performing a pattern of destructive operations that could damage the workspace.")
112
+ forbid (
113
+ principal,
114
+ action == Guardrails::Action::"call_tool",
115
+ resource
116
+ )
117
+ when {
118
+ context has suspicious_pattern && context.suspicious_pattern == true &&
119
+ context has pattern_type && context.pattern_type == "destructive_sequence"
120
+ };
@@ -43,7 +43,7 @@ forbid (
43
43
  action == Guardrails::Action::"call_tool",
44
44
  resource
45
45
  ) when {
46
- context.agent_trust_level != "first_party" &&
46
+ context has agent_trust_level && context.agent_trust_level != "first_party" &&
47
47
  context has session_pii_detected && context.session_pii_detected == true &&
48
48
  context has tool_name &&
49
49
  (context.tool_name == "http_post" ||
@@ -62,7 +62,7 @@ forbid (
62
62
  action == Guardrails::Action::"write_file",
63
63
  resource
64
64
  ) when {
65
- context.agent_trust_level == "unverified" &&
65
+ context has agent_trust_level && context.agent_trust_level == "unverified" &&
66
66
  context has session_pii_detected && context.session_pii_detected == true
67
67
  };
68
68
 
@@ -80,7 +80,7 @@ forbid (
80
80
  action == Guardrails::Action::"call_tool",
81
81
  resource
82
82
  ) when {
83
- context.agent_trust_level != "first_party" &&
83
+ context has agent_trust_level && context.agent_trust_level != "first_party" &&
84
84
  context has session_secrets_detected && context.session_secrets_detected == true &&
85
85
  context has tool_is_sensitive && context.tool_is_sensitive == true
86
86
  };
@@ -99,7 +99,7 @@ forbid (
99
99
  action == Guardrails::Action::"call_tool",
100
100
  resource
101
101
  ) when {
102
- context.agent_trust_level == "unverified" &&
102
+ context has agent_trust_level && context.agent_trust_level == "unverified" &&
103
103
  context has session_injection_detected && context.session_injection_detected == true
104
104
  };
105
105
 
@@ -134,7 +134,7 @@ forbid (
134
134
  action == Guardrails::Action::"call_tool",
135
135
  resource
136
136
  ) when {
137
- context.agent_trust_level != "first_party" &&
137
+ context has agent_trust_level && context.agent_trust_level != "first_party" &&
138
138
  context has session_cumulative_risk_score && context.session_cumulative_risk_score > 200 &&
139
139
  context has tool_is_sensitive && context.tool_is_sensitive == true
140
140
  };
@@ -149,7 +149,7 @@ forbid (
149
149
  action == Guardrails::Action::"call_tool",
150
150
  resource
151
151
  ) when {
152
- context.agent_trust_level == "unverified" &&
152
+ context has agent_trust_level && context.agent_trust_level == "unverified" &&
153
153
  (
154
154
  (context has session_cumulative_risk_score && context.session_cumulative_risk_score > 500) ||
155
155
  (context has session_threat_turns && context.session_threat_turns > 5)
@@ -44,7 +44,7 @@ forbid (
44
44
  action == Guardrails::Action::"call_tool",
45
45
  resource
46
46
  ) when {
47
- context.agent_trust_level != "first_party" &&
47
+ context has agent_trust_level && context.agent_trust_level != "first_party" &&
48
48
  context has tool_category && context.tool_category == "dangerous"
49
49
  };
50
50
 
@@ -58,7 +58,7 @@ forbid (
58
58
  action == Guardrails::Action::"call_tool",
59
59
  resource
60
60
  ) when {
61
- context.agent_trust_level == "unverified" &&
61
+ context has agent_trust_level && context.agent_trust_level == "unverified" &&
62
62
  context has tool_is_sensitive && context.tool_is_sensitive == true
63
63
  };
64
64
 
@@ -72,7 +72,7 @@ forbid (
72
72
  action == Guardrails::Action::"call_tool",
73
73
  resource
74
74
  ) when {
75
- context.agent_trust_level == "unverified" &&
75
+ context has agent_trust_level && context.agent_trust_level == "unverified" &&
76
76
  context has mcp_server_verified && context.mcp_server_verified == false
77
77
  };
78
78
 
@@ -90,7 +90,7 @@ forbid (
90
90
  action == Guardrails::Action::"call_tool",
91
91
  resource
92
92
  ) when {
93
- context.agent_type == "autonomous" &&
93
+ context has agent_type && context.agent_type == "autonomous" &&
94
94
  context has tool_risk_score && context.tool_risk_score > 70
95
95
  };
96
96
 
@@ -104,7 +104,7 @@ forbid (
104
104
  action == Guardrails::Action::"process_prompt",
105
105
  resource
106
106
  ) when {
107
- context.agent_type == "autonomous" &&
107
+ context has agent_type && context.agent_type == "autonomous" &&
108
108
  context has injection_confidence && context.injection_confidence > 50
109
109
  };
110
110
 
@@ -118,7 +118,7 @@ forbid (
118
118
  action == Guardrails::Action::"process_prompt",
119
119
  resource
120
120
  ) when {
121
- context.agent_type == "autonomous" &&
121
+ context has agent_type && context.agent_type == "autonomous" &&
122
122
  context has jailbreak_confidence && context.jailbreak_confidence > 50
123
123
  };
124
124
 
@@ -136,5 +136,5 @@ forbid (
136
136
  action == Guardrails::Action::"connect_server",
137
137
  resource
138
138
  ) when {
139
- context.agent_trust_level == "unverified"
139
+ context has agent_trust_level && context.agent_trust_level == "unverified"
140
140
  };
@@ -114,19 +114,18 @@
114
114
  "severity": "critical",
115
115
  "tags": ["command-injection", "path-traversal", "sql-injection", "security"],
116
116
  "is_active": true
117
- },
117
+ }
118
+ ],
119
+ "templates": [
118
120
  {
119
- "id": "agent-identity-default",
121
+ "id": "agent-identity-trust",
120
122
  "name": "Agent Identity & Trust",
121
123
  "description": "Trust-based access control for AI agents: block unverified agents from dangerous/sensitive tools, apply stricter thresholds for autonomous agents, restrict unverified agents after session threats",
122
124
  "category": "agent_identity",
123
125
  "file": "defaults/agent_identity.cedar",
124
126
  "severity": "critical",
125
- "tags": ["agent-identity", "trust", "a2a", "autonomous", "cross-turn"],
126
- "is_active": true
127
- }
128
- ],
129
- "templates": [
127
+ "tags": ["agent-identity", "trust", "a2a", "autonomous", "cross-turn"]
128
+ },
130
129
  {
131
130
  "id": "mcp-tool-permissions",
132
131
  "name": "MCP Tool Permissions",
@@ -225,6 +224,105 @@
225
224
  "file": "profiles/multi_agent/agent_safety.cedar",
226
225
  "severity": "critical",
227
226
  "tags": ["profile", "multi-agent", "cross-turn", "a2a", "pii", "secrets", "injection", "circuit-breaker"]
227
+ },
228
+ {
229
+ "id": "code-agent-path-security",
230
+ "name": "Code Agent — Path Security",
231
+ "description": "Block access to .env files, credential files, system directories, credential directories, and destructive file operations for coding agents",
232
+ "category": "security",
233
+ "file": "profiles/code_agent/path_security.cedar",
234
+ "severity": "high",
235
+ "tags": ["profile", "code-agent", "path-security", "credentials", "system-paths"]
236
+ },
237
+ {
238
+ "id": "code-agent-supply-chain",
239
+ "name": "Code Agent — Supply Chain Security",
240
+ "description": "Block MCP server poisoning, indirect prompt injection from tool outputs, credential theft patterns, and destructive operation sequences for coding agents",
241
+ "category": "agentic_security",
242
+ "file": "profiles/code_agent/supply_chain.cedar",
243
+ "severity": "critical",
244
+ "tags": ["profile", "code-agent", "supply-chain", "tool-poisoning", "indirect-injection"]
245
+ },
246
+ {
247
+ "id": "code-agent-encoding",
248
+ "name": "Code Agent — Encoding Attacks",
249
+ "description": "Block invisible Unicode characters in tool arguments and file writes to prevent encoding-based prompt injection for coding agents",
250
+ "category": "security",
251
+ "file": "profiles/code_agent/encoding.cedar",
252
+ "severity": "high",
253
+ "tags": ["profile", "code-agent", "encoding", "unicode", "invisible-chars"]
254
+ },
255
+ {
256
+ "id": "advanced-detection-secrets",
257
+ "name": "Advanced Detection — Granular Secrets",
258
+ "description": "Granular secret type blocking for high-risk credentials (cloud provider keys, GitHub tokens, SSH keys, database URLs) and API keys/tokens",
259
+ "category": "security",
260
+ "file": "profiles/advanced_detection/secrets.cedar",
261
+ "severity": "critical",
262
+ "tags": ["profile", "advanced-detection", "secrets", "credentials", "cloud-keys"]
263
+ },
264
+ {
265
+ "id": "advanced-detection-pii",
266
+ "name": "Advanced Detection — PII",
267
+ "description": "Bulk PII exposure blocking, high-confidence ML PII detection, and PII in file operations for advanced threat detection",
268
+ "category": "privacy",
269
+ "file": "profiles/advanced_detection/pii.cedar",
270
+ "severity": "critical",
271
+ "tags": ["profile", "advanced-detection", "pii", "privacy", "ml-classifier"]
272
+ },
273
+ {
274
+ "id": "advanced-detection-threat-severity",
275
+ "name": "Advanced Detection — Threat Severity",
276
+ "description": "Block any content flagged with critical severity by detection engines as a catch-all safety net",
277
+ "category": "security",
278
+ "file": "profiles/advanced_detection/threat_severity.cedar",
279
+ "severity": "critical",
280
+ "tags": ["profile", "advanced-detection", "severity", "critical", "catch-all"]
281
+ },
282
+ {
283
+ "id": "a2a-cross-origin",
284
+ "name": "A2A Security — Cross-Origin Trust Boundaries",
285
+ "description": "Block confused deputy attacks and trust boundary violations from cross-system agent communication — critical cross-origin blocking, unverified agent restrictions, sensitive tool protection",
286
+ "category": "agent_identity",
287
+ "file": "profiles/a2a_security/cross_origin.cedar",
288
+ "severity": "critical",
289
+ "tags": ["profile", "a2a-security", "cross-origin", "confused-deputy", "trust-boundary"]
290
+ },
291
+ {
292
+ "id": "a2a-inter-agent-injection",
293
+ "name": "A2A Security — Inter-Agent Injection Defense",
294
+ "description": "Block indirect prompt injection via tool outputs, multi-turn progressive attacks using deep context models, and encoded payload delivery between independent agents",
295
+ "category": "agent_identity",
296
+ "file": "profiles/a2a_security/inter_agent_injection.cedar",
297
+ "severity": "critical",
298
+ "tags": ["profile", "a2a-security", "indirect-injection", "multi-turn", "encoded-injection", "deep-context"]
299
+ },
300
+ {
301
+ "id": "a2a-supply-chain",
302
+ "name": "A2A Security — Supply Chain & Behavioral Drift",
303
+ "description": "Block tool poisoning from external agent ecosystems, rug pull behavioral drift, and credential theft chains initiated by compromised agents",
304
+ "category": "agent_identity",
305
+ "file": "profiles/a2a_security/supply_chain.cedar",
306
+ "severity": "critical",
307
+ "tags": ["profile", "a2a-security", "supply-chain", "tool-poisoning", "rug-pull", "credential-theft"]
308
+ },
309
+ {
310
+ "id": "a2a-identity-enforcement",
311
+ "name": "A2A Security — Agent Identity Enforcement",
312
+ "description": "Enforce strict identity requirements for cross-system agents — block anonymous agents, require framework registration, prevent unverified autonomous agents",
313
+ "category": "agent_identity",
314
+ "file": "profiles/a2a_security/identity_enforcement.cedar",
315
+ "severity": "critical",
316
+ "tags": ["profile", "a2a-security", "identity", "spoofing", "framework", "autonomous"]
317
+ },
318
+ {
319
+ "id": "a2a-escalation-detection",
320
+ "name": "A2A Security — Escalation Detection & Circuit Breakers",
321
+ "description": "Detect progressive capability escalation across turns with session peak score monitoring and cumulative risk circuit breakers tuned for adversarial A2A communication",
322
+ "category": "agent_identity",
323
+ "file": "profiles/a2a_security/escalation_detection.cedar",
324
+ "severity": "critical",
325
+ "tags": ["profile", "a2a-security", "escalation", "circuit-breaker", "session-peak", "cumulative-risk"]
228
326
  }
229
327
  ],
230
328
  "profiles": [
@@ -239,10 +337,10 @@
239
337
  {
240
338
  "id": "code-agent",
241
339
  "name": "Code Agent",
242
- "description": "Optimized for coding assistants — tool risk controls, shell blocking, loop detection, exfiltration prevention, budget enforcement",
340
+ "description": "Optimized for coding assistants — tool risk controls, shell blocking, loop detection, exfiltration prevention, budget enforcement, path security, supply chain defense, and encoding attack protection",
243
341
  "severity": "high",
244
- "tags": ["code-agent", "tools", "agentic", "exfiltration"],
245
- "template_ids": ["code-agent-agentic-security", "code-agent-security"]
342
+ "tags": ["code-agent", "tools", "agentic", "exfiltration", "path-security", "supply-chain", "encoding"],
343
+ "template_ids": ["code-agent-agentic-security", "code-agent-security", "code-agent-path-security", "code-agent-supply-chain", "code-agent-encoding"]
246
344
  },
247
345
  {
248
346
  "id": "data-pipeline",
@@ -254,11 +352,27 @@
254
352
  },
255
353
  {
256
354
  "id": "multi-agent",
257
- "name": "Multi-Agent Orchestration",
258
- "description": "Production-grade A2A guardrails for multi-agent systems — tiered trust access control, autonomous agent safeguards, cross-turn PII/secrets containment, injection escalation response, cumulative risk circuit breakers",
355
+ "name": "Multi-Agent Orchestration (MAS)",
356
+ "description": "Production-grade guardrails for multi-agent systems with shared orchestration — tiered trust access control, autonomous agent safeguards, cross-turn PII/secrets containment, injection escalation response, cumulative risk circuit breakers. For independent agent-to-agent communication across separate trust domains, use the A2A Security profile",
357
+ "severity": "critical",
358
+ "tags": ["multi-agent", "mas", "trust", "cross-turn", "circuit-breaker"],
359
+ "template_ids": ["agent-identity-trust", "multi-agent-trust", "multi-agent-safety"]
360
+ },
361
+ {
362
+ "id": "a2a-security",
363
+ "name": "A2A Security",
364
+ "description": "Production-grade security for independent agent-to-agent communication across separate trust domains — cross-origin trust enforcement, inter-agent injection defense (indirect, multi-turn, encoded), supply chain protection (tool poisoning, rug pull), identity enforcement, and escalation circuit breakers",
365
+ "severity": "critical",
366
+ "tags": ["a2a-security", "cross-origin", "injection", "supply-chain", "identity", "escalation"],
367
+ "template_ids": ["a2a-cross-origin", "a2a-inter-agent-injection", "a2a-supply-chain", "a2a-identity-enforcement", "a2a-escalation-detection"]
368
+ },
369
+ {
370
+ "id": "advanced-detection",
371
+ "name": "Advanced Detection",
372
+ "description": "Production-grade advanced threat detection — granular secret type blocking, ML-based PII detection, bulk exposure prevention, and critical severity catch-all for high-security environments",
259
373
  "severity": "critical",
260
- "tags": ["multi-agent", "a2a", "trust", "cross-turn", "circuit-breaker"],
261
- "template_ids": ["multi-agent-trust", "multi-agent-safety"]
374
+ "tags": ["advanced-detection", "secrets", "pii", "severity", "ml-detection"],
375
+ "template_ids": ["advanced-detection-secrets", "advanced-detection-pii", "advanced-detection-threat-severity"]
262
376
  }
263
377
  ]
264
378
  }
package/dist/engine.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ActionType } from "./actions.gen.js";
10
10
  */
11
11
  export declare const DEFAULT_LIMITS: {
12
12
  /** Maximum number of keys in a context map */
13
- readonly maxContextKeys: 100;
13
+ readonly maxContextKeys: 200;
14
14
  /** Maximum length of any string value (1MB) */
15
15
  readonly maxStringLength: 1000000;
16
16
  /** Maximum nesting depth for objects/arrays */
package/dist/engine.js CHANGED
@@ -13,7 +13,7 @@ import * as cedar from "@cedar-policy/cedar-wasm/nodejs";
13
13
  */
14
14
  export const DEFAULT_LIMITS = {
15
15
  /** Maximum number of keys in a context map */
16
- maxContextKeys: 100,
16
+ maxContextKeys: 200,
17
17
  /** Maximum length of any string value (1MB) */
18
18
  maxStringLength: 1_000_000,
19
19
  /** Maximum nesting depth for objects/arrays */
@@ -41,6 +41,9 @@ export declare const GuardrailsContextKey: {
41
41
  readonly FactualityScore: "factuality_score";
42
42
  readonly HallucinationScore: "hallucination_score";
43
43
  readonly HateSpeechScore: "hate_speech_score";
44
+ readonly HighestSeverity: "highest_severity";
45
+ readonly IndirectInjectionScore: "indirect_injection_score";
46
+ readonly IndirectInjectionType: "indirect_injection_type";
44
47
  readonly InjectionConfidence: "injection_confidence";
45
48
  readonly InjectionDeepContextScore: "injection_deep_context_score";
46
49
  readonly InjectionPulseScore: "injection_pulse_score";
@@ -65,11 +68,13 @@ export declare const GuardrailsContextKey: {
65
68
  readonly McpServerVerified: "mcp_server_verified";
66
69
  readonly McpTool: "mcp_tool";
67
70
  readonly MultiTurnDetection: "multi_turn_detection";
71
+ readonly Path: "path";
68
72
  readonly PathTraversalDetected: "path_traversal_detected";
69
73
  readonly PathTraversalSeverity: "path_traversal_severity";
70
74
  readonly PathTraversalType: "path_traversal_type";
71
75
  readonly PatternType: "pattern_type";
72
76
  readonly PhishingDetected: "phishing_detected";
77
+ readonly PiiConfidence: "pii_confidence";
73
78
  readonly PiiCount: "pii_count";
74
79
  readonly PiiDetected: "pii_detected";
75
80
  readonly PiiTypes: "pii_types";
@@ -43,6 +43,9 @@ export const GuardrailsContextKey = {
43
43
  FactualityScore: 'factuality_score',
44
44
  HallucinationScore: 'hallucination_score',
45
45
  HateSpeechScore: 'hate_speech_score',
46
+ HighestSeverity: 'highest_severity',
47
+ IndirectInjectionScore: 'indirect_injection_score',
48
+ IndirectInjectionType: 'indirect_injection_type',
46
49
  InjectionConfidence: 'injection_confidence',
47
50
  InjectionDeepContextScore: 'injection_deep_context_score',
48
51
  InjectionPulseScore: 'injection_pulse_score',
@@ -67,11 +70,13 @@ export const GuardrailsContextKey = {
67
70
  McpServerVerified: 'mcp_server_verified',
68
71
  McpTool: 'mcp_tool',
69
72
  MultiTurnDetection: 'multi_turn_detection',
73
+ Path: 'path',
70
74
  PathTraversalDetected: 'path_traversal_detected',
71
75
  PathTraversalSeverity: 'path_traversal_severity',
72
76
  PathTraversalType: 'path_traversal_type',
73
77
  PatternType: 'pattern_type',
74
78
  PhishingDetected: 'phishing_detected',
79
+ PiiConfidence: 'pii_confidence',
75
80
  PiiCount: 'pii_count',
76
81
  PiiDetected: 'pii_detected',
77
82
  PiiTypes: 'pii_types',