@highflame/policy 2.2.36 → 2.2.38

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 (82) hide show
  1. package/_schemas/agent_ops/context.json +792 -0
  2. package/_schemas/agent_ops/schema.cedarschema +127 -109
  3. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar +6 -4
  4. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_escalation.cedar +5 -4
  5. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_inter_agent_injection.cedar +9 -8
  6. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_claude_block_injection.cedar +2 -2
  7. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_defaults.cedar +3 -3
  8. package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_trust.cedar +6 -6
  9. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_chat_assistant.cedar +5 -4
  10. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_defaults.cedar +18 -12
  11. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_semantic.cedar +6 -6
  12. package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_toxicity.cedar +4 -4
  13. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_advanced_secrets.cedar +4 -2
  14. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_data_pipeline.cedar +2 -1
  15. package/_schemas/agent_ops/templates/ported/data-protection/data_protection_defaults.cedar +4 -2
  16. package/_schemas/agent_ops/templates/ported/data-protection/privacy_advanced_pii.cedar +42 -21
  17. package/_schemas/agent_ops/templates/ported/data-protection/privacy_defaults.cedar +14 -7
  18. package/_schemas/agent_ops/templates/ported/data-protection/privacy_pii_model.cedar +10 -5
  19. package/_schemas/agent_ops/templates/ported/organization/organization_team_permissions.cedar +3 -2
  20. package/_schemas/agent_ops/templates/ported/threat-detection/security_advanced_block_critical_severity.cedar +3 -3
  21. package/_schemas/agent_ops/templates/ported/threat-detection/security_chat_assistant.cedar +5 -4
  22. package/_schemas/agent_ops/templates/ported/threat-detection/security_data_pipeline_block_injection.cedar +3 -2
  23. package/_schemas/agent_ops/templates/ported/threat-detection/security_injection.cedar +9 -8
  24. package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +5 -3
  25. package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +9 -7
  26. package/_schemas/ai_gateway/context.json +278 -0
  27. package/_schemas/ai_gateway/schema.cedarschema +37 -7
  28. package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +5 -16
  29. package/_schemas/ai_gateway/templates/defaults/pii.cedar +14 -7
  30. package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +42 -21
  31. package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +10 -5
  32. package/_schemas/ai_gateway/templates/defaults/semantic.cedar +9 -74
  33. package/_schemas/ai_gateway/templates/defaults/tools.cedar +7 -38
  34. package/_schemas/ai_gateway/templates/secrets.cedar +3 -3
  35. package/_schemas/guardrails/context.json +671 -0
  36. package/_schemas/guardrails/schema.cedarschema +23 -2
  37. package/_schemas/guardrails/templates/defaults/agent_identity.cedar +3 -3
  38. package/_schemas/guardrails/templates/defaults/injection.cedar +9 -8
  39. package/_schemas/guardrails/templates/defaults/pii.cedar +14 -7
  40. package/_schemas/guardrails/templates/defaults/pii_model.cedar +10 -5
  41. package/_schemas/guardrails/templates/defaults/secrets.cedar +4 -2
  42. package/_schemas/guardrails/templates/defaults/security_patterns.cedar +5 -3
  43. package/_schemas/guardrails/templates/defaults/semantic.cedar +6 -6
  44. package/_schemas/guardrails/templates/defaults/toxicity.cedar +6 -6
  45. package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +6 -4
  46. package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +5 -4
  47. package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +9 -8
  48. package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +42 -21
  49. package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +4 -2
  50. package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +5 -4
  51. package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +5 -4
  52. package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +2 -1
  53. package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +3 -2
  54. package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +6 -6
  55. package/_schemas/guardrails/templates/templates.json +0 -9
  56. package/dist/agent_ops-defaults.gen.js +177 -120
  57. package/dist/agent_ops-entities.gen.js +5 -1
  58. package/dist/ai_gateway-defaults.gen.js +90 -164
  59. package/dist/ai_gateway-entities.gen.js +6 -2
  60. package/dist/engine.d.ts +10 -0
  61. package/dist/engine.js +25 -1
  62. package/dist/guardrails-defaults.gen.js +144 -145
  63. package/dist/guardrails-entities.gen.js +5 -1
  64. package/dist/service-schemas.gen.d.ts +3 -3
  65. package/dist/service-schemas.gen.js +480 -118
  66. package/package.json +1 -1
  67. package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +0 -30
  68. package/_schemas/mcp_gateway/context.json +0 -655
  69. package/_schemas/mcp_gateway/schema.cedarschema +0 -342
  70. package/_schemas/mcp_gateway/templates/defaults/agent_security.cedar +0 -140
  71. package/_schemas/mcp_gateway/templates/defaults/baseline.cedar +0 -23
  72. package/_schemas/mcp_gateway/templates/defaults/semantic.cedar +0 -105
  73. package/_schemas/mcp_gateway/templates/defaults/tools.cedar +0 -92
  74. package/_schemas/mcp_gateway/templates/mcp_server_allowlist.cedar +0 -33
  75. package/_schemas/mcp_gateway/templates/mcp_tool_permissions.cedar +0 -77
  76. package/_schemas/mcp_gateway/templates/templates.json +0 -89
  77. package/dist/mcp_gateway-context.gen.d.ts +0 -51
  78. package/dist/mcp_gateway-context.gen.js +0 -52
  79. package/dist/mcp_gateway-defaults.gen.d.ts +0 -61
  80. package/dist/mcp_gateway-defaults.gen.js +0 -668
  81. package/dist/mcp_gateway-entities.gen.d.ts +0 -11
  82. package/dist/mcp_gateway-entities.gen.js +0 -37
@@ -27,13 +27,14 @@
27
27
 
28
28
  @id("agent-identity.a2a-block-session-injection-peak")
29
29
  @name("Block agents at high session injection peak")
30
- @description("Blocks call_tool and process_prompt when agent_trust_level is not \"first_party\" and session_max_injection_score >= 70.")
30
+ @description("Blocks call_tool and process_prompt and process_response when agent_trust_level is not \"first_party\" and session_max_injection_score >= 70.")
31
31
  @severity("critical")
32
32
  @tags("category:agent-identity,threat:injection,scope:per-agent,detection:aggregate,owasp:llm01")
33
33
  @reject_message("Request blocked: this session previously crossed the injection peak threshold; non-first-party agents are restricted.")
34
34
  forbid (
35
35
  principal is AgentOps::Agent,
36
- action in [AgentOps::Action::"call_tool", AgentOps::Action::"process_prompt"],
36
+ action in [AgentOps::Action::"call_tool", AgentOps::Action::"process_prompt",
37
+ AgentOps::Action::"process_response"],
37
38
  resource
38
39
  )
39
40
  when {
@@ -43,13 +44,13 @@ when {
43
44
 
44
45
  @id("agent-identity.a2a-block-session-jailbreak-peak")
45
46
  @name("Block agents at high session jailbreak peak")
46
- @description("Blocks process_prompt when agent_trust_level is not \"first_party\" and session_max_jailbreak_score >= 70.")
47
+ @description("Blocks process_prompt and process_response when agent_trust_level is not \"first_party\" and session_max_jailbreak_score >= 70.")
47
48
  @severity("critical")
48
49
  @tags("category:agent-identity,threat:jailbreak,scope:per-agent,detection:aggregate,owasp:llm02")
49
50
  @reject_message("Request blocked: this session previously crossed the jailbreak peak threshold; non-first-party agents are restricted.")
50
51
  forbid (
51
52
  principal is AgentOps::Agent,
52
- action == AgentOps::Action::"process_prompt",
53
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
53
54
  resource
54
55
  )
55
56
  when {
@@ -66,13 +66,13 @@ when {
66
66
 
67
67
  @id("agent-identity.a2a-block-deep-context-injection")
68
68
  @name("Block multi-turn progressive injection")
69
- @description("Blocks process_prompt when agent_trust_level is not \"first_party\", multi_turn_detection is true, and injection_deep_context_score >= 60.")
69
+ @description("Blocks process_prompt and process_response when agent_trust_level is not \"first_party\", multi_turn_detection is true, and injection_deep_context_score >= 60.")
70
70
  @severity("high")
71
- @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,owasp:llm01")
71
+ @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,surface:process-response,owasp:llm01")
72
72
  @reject_message("Prompt blocked: multi-turn progressive injection detected by the deep-context model across conversation history.")
73
73
  forbid (
74
74
  principal is AgentOps::Agent,
75
- action == AgentOps::Action::"process_prompt",
75
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
76
76
  resource
77
77
  )
78
78
  when {
@@ -83,13 +83,13 @@ when {
83
83
 
84
84
  @id("agent-identity.a2a-block-deep-context-jailbreak")
85
85
  @name("Block multi-turn progressive jailbreak")
86
- @description("Blocks process_prompt when agent_trust_level is not \"first_party\", multi_turn_detection is true, and jailbreak_deep_context_score >= 60.")
86
+ @description("Blocks process_prompt and process_response when agent_trust_level is not \"first_party\", multi_turn_detection is true, and jailbreak_deep_context_score >= 60.")
87
87
  @severity("high")
88
- @tags("category:agent-identity,threat:jailbreak,detection:ml,surface:process-prompt,owasp:llm02")
88
+ @tags("category:agent-identity,threat:jailbreak,detection:ml,surface:process-prompt,surface:process-response,owasp:llm02")
89
89
  @reject_message("Prompt blocked: multi-turn progressive jailbreak detected by the deep-context model across conversation history.")
90
90
  forbid (
91
91
  principal is AgentOps::Agent,
92
- action == AgentOps::Action::"process_prompt",
92
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
93
93
  resource
94
94
  )
95
95
  when {
@@ -104,13 +104,14 @@ when {
104
104
 
105
105
  @id("agent-identity.a2a-block-encoded-injection")
106
106
  @name("Block encoded payload delivery between agents")
107
- @description("Blocks process_prompt and call_tool when agent_id is non-empty, encoded_content_detected is true, and encoded_score >= 60.")
107
+ @description("Blocks process_prompt, process_response, and call_tool when agent_id is non-empty, encoded_content_detected is true, and encoded_score >= 60.")
108
108
  @severity("high")
109
109
  @tags("category:agent-identity,threat:encoded-payload,detection:pattern,owasp:llm01")
110
110
  @reject_message("Request blocked: encoded payload detected in agent communication — agents should exchange plaintext, not encoded content.")
111
111
  forbid (
112
112
  principal is AgentOps::Agent,
113
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
113
+ action in [AgentOps::Action::"process_prompt",
114
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
114
115
  resource
115
116
  )
116
117
  when {
@@ -18,11 +18,11 @@
18
18
  @name("Block injection on Claude agent")
19
19
  @description("Blocks process_prompt for the Claude agent when detected_threats contains \"prompt_injection\".")
20
20
  @severity("critical")
21
- @tags("category:agent-identity,threat:injection,scope:per-agent,detection:rule,surface:process-prompt,owasp:llm01")
21
+ @tags("category:agent-identity,threat:injection,scope:per-agent,detection:rule,surface:process-prompt,surface:process-response,owasp:llm01")
22
22
  @reject_message("Prompt blocked: prompt injection detected for the Claude agent.")
23
23
  forbid (
24
24
  principal == AgentOps::Agent::"claude",
25
- action == AgentOps::Action::"process_prompt",
25
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
26
26
  resource
27
27
  )
28
28
  when {
@@ -87,13 +87,13 @@ when {
87
87
 
88
88
  @id("agent-identity.block-autonomous-injection")
89
89
  @name("Block injection on autonomous agents")
90
- @description("Blocks process_prompt when agent_type is \"autonomous\" and injection_score >= 51.")
90
+ @description("Blocks process_prompt and process_response when agent_type is \"autonomous\" and injection_score >= 51.")
91
91
  @severity("high")
92
- @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,owasp:llm01")
92
+ @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,surface:process-response,owasp:llm01")
93
93
  @reject_message("Prompt blocked: lower injection threshold applies to autonomous agents and was exceeded.")
94
94
  forbid (
95
95
  principal is AgentOps::Agent,
96
- action == AgentOps::Action::"process_prompt",
96
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
97
97
  resource
98
98
  )
99
99
  when {
@@ -93,13 +93,13 @@ when {
93
93
 
94
94
  @id("agent-identity.multi-agent-autonomous-injection")
95
95
  @name("Block injection on autonomous agents (stricter)")
96
- @description("Blocks process_prompt when agent_type is \"autonomous\" and injection_score >= 51.")
96
+ @description("Blocks process_prompt and process_response when agent_type is \"autonomous\" and injection_score >= 51.")
97
97
  @severity("high")
98
- @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,owasp:llm01")
98
+ @tags("category:agent-identity,threat:injection,detection:ml,surface:process-prompt,surface:process-response,owasp:llm01")
99
99
  @reject_message("Prompt blocked: lower injection threshold applies to autonomous agents and was exceeded.")
100
100
  forbid (
101
101
  principal is AgentOps::Agent,
102
- action == AgentOps::Action::"process_prompt",
102
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
103
103
  resource
104
104
  )
105
105
  when {
@@ -109,13 +109,13 @@ when {
109
109
 
110
110
  @id("agent-identity.multi-agent-autonomous-jailbreak")
111
111
  @name("Block jailbreak on autonomous agents (stricter)")
112
- @description("Blocks process_prompt when agent_type is \"autonomous\" and jailbreak_score >= 51.")
112
+ @description("Blocks process_prompt and process_response when agent_type is \"autonomous\" and jailbreak_score >= 51.")
113
113
  @severity("high")
114
- @tags("category:agent-identity,threat:jailbreak,detection:ml,surface:process-prompt,owasp:llm02")
114
+ @tags("category:agent-identity,threat:jailbreak,detection:ml,surface:process-prompt,surface:process-response,owasp:llm02")
115
115
  @reject_message("Prompt blocked: lower jailbreak threshold applies to autonomous agents and was exceeded.")
116
116
  forbid (
117
117
  principal is AgentOps::Agent,
118
- action == AgentOps::Action::"process_prompt",
118
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
119
119
  resource
120
120
  )
121
121
  when {
@@ -19,13 +19,13 @@
19
19
 
20
20
  @id("trust-safety.chat-block-toxicity")
21
21
  @name("Block toxicity (chat profile)")
22
- @description("Blocks process_prompt when any toxicity score is >= 71 (lower threshold for public chat).")
22
+ @description("Blocks process_prompt and process_response when any toxicity score is >= 71 (lower threshold for public chat).")
23
23
  @severity("critical")
24
24
  @tags("category:trust-safety,threat:harmful,threat:hate-speech,detection:ml,compliance:eu-ai-act")
25
25
  @reject_message("Prompt blocked: toxic content detected at the chat-profile threshold.")
26
26
  forbid (
27
27
  principal,
28
- action == AgentOps::Action::"process_prompt",
28
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
29
29
  resource
30
30
  )
31
31
  when {
@@ -37,13 +37,14 @@ when {
37
37
 
38
38
  @id("trust-safety.chat-block-restricted-topics")
39
39
  @name("Block restricted topics (chat profile)")
40
- @description("Blocks process_prompt and call_tool when topic_confidence >= 71 and content_topics contains a restricted category.")
40
+ @description("Blocks process_prompt, process_response, and call_tool when topic_confidence >= 71 and content_topics contains a restricted category.")
41
41
  @severity("high")
42
42
  @tags("category:trust-safety,threat:harmful,detection:ml,compliance:eu-ai-act")
43
43
  @reject_message("Prompt blocked: content discusses a topic restricted for chat assistants.")
44
44
  forbid (
45
45
  principal,
46
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
46
+ action in [AgentOps::Action::"process_prompt",
47
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
47
48
  resource
48
49
  )
49
50
  when {
@@ -22,13 +22,14 @@
22
22
 
23
23
  @id("trust-safety.block-violence")
24
24
  @name("Block violent content")
25
- @description("Blocks process_prompt and call_tool when violence_score >= 80.")
25
+ @description("Blocks process_prompt, process_response, and call_tool when violence_score >= 80.")
26
26
  @severity("critical")
27
27
  @tags("category:trust-safety,threat:violence,detection:ml,compliance:nist-si-4,compliance:iso-42001")
28
28
  @reject_message("Content blocked: violent content detected.")
29
29
  forbid (
30
30
  principal,
31
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
31
+ action in [AgentOps::Action::"process_prompt",
32
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
32
33
  resource
33
34
  )
34
35
  when {
@@ -37,13 +38,14 @@ when {
37
38
 
38
39
  @id("trust-safety.block-weapons")
39
40
  @name("Block weapons content")
40
- @description("Blocks process_prompt and call_tool when weapons_score >= 80.")
41
+ @description("Blocks process_prompt, process_response, and call_tool when weapons_score >= 80.")
41
42
  @severity("critical")
42
43
  @tags("category:trust-safety,threat:weapons,detection:ml,compliance:nist-si-4")
43
44
  @reject_message("Content blocked: weapons-related content detected (manufacturing, procurement, or specifications).")
44
45
  forbid (
45
46
  principal,
46
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
47
+ action in [AgentOps::Action::"process_prompt",
48
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
47
49
  resource
48
50
  )
49
51
  when {
@@ -52,13 +54,14 @@ when {
52
54
 
53
55
  @id("trust-safety.block-hate-speech")
54
56
  @name("Block hate speech")
55
- @description("Blocks process_prompt and call_tool when hate_speech_score >= 75.")
57
+ @description("Blocks process_prompt, process_response, and call_tool when hate_speech_score >= 75.")
56
58
  @severity("critical")
57
59
  @tags("category:trust-safety,threat:hate-speech,detection:ml,compliance:nist-si-4,compliance:eu-ai-act")
58
60
  @reject_message("Content blocked: hate speech or discriminatory content detected.")
59
61
  forbid (
60
62
  principal,
61
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
63
+ action in [AgentOps::Action::"process_prompt",
64
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
62
65
  resource
63
66
  )
64
67
  when {
@@ -67,13 +70,14 @@ when {
67
70
 
68
71
  @id("trust-safety.block-crime")
69
72
  @name("Block criminal content")
70
- @description("Blocks process_prompt and call_tool when crime_score >= 80.")
73
+ @description("Blocks process_prompt, process_response, and call_tool when crime_score >= 80.")
71
74
  @severity("high")
72
75
  @tags("category:trust-safety,threat:crime,detection:ml,compliance:nist-si-4")
73
76
  @reject_message("Content blocked: criminal activity content detected (illegal activity, fraud, or related).")
74
77
  forbid (
75
78
  principal,
76
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
79
+ action in [AgentOps::Action::"process_prompt",
80
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
77
81
  resource
78
82
  )
79
83
  when {
@@ -82,13 +86,14 @@ when {
82
86
 
83
87
  @id("trust-safety.block-sexual")
84
88
  @name("Block sexual content")
85
- @description("Blocks process_prompt and call_tool when sexual_score >= 80.")
89
+ @description("Blocks process_prompt, process_response, and call_tool when sexual_score >= 80.")
86
90
  @severity("high")
87
91
  @tags("category:trust-safety,threat:sexual,detection:ml,compliance:eu-ai-act,compliance:iso-42001")
88
92
  @reject_message("Content blocked: sexually explicit content detected.")
89
93
  forbid (
90
94
  principal,
91
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
95
+ action in [AgentOps::Action::"process_prompt",
96
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
92
97
  resource
93
98
  )
94
99
  when {
@@ -97,13 +102,14 @@ when {
97
102
 
98
103
  @id("trust-safety.block-profanity")
99
104
  @name("Block excessive profanity")
100
- @description("Blocks process_prompt and call_tool when profanity_score >= 90.")
105
+ @description("Blocks process_prompt, process_response, and call_tool when profanity_score >= 90.")
101
106
  @severity("medium")
102
107
  @tags("category:trust-safety,threat:profanity,detection:ml")
103
108
  @reject_message("Content blocked: excessive profanity detected — please rephrase in professional language.")
104
109
  forbid (
105
110
  principal,
106
- action in [AgentOps::Action::"process_prompt", AgentOps::Action::"call_tool"],
111
+ action in [AgentOps::Action::"process_prompt",
112
+ AgentOps::Action::"process_response", AgentOps::Action::"call_tool"],
107
113
  resource
108
114
  )
109
115
  when {
@@ -18,13 +18,13 @@
18
18
 
19
19
  @id("trust-safety.block-dangerous-topics")
20
20
  @name("Block dangerous topics")
21
- @description("Blocks process_prompt when content_topics contains weapons or explosives categories.")
21
+ @description("Blocks process_prompt and process_response when content_topics contains weapons or explosives categories.")
22
22
  @severity("critical")
23
23
  @tags("category:trust-safety,threat:harmful,detection:ml,compliance:eu-ai-act")
24
24
  @reject_message("Prompt blocked: content classified under a dangerous topic (weapons, explosives, illegal synthesis).")
25
25
  forbid (
26
26
  principal,
27
- action == AgentOps::Action::"process_prompt",
27
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
28
28
  resource
29
29
  )
30
30
  when {
@@ -38,13 +38,13 @@ when {
38
38
 
39
39
  @id("trust-safety.block-controlled-substances")
40
40
  @name("Block controlled substances")
41
- @description("Blocks process_prompt when content_topics contains controlled substances or precursor chemicals.")
41
+ @description("Blocks process_prompt and process_response when content_topics contains controlled substances or precursor chemicals.")
42
42
  @severity("high")
43
43
  @tags("category:trust-safety,threat:harmful,detection:ml,compliance:eu-ai-act")
44
44
  @reject_message("Prompt blocked: content discusses controlled substances or precursor chemicals.")
45
45
  forbid (
46
46
  principal,
47
- action == AgentOps::Action::"process_prompt",
47
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
48
48
  resource
49
49
  )
50
50
  when {
@@ -58,13 +58,13 @@ when {
58
58
 
59
59
  @id("trust-safety.block-restricted-topics")
60
60
  @name("Block high-confidence restricted topics")
61
- @description("Blocks process_prompt when topic_confidence >= 81 and content_topics contains a restricted category.")
61
+ @description("Blocks process_prompt and process_response when topic_confidence >= 81 and content_topics contains a restricted category.")
62
62
  @severity("high")
63
63
  @tags("category:trust-safety,threat:harmful,detection:ml")
64
64
  @reject_message("Prompt blocked: content high-confidence classified into a restricted topic (illegal activity, fraud, social engineering).")
65
65
  forbid (
66
66
  principal,
67
- action == AgentOps::Action::"process_prompt",
67
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
68
68
  resource
69
69
  )
70
70
  when {
@@ -23,13 +23,13 @@
23
23
 
24
24
  @id("trust-safety.block-toxicity-critical")
25
25
  @name("Block critical toxicity")
26
- @description("Blocks process_prompt when any toxicity score is >= 91.")
26
+ @description("Blocks process_prompt and process_response when any toxicity score is >= 91.")
27
27
  @severity("critical")
28
28
  @tags("category:trust-safety,threat:harmful,detection:ml,compliance:eu-ai-act,compliance:iso-42001")
29
29
  @reject_message("Prompt blocked: critical-severity toxic content detected.")
30
30
  forbid (
31
31
  principal,
32
- action == AgentOps::Action::"process_prompt",
32
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
33
33
  resource
34
34
  )
35
35
  when {
@@ -43,13 +43,13 @@ when {
43
43
 
44
44
  @id("trust-safety.block-toxicity-combined")
45
45
  @name("Block combined toxicity")
46
- @description("Blocks process_prompt when any two toxicity scores are >= 61.")
46
+ @description("Blocks process_prompt and process_response when any two toxicity scores are >= 61.")
47
47
  @severity("high")
48
48
  @tags("category:trust-safety,threat:harmful,detection:aggregate")
49
49
  @reject_message("Prompt blocked: multiple moderate toxicity signals were detected together.")
50
50
  forbid (
51
51
  principal,
52
- action == AgentOps::Action::"process_prompt",
52
+ action in [AgentOps::Action::"process_prompt", AgentOps::Action::"process_response"],
53
53
  resource
54
54
  )
55
55
  when {
@@ -18,7 +18,7 @@
18
18
 
19
19
  @id("data-protection.advanced-block-high-risk-secrets")
20
20
  @name("Block high-risk credential types")
21
- @description("Blocks process_prompt, call_tool, read_file, and write_file when secret_types contains a cloud, GitHub, SSH, or database credential.")
21
+ @description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when secret_types contains a cloud, GitHub, SSH, or database credential.")
22
22
  @severity("critical")
23
23
  @tags("category:data-protection,threat:secrets,detection:rule,owasp:llm06")
24
24
  @reject_message("Content blocked: high-risk credentials detected (cloud keys, GitHub tokens, SSH keys, or database URLs).")
@@ -26,6 +26,7 @@ forbid (
26
26
  principal,
27
27
  action in [
28
28
  AgentOps::Action::"process_prompt",
29
+ AgentOps::Action::"process_response",
29
30
  AgentOps::Action::"call_tool",
30
31
  AgentOps::Action::"read_file",
31
32
  AgentOps::Action::"write_file"
@@ -48,7 +49,7 @@ when {
48
49
 
49
50
  @id("data-protection.advanced-block-api-tokens")
50
51
  @name("Block API keys and bearer tokens")
51
- @description("Blocks process_prompt, call_tool, read_file, and write_file when secret_types contains api_key, bearer_token, jwt_token, or OAuth credentials.")
52
+ @description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when secret_types contains api_key, bearer_token, jwt_token, or OAuth credentials.")
52
53
  @severity("high")
53
54
  @tags("category:data-protection,threat:secrets,detection:rule,owasp:llm06")
54
55
  @reject_message("Content blocked: API keys, bearer tokens, or OAuth credentials detected.")
@@ -56,6 +57,7 @@ forbid (
56
57
  principal,
57
58
  action in [
58
59
  AgentOps::Action::"process_prompt",
60
+ AgentOps::Action::"process_response",
59
61
  AgentOps::Action::"call_tool",
60
62
  AgentOps::Action::"read_file",
61
63
  AgentOps::Action::"write_file"
@@ -17,7 +17,7 @@
17
17
 
18
18
  @id("data-protection.data-pipeline-block-secrets")
19
19
  @name("Block secrets in data pipeline")
20
- @description("Blocks process_prompt, call_tool, read_file, and write_file when secrets_detected is true.")
20
+ @description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when secrets_detected is true.")
21
21
  @severity("critical")
22
22
  @tags("category:data-protection,threat:secrets,detection:rule,owasp:llm06")
23
23
  @reject_message("Request blocked: secrets detected in a data pipeline — any credential exposure is unacceptable here.")
@@ -25,6 +25,7 @@ forbid (
25
25
  principal,
26
26
  action in [
27
27
  AgentOps::Action::"process_prompt",
28
+ AgentOps::Action::"process_response",
28
29
  AgentOps::Action::"call_tool",
29
30
  AgentOps::Action::"read_file",
30
31
  AgentOps::Action::"write_file"
@@ -18,7 +18,7 @@
18
18
 
19
19
  @id("data-protection.block-secrets")
20
20
  @name("Block secrets")
21
- @description("Blocks process_prompt, call_tool, read_file, and write_file when secrets_detected is true.")
21
+ @description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when secrets_detected is true.")
22
22
  @severity("critical")
23
23
  @tags("category:data-protection,threat:secrets,detection:rule,owasp:llm06")
24
24
  @reject_message("Request blocked: secrets or credentials were detected in the content.")
@@ -26,6 +26,7 @@ forbid (
26
26
  principal,
27
27
  action in [
28
28
  AgentOps::Action::"process_prompt",
29
+ AgentOps::Action::"process_response",
29
30
  AgentOps::Action::"call_tool",
30
31
  AgentOps::Action::"read_file",
31
32
  AgentOps::Action::"write_file"
@@ -38,7 +39,7 @@ when {
38
39
 
39
40
  @id("data-protection.block-secrets-bulk")
40
41
  @name("Block secrets (bulk)")
41
- @description("Blocks process_prompt, call_tool, read_file, and write_file when secret_count >= 3.")
42
+ @description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when secret_count >= 3.")
42
43
  @severity("critical")
43
44
  @tags("category:data-protection,threat:secrets,threat:exfiltration,detection:aggregate,owasp:llm06")
44
45
  @reject_message("Request blocked: multiple distinct secrets were detected — possible credential dump.")
@@ -46,6 +47,7 @@ forbid (
46
47
  principal,
47
48
  action in [
48
49
  AgentOps::Action::"process_prompt",
50
+ AgentOps::Action::"process_response",
49
51
  AgentOps::Action::"call_tool",
50
52
  AgentOps::Action::"read_file",
51
53
  AgentOps::Action::"write_file"