@highflame/policy 2.2.35 → 2.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_schemas/agent_ops/context.json +822 -0
- package/_schemas/agent_ops/schema.cedarschema +134 -109
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_cross_origin.cedar +6 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_escalation.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_a2a_inter_agent_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_claude_block_injection.cedar +2 -2
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_defaults.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/agent-security/agent_identity_multi_agent_trust.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_defaults.cedar +18 -12
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_semantic.cedar +6 -6
- package/_schemas/agent_ops/templates/ported/content-safety/trust_safety_toxicity.cedar +4 -4
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_advanced_secrets.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_data_pipeline.cedar +2 -1
- package/_schemas/agent_ops/templates/ported/data-protection/data_protection_defaults.cedar +4 -2
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_advanced_pii.cedar +42 -21
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_defaults.cedar +14 -7
- package/_schemas/agent_ops/templates/ported/data-protection/privacy_pii_model.cedar +10 -5
- package/_schemas/agent_ops/templates/ported/organization/organization_team_permissions.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_advanced_block_critical_severity.cedar +3 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/security_chat_assistant.cedar +5 -4
- package/_schemas/agent_ops/templates/ported/threat-detection/security_data_pipeline_block_injection.cedar +3 -2
- package/_schemas/agent_ops/templates/ported/threat-detection/security_injection.cedar +9 -8
- package/_schemas/agent_ops/templates/ported/threat-detection/security_patterns.cedar +5 -3
- package/_schemas/agent_ops/templates/ported/threat-detection/semantic_defaults.cedar +9 -7
- package/_schemas/ai_gateway/context.json +308 -0
- package/_schemas/ai_gateway/schema.cedarschema +44 -7
- package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +5 -16
- package/_schemas/ai_gateway/templates/defaults/pii.cedar +14 -7
- package/_schemas/ai_gateway/templates/defaults/pii_advanced.cedar +42 -21
- package/_schemas/ai_gateway/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/ai_gateway/templates/defaults/semantic.cedar +9 -74
- package/_schemas/ai_gateway/templates/defaults/tools.cedar +7 -38
- package/_schemas/ai_gateway/templates/secrets.cedar +3 -3
- package/_schemas/guardrails/context.json +701 -0
- package/_schemas/guardrails/schema.cedarschema +30 -2
- package/_schemas/guardrails/templates/defaults/agent_identity.cedar +3 -3
- package/_schemas/guardrails/templates/defaults/injection.cedar +9 -8
- package/_schemas/guardrails/templates/defaults/pii.cedar +14 -7
- package/_schemas/guardrails/templates/defaults/pii_model.cedar +10 -5
- package/_schemas/guardrails/templates/defaults/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/defaults/security_patterns.cedar +5 -3
- package/_schemas/guardrails/templates/defaults/semantic.cedar +6 -6
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +6 -6
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +6 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +9 -8
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +42 -21
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +4 -2
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +5 -4
- package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +2 -1
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +3 -2
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +6 -6
- package/_schemas/guardrails/templates/templates.json +0 -9
- package/_schemas/overwatch/context.json +30 -0
- package/_schemas/overwatch/schema.cedarschema +7 -0
- package/dist/agent_ops-context.gen.d.ts +6 -1
- package/dist/agent_ops-context.gen.js +10 -0
- package/dist/agent_ops-defaults.gen.js +177 -120
- package/dist/agent_ops-entities.gen.js +5 -1
- package/dist/ai_gateway-context.gen.d.ts +6 -1
- package/dist/ai_gateway-context.gen.js +10 -0
- package/dist/ai_gateway-defaults.gen.js +90 -164
- package/dist/ai_gateway-detectors.gen.js +6 -1
- package/dist/ai_gateway-entities.gen.js +6 -2
- package/dist/guardrails-context.gen.d.ts +6 -1
- package/dist/guardrails-context.gen.js +10 -0
- package/dist/guardrails-defaults.gen.js +144 -145
- package/dist/guardrails-detectors.gen.js +6 -1
- package/dist/guardrails-entities.gen.js +5 -1
- package/dist/overwatch-context.gen.d.ts +6 -1
- package/dist/overwatch-context.gen.js +10 -0
- package/dist/overwatch-detectors.gen.js +6 -1
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +528 -118
- package/package.json +1 -1
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +0 -30
|
@@ -55,13 +55,24 @@ namespace Guardrails {
|
|
|
55
55
|
// Actions
|
|
56
56
|
// =========================================================================
|
|
57
57
|
|
|
58
|
-
/// Process user prompts
|
|
58
|
+
/// Process user prompts for security threats and content violations
|
|
59
59
|
action "process_prompt" appliesTo {
|
|
60
60
|
principal: [User, Agent],
|
|
61
61
|
resource: [App, Agent, Session],
|
|
62
62
|
context: ProcessPromptContext
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
/// Process model responses for security threats and content violations.
|
|
66
|
+
/// Distinct trigger from process_prompt (ADR 0031) so a policy can be
|
|
67
|
+
/// scoped to one direction from its head, and so Shield's action-scoped
|
|
68
|
+
/// detector scheduling (INV-DET-001) keeps prompt-only detectors off the
|
|
69
|
+
/// egress path.
|
|
70
|
+
action "process_response" appliesTo {
|
|
71
|
+
principal: [User, Agent],
|
|
72
|
+
resource: [App, Agent, Session],
|
|
73
|
+
context: ProcessResponseContext
|
|
74
|
+
};
|
|
75
|
+
|
|
65
76
|
/// Execute tool calls (shell, file operations, MCP tools)
|
|
66
77
|
action "call_tool" appliesTo {
|
|
67
78
|
principal: [User, Agent],
|
|
@@ -94,7 +105,17 @@ namespace Guardrails {
|
|
|
94
105
|
// Context Types (Action-Specific)
|
|
95
106
|
// =========================================================================
|
|
96
107
|
|
|
97
|
-
/// Context for
|
|
108
|
+
/// Context for the process_response action.
|
|
109
|
+
///
|
|
110
|
+
/// An alias, not a copy: prompts and responses are inspected by the same
|
|
111
|
+
/// detector pipeline and carry the same keys — only the trigger differs
|
|
112
|
+
/// (ADR 0031). Aliasing means a new detector key cannot land on one
|
|
113
|
+
/// direction and go missing on the other, and it guarantees no policy
|
|
114
|
+
/// loses a context key at the cutover, since this is byte-for-byte the
|
|
115
|
+
/// shape responses were already evaluated against under process_prompt.
|
|
116
|
+
type ProcessResponseContext = ProcessPromptContext;
|
|
117
|
+
|
|
118
|
+
/// Context for process_prompt action (user prompts)
|
|
98
119
|
type ProcessPromptContext = {
|
|
99
120
|
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
100
121
|
"role"?: String,
|
|
@@ -405,6 +426,13 @@ namespace Guardrails {
|
|
|
405
426
|
// Tool Operation Classifier (optional) — populated by AST-based classifiers (bash, python, etc.)
|
|
406
427
|
"tool_operation_classes"?: Set<String>, // subset of {"readonly", "write_enabling", "execute_enabling", "network_access", "unknown"}
|
|
407
428
|
|
|
429
|
+
// --- Bash AST resolved target paths (#411 / CAP-DET-007) — newline-delimited (leading+trailing \n); Cedar `like` is anchored so patterns start with "*": sub-tree "*\n/etc/*", bare dir "*\n/etc\n*", exact "*\n/etc/passwd\n*" ---
|
|
430
|
+
"resolved_target_paths"?: String, // union of resolved absolute target paths, any capability
|
|
431
|
+
"read_target_paths"?: String, // paths the command reads or enumerates
|
|
432
|
+
"write_target_paths"?: String, // paths the command writes, creates, or destroys
|
|
433
|
+
"exec_target_paths"?: String, // paths executed as a script
|
|
434
|
+
"unresolved_target"?: Bool, // a target hid behind a variable/glob/$()/inline code, or the path-list cap truncated
|
|
435
|
+
|
|
408
436
|
// Agentic - Multi-Turn Context (optional)
|
|
409
437
|
"conversation_turn"?: Long,
|
|
410
438
|
"multi_turn_detection"?: Bool,
|
|
@@ -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 Guardrails::Agent,
|
|
96
|
-
action
|
|
96
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
97
97
|
resource
|
|
98
98
|
)
|
|
99
99
|
when {
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
|
|
22
22
|
@id("security.block-injection-ml")
|
|
23
23
|
@name("Block injection (ML)")
|
|
24
|
-
@description("Blocks process_prompt and call_tool when injection_score >= 86.")
|
|
24
|
+
@description("Blocks process_prompt, process_response, and call_tool when injection_score >= 86.")
|
|
25
25
|
@severity("high")
|
|
26
26
|
@tags("category:security,threat:injection,detection:ml,owasp:llm01,mitre:atlas-t0051")
|
|
27
27
|
@reject_message("Prompt blocked: the ML classifier detected prompt injection with high confidence.")
|
|
28
28
|
forbid (
|
|
29
29
|
principal,
|
|
30
|
-
action in [Guardrails::Action::"process_prompt",
|
|
30
|
+
action in [Guardrails::Action::"process_prompt",
|
|
31
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool"],
|
|
31
32
|
resource
|
|
32
33
|
)
|
|
33
34
|
when {
|
|
@@ -36,13 +37,13 @@ when {
|
|
|
36
37
|
|
|
37
38
|
@id("security.block-jailbreak-ml")
|
|
38
39
|
@name("Block jailbreak (ML)")
|
|
39
|
-
@description("Blocks process_prompt when jailbreak_score >= 81.")
|
|
40
|
+
@description("Blocks process_prompt and process_response when jailbreak_score >= 81.")
|
|
40
41
|
@severity("high")
|
|
41
42
|
@tags("category:security,threat:jailbreak,detection:ml,owasp:llm02,mitre:atlas-t0054")
|
|
42
43
|
@reject_message("Prompt blocked: the ML classifier detected a jailbreak attempt with high confidence.")
|
|
43
44
|
forbid (
|
|
44
45
|
principal,
|
|
45
|
-
action
|
|
46
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
46
47
|
resource
|
|
47
48
|
)
|
|
48
49
|
when {
|
|
@@ -51,13 +52,13 @@ when {
|
|
|
51
52
|
|
|
52
53
|
@id("security.block-injection-combined")
|
|
53
54
|
@name("Block injection + jailbreak (combined)")
|
|
54
|
-
@description("Blocks process_prompt when injection_score >= 61 and jailbreak_score >= 61.")
|
|
55
|
+
@description("Blocks process_prompt and process_response when injection_score >= 61 and jailbreak_score >= 61.")
|
|
55
56
|
@severity("high")
|
|
56
57
|
@tags("category:security,threat:injection,threat:jailbreak,detection:ml")
|
|
57
58
|
@reject_message("Prompt blocked: moderate injection and jailbreak signals were detected together.")
|
|
58
59
|
forbid (
|
|
59
60
|
principal,
|
|
60
|
-
action
|
|
61
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
61
62
|
resource
|
|
62
63
|
)
|
|
63
64
|
when {
|
|
@@ -67,13 +68,13 @@ when {
|
|
|
67
68
|
|
|
68
69
|
@id("security.block-invisible-chars")
|
|
69
70
|
@name("Block invisible-character injection")
|
|
70
|
-
@description("Blocks process_prompt when invisible_chars_detected is true and invisible_chars_score >= 51.")
|
|
71
|
+
@description("Blocks process_prompt and process_response when invisible_chars_detected is true and invisible_chars_score >= 51.")
|
|
71
72
|
@severity("high")
|
|
72
73
|
@tags("category:security,threat:invisible-chars,threat:injection,detection:pattern")
|
|
73
74
|
@reject_message("Prompt blocked: invisible Unicode characters often used for injection were detected.")
|
|
74
75
|
forbid (
|
|
75
76
|
principal,
|
|
76
|
-
action
|
|
77
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
77
78
|
resource
|
|
78
79
|
)
|
|
79
80
|
when {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
@reject_message("Content blocked: national identifier (SSN, passport, or driver's license) patterns detected.")
|
|
23
23
|
forbid (
|
|
24
24
|
principal,
|
|
25
|
-
action in [Guardrails::Action::"process_prompt",
|
|
25
|
+
action in [Guardrails::Action::"process_prompt",
|
|
26
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
26
27
|
resource
|
|
27
28
|
)
|
|
28
29
|
when {
|
|
@@ -43,7 +44,8 @@ when {
|
|
|
43
44
|
@reject_message("Content blocked: credit card number patterns detected.")
|
|
44
45
|
forbid (
|
|
45
46
|
principal,
|
|
46
|
-
action in [Guardrails::Action::"process_prompt",
|
|
47
|
+
action in [Guardrails::Action::"process_prompt",
|
|
48
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
47
49
|
resource
|
|
48
50
|
)
|
|
49
51
|
when {
|
|
@@ -58,7 +60,8 @@ when {
|
|
|
58
60
|
@reject_message("Content blocked: bank account (IBAN) number patterns detected.")
|
|
59
61
|
forbid (
|
|
60
62
|
principal,
|
|
61
|
-
action in [Guardrails::Action::"process_prompt",
|
|
63
|
+
action in [Guardrails::Action::"process_prompt",
|
|
64
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
62
65
|
resource
|
|
63
66
|
)
|
|
64
67
|
when {
|
|
@@ -79,7 +82,8 @@ when {
|
|
|
79
82
|
@reject_message("Content blocked: medical record identifier patterns detected.")
|
|
80
83
|
forbid (
|
|
81
84
|
principal,
|
|
82
|
-
action in [Guardrails::Action::"process_prompt",
|
|
85
|
+
action in [Guardrails::Action::"process_prompt",
|
|
86
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
83
87
|
resource
|
|
84
88
|
)
|
|
85
89
|
when {
|
|
@@ -102,7 +106,8 @@ when {
|
|
|
102
106
|
@reject_message("Content blocked: tax identifier (ITIN or EIN) patterns detected.")
|
|
103
107
|
forbid (
|
|
104
108
|
principal,
|
|
105
|
-
action in [Guardrails::Action::"process_prompt",
|
|
109
|
+
action in [Guardrails::Action::"process_prompt",
|
|
110
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
106
111
|
resource
|
|
107
112
|
)
|
|
108
113
|
when {
|
|
@@ -122,7 +127,8 @@ when {
|
|
|
122
127
|
@reject_message("Content blocked: credential or API key patterns detected.")
|
|
123
128
|
forbid (
|
|
124
129
|
principal,
|
|
125
|
-
action in [Guardrails::Action::"process_prompt",
|
|
130
|
+
action in [Guardrails::Action::"process_prompt",
|
|
131
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
126
132
|
resource
|
|
127
133
|
)
|
|
128
134
|
when {
|
|
@@ -152,7 +158,8 @@ when {
|
|
|
152
158
|
@reject_message("Content blocked: cryptocurrency wallet address patterns detected.")
|
|
153
159
|
forbid (
|
|
154
160
|
principal,
|
|
155
|
-
action in [Guardrails::Action::"process_prompt",
|
|
161
|
+
action in [Guardrails::Action::"process_prompt",
|
|
162
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
156
163
|
resource
|
|
157
164
|
)
|
|
158
165
|
when {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
@reject_message("Content blocked: national identifier (SSN, passport, or driver's license) patterns detected.")
|
|
23
23
|
forbid (
|
|
24
24
|
principal,
|
|
25
|
-
action in [Guardrails::Action::"process_prompt",
|
|
25
|
+
action in [Guardrails::Action::"process_prompt",
|
|
26
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
26
27
|
resource
|
|
27
28
|
)
|
|
28
29
|
when {
|
|
@@ -37,7 +38,8 @@ when {
|
|
|
37
38
|
@reject_message("Content blocked: credit card number patterns detected.")
|
|
38
39
|
forbid (
|
|
39
40
|
principal,
|
|
40
|
-
action in [Guardrails::Action::"process_prompt",
|
|
41
|
+
action in [Guardrails::Action::"process_prompt",
|
|
42
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
41
43
|
resource
|
|
42
44
|
)
|
|
43
45
|
when {
|
|
@@ -52,7 +54,8 @@ when {
|
|
|
52
54
|
@reject_message("Content blocked: bank account (IBAN) number patterns detected.")
|
|
53
55
|
forbid (
|
|
54
56
|
principal,
|
|
55
|
-
action in [Guardrails::Action::"process_prompt",
|
|
57
|
+
action in [Guardrails::Action::"process_prompt",
|
|
58
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
56
59
|
resource
|
|
57
60
|
)
|
|
58
61
|
when {
|
|
@@ -67,7 +70,8 @@ when {
|
|
|
67
70
|
@reject_message("Content blocked: medical record identifier patterns detected.")
|
|
68
71
|
forbid (
|
|
69
72
|
principal,
|
|
70
|
-
action in [Guardrails::Action::"process_prompt",
|
|
73
|
+
action in [Guardrails::Action::"process_prompt",
|
|
74
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
71
75
|
resource
|
|
72
76
|
)
|
|
73
77
|
when {
|
|
@@ -82,7 +86,8 @@ when {
|
|
|
82
86
|
@reject_message("Content blocked: credential or API key patterns detected.")
|
|
83
87
|
forbid (
|
|
84
88
|
principal,
|
|
85
|
-
action in [Guardrails::Action::"process_prompt",
|
|
89
|
+
action in [Guardrails::Action::"process_prompt",
|
|
90
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool", Guardrails::Action::"read_file", Guardrails::Action::"write_file"],
|
|
86
91
|
resource
|
|
87
92
|
)
|
|
88
93
|
when {
|
|
@@ -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
|
Guardrails::Action::"process_prompt",
|
|
29
|
+
Guardrails::Action::"process_response",
|
|
29
30
|
Guardrails::Action::"call_tool",
|
|
30
31
|
Guardrails::Action::"read_file",
|
|
31
32
|
Guardrails::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
|
Guardrails::Action::"process_prompt",
|
|
50
|
+
Guardrails::Action::"process_response",
|
|
49
51
|
Guardrails::Action::"call_tool",
|
|
50
52
|
Guardrails::Action::"read_file",
|
|
51
53
|
Guardrails::Action::"write_file"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
@id("security.block-path-traversal")
|
|
25
25
|
@name("Block path traversal")
|
|
26
|
-
@description("Blocks process_prompt, call_tool, read_file, and write_file when path_traversal_detected is true and severity is high or critical.")
|
|
26
|
+
@description("Blocks process_prompt, process_response, call_tool, read_file, and write_file when path_traversal_detected is true and severity is high or critical.")
|
|
27
27
|
@severity("high")
|
|
28
28
|
@tags("category:security,threat:path-traversal,detection:pattern,mitre:t1005")
|
|
29
29
|
@reject_message("Request blocked: path traversal pattern detected — sensitive system files or deep directory traversal.")
|
|
@@ -31,6 +31,7 @@ forbid (
|
|
|
31
31
|
principal,
|
|
32
32
|
action in [
|
|
33
33
|
Guardrails::Action::"process_prompt",
|
|
34
|
+
Guardrails::Action::"process_response",
|
|
34
35
|
Guardrails::Action::"call_tool",
|
|
35
36
|
Guardrails::Action::"read_file",
|
|
36
37
|
Guardrails::Action::"write_file"
|
|
@@ -45,13 +46,14 @@ when {
|
|
|
45
46
|
|
|
46
47
|
@id("security.block-sql-injection")
|
|
47
48
|
@name("Block SQL injection")
|
|
48
|
-
@description("Blocks process_prompt and call_tool when sql_injection_detected is true and sql_injection_score >= 75.")
|
|
49
|
+
@description("Blocks process_prompt, process_response, and call_tool when sql_injection_detected is true and sql_injection_score >= 75.")
|
|
49
50
|
@severity("high")
|
|
50
51
|
@tags("category:security,threat:sql-injection,detection:pattern")
|
|
51
52
|
@reject_message("Request blocked: SQL injection pattern detected — tautology, UNION attack, or destructive query.")
|
|
52
53
|
forbid (
|
|
53
54
|
principal,
|
|
54
|
-
action in [Guardrails::Action::"process_prompt",
|
|
55
|
+
action in [Guardrails::Action::"process_prompt",
|
|
56
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool"],
|
|
55
57
|
resource
|
|
56
58
|
)
|
|
57
59
|
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
|
|
27
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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
|
|
47
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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
|
|
67
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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
|
|
32
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
33
33
|
resource
|
|
34
34
|
)
|
|
35
35
|
when {
|
|
@@ -43,13 +43,13 @@ when {
|
|
|
43
43
|
|
|
44
44
|
@id("trust-safety.block-hate-speech")
|
|
45
45
|
@name("Block hate speech")
|
|
46
|
-
@description("Blocks process_prompt when hate_speech_score >= 76.")
|
|
46
|
+
@description("Blocks process_prompt and process_response when hate_speech_score >= 76.")
|
|
47
47
|
@severity("high")
|
|
48
48
|
@tags("category:trust-safety,threat:hate-speech,detection:ml,compliance:eu-ai-act")
|
|
49
49
|
@reject_message("Prompt blocked: hate speech detected.")
|
|
50
50
|
forbid (
|
|
51
51
|
principal,
|
|
52
|
-
action
|
|
52
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
53
53
|
resource
|
|
54
54
|
)
|
|
55
55
|
when {
|
|
@@ -58,13 +58,13 @@ when {
|
|
|
58
58
|
|
|
59
59
|
@id("trust-safety.block-toxicity-combined")
|
|
60
60
|
@name("Block combined toxicity")
|
|
61
|
-
@description("Blocks process_prompt when any two toxicity scores are >= 61.")
|
|
61
|
+
@description("Blocks process_prompt and process_response when any two toxicity scores are >= 61.")
|
|
62
62
|
@severity("high")
|
|
63
63
|
@tags("category:trust-safety,threat:harmful,detection:aggregate")
|
|
64
64
|
@reject_message("Prompt blocked: multiple moderate toxicity signals were detected together.")
|
|
65
65
|
forbid (
|
|
66
66
|
principal,
|
|
67
|
-
action
|
|
67
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::Action::"process_response"],
|
|
68
68
|
resource
|
|
69
69
|
)
|
|
70
70
|
when {
|
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
|
|
25
25
|
@id("agent-identity.a2a-block-cross-origin-critical")
|
|
26
26
|
@name("Block critical cross-origin from any agent")
|
|
27
|
-
@description("Blocks process_prompt and call_tool when cross_origin_detected is true and cross_origin_score >= 80.")
|
|
27
|
+
@description("Blocks process_prompt, process_response, and call_tool when cross_origin_detected is true and cross_origin_score >= 80.")
|
|
28
28
|
@severity("critical")
|
|
29
29
|
@tags("category:agent-identity,threat:supply-chain,detection:ml,owasp:llm08")
|
|
30
30
|
@reject_message("Request blocked: high-confidence cross-origin trust-boundary violation detected — confused-deputy attack.")
|
|
31
31
|
forbid (
|
|
32
32
|
principal is Guardrails::Agent,
|
|
33
|
-
action in [Guardrails::Action::"process_prompt",
|
|
33
|
+
action in [Guardrails::Action::"process_prompt",
|
|
34
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool"],
|
|
34
35
|
resource
|
|
35
36
|
)
|
|
36
37
|
when {
|
|
@@ -41,13 +42,14 @@ when {
|
|
|
41
42
|
|
|
42
43
|
@id("agent-identity.a2a-block-cross-origin-unverified")
|
|
43
44
|
@name("Block cross-origin from unverified agents")
|
|
44
|
-
@description("Blocks process_prompt and call_tool when agent_trust_level is \"unverified\", cross_origin_detected is true, and cross_origin_score >= 60.")
|
|
45
|
+
@description("Blocks process_prompt, process_response, and call_tool when agent_trust_level is \"unverified\", cross_origin_detected is true, and cross_origin_score >= 60.")
|
|
45
46
|
@severity("high")
|
|
46
47
|
@tags("category:agent-identity,threat:supply-chain,scope:per-agent,detection:ml,owasp:asi03")
|
|
47
48
|
@reject_message("Request blocked: unverified agent attempted cross-origin activity — no trust attestation across trust domains.")
|
|
48
49
|
forbid (
|
|
49
50
|
principal is Guardrails::Agent,
|
|
50
|
-
action in [Guardrails::Action::"process_prompt",
|
|
51
|
+
action in [Guardrails::Action::"process_prompt",
|
|
52
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool"],
|
|
51
53
|
resource
|
|
52
54
|
)
|
|
53
55
|
when {
|
|
@@ -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 Guardrails::Agent,
|
|
36
|
-
action in [Guardrails::Action::"call_tool", Guardrails::Action::"process_prompt"
|
|
36
|
+
action in [Guardrails::Action::"call_tool", Guardrails::Action::"process_prompt",
|
|
37
|
+
Guardrails::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 Guardrails::Agent,
|
|
52
|
-
action
|
|
53
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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 Guardrails::Agent,
|
|
75
|
-
action
|
|
75
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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 Guardrails::Agent,
|
|
92
|
-
action
|
|
92
|
+
action in [Guardrails::Action::"process_prompt", Guardrails::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 Guardrails::Agent,
|
|
113
|
-
action in [Guardrails::Action::"process_prompt",
|
|
113
|
+
action in [Guardrails::Action::"process_prompt",
|
|
114
|
+
Guardrails::Action::"process_response", Guardrails::Action::"call_tool"],
|
|
114
115
|
resource
|
|
115
116
|
)
|
|
116
117
|
when {
|