@highflame/policy 2.1.35 → 2.1.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/ai_gateway/context.json +431 -11
- package/_schemas/ai_gateway/schema.cedarschema +91 -11
- package/_schemas/ai_gateway/templates/defaults/agent_security.cedar +66 -43
- package/_schemas/ai_gateway/templates/defaults/baseline.cedar +9 -11
- package/_schemas/ai_gateway/templates/defaults/semantic.cedar +63 -40
- package/_schemas/ai_gateway/templates/defaults/tools.cedar +48 -36
- package/_schemas/ai_gateway/templates/llm_default_allow.cedar +9 -10
- package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +22 -14
- package/_schemas/ai_gateway/templates/mcp_tool_permissions.cedar +29 -27
- package/_schemas/ai_gateway/templates/pii_redaction.cedar +38 -33
- package/_schemas/ai_gateway/templates/templates.json +52 -50
- package/_schemas/guardrails/context.json +12 -12
- package/_schemas/guardrails/schema.cedarschema +12 -12
- package/_schemas/guardrails/templates/defaults/agent_identity.cedar +60 -56
- package/_schemas/guardrails/templates/defaults/agentic_safety.cedar +83 -58
- package/_schemas/guardrails/templates/defaults/baseline.cedar +9 -12
- package/_schemas/guardrails/templates/defaults/injection.cedar +48 -36
- package/_schemas/guardrails/templates/defaults/pii.cedar +27 -20
- package/_schemas/guardrails/templates/defaults/secrets.cedar +39 -22
- package/_schemas/guardrails/templates/defaults/security_patterns.cedar +38 -25
- package/_schemas/guardrails/templates/defaults/semantic.cedar +47 -31
- package/_schemas/guardrails/templates/defaults/tool_risk.cedar +34 -26
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +57 -47
- package/_schemas/guardrails/templates/mcp_tool_permissions.cedar +60 -43
- package/_schemas/guardrails/templates/profiles/a2a_security/cross_origin.cedar +29 -42
- package/_schemas/guardrails/templates/profiles/a2a_security/escalation_detection.cedar +43 -57
- package/_schemas/guardrails/templates/profiles/a2a_security/identity_enforcement.cedar +40 -57
- package/_schemas/guardrails/templates/profiles/a2a_security/inter_agent_injection.cedar +48 -62
- package/_schemas/guardrails/templates/profiles/a2a_security/supply_chain.cedar +40 -56
- package/_schemas/guardrails/templates/profiles/advanced_detection/pii.cedar +24 -34
- package/_schemas/guardrails/templates/profiles/advanced_detection/secrets.cedar +45 -37
- package/_schemas/guardrails/templates/profiles/advanced_detection/threat_severity.cedar +11 -16
- package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +22 -9
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +27 -15
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +37 -22
- package/_schemas/guardrails/templates/profiles/code_agent/agentic_security.cedar +68 -47
- package/_schemas/guardrails/templates/profiles/code_agent/encoding.cedar +17 -21
- package/_schemas/guardrails/templates/profiles/code_agent/path_security.cedar +74 -73
- package/_schemas/guardrails/templates/profiles/code_agent/security.cedar +13 -9
- package/_schemas/guardrails/templates/profiles/code_agent/supply_chain.cedar +36 -58
- package/_schemas/guardrails/templates/profiles/data_pipeline/agentic_security.cedar +22 -15
- package/_schemas/guardrails/templates/profiles/data_pipeline/data_protection.cedar +52 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +41 -18
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +18 -36
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_safety.cedar +86 -79
- package/_schemas/guardrails/templates/profiles/multi_agent/agent_trust.cedar +73 -70
- package/_schemas/guardrails/templates/templates.json +198 -217
- package/_schemas/overwatch/context.json +14 -14
- package/_schemas/overwatch/schema.cedarschema +12 -12
- package/_schemas/sentry/context.json +11 -11
- package/_schemas/sentry/schema.cedarschema +11 -11
- package/_schemas/sentry/templates/defaults/baseline.cedar +8 -12
- package/_schemas/sentry/templates/defaults/clipboard.cedar +43 -42
- package/_schemas/sentry/templates/defaults/content_safety.cedar +38 -68
- package/_schemas/sentry/templates/defaults/file_safety.cedar +18 -26
- package/_schemas/sentry/templates/defaults/organization.cedar +10 -17
- package/_schemas/sentry/templates/defaults/pii.cedar +52 -73
- package/_schemas/sentry/templates/defaults/secrets.cedar +65 -58
- package/_schemas/sentry/templates/defaults/semantic.cedar +40 -59
- package/_schemas/sentry/templates/templates.json +53 -43
- package/dist/ai_gateway-context.gen.d.ts +18 -4
- package/dist/ai_gateway-context.gen.js +18 -4
- package/dist/ai_gateway-defaults.gen.d.ts +4 -1
- package/dist/ai_gateway-defaults.gen.js +398 -320
- package/dist/builder.d.ts +2 -1
- package/dist/builder.js +5 -2
- package/dist/guardrails-context.gen.d.ts +5 -5
- package/dist/guardrails-context.gen.js +5 -5
- package/dist/guardrails-defaults.gen.d.ts +4 -1
- package/dist/guardrails-defaults.gen.js +2130 -1903
- package/dist/overwatch-context.gen.d.ts +5 -5
- package/dist/overwatch-context.gen.js +5 -5
- package/dist/overwatch-defaults.gen.d.ts +4 -1
- package/dist/overwatch-defaults.gen.js +560 -566
- package/dist/sentry-context.gen.d.ts +3 -3
- package/dist/sentry-context.gen.js +3 -3
- package/dist/sentry-defaults.gen.d.ts +4 -1
- package/dist/sentry-defaults.gen.js +392 -453
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +249 -99
- package/package.json +1 -1
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// Tool Permissioning
|
|
2
|
+
// Tool Permissioning (Default)
|
|
3
3
|
// =============================================================================
|
|
4
|
-
//
|
|
5
|
-
//
|
|
4
|
+
// Blocks MCP tool calls based on risk scoring, threat detection, and tool
|
|
5
|
+
// classification.
|
|
6
6
|
//
|
|
7
|
-
//
|
|
7
|
+
// Detection layers:
|
|
8
|
+
// - Computed risk score (tool_risk_score)
|
|
9
|
+
// - Detector category labels (tool_category, tool_is_sensitive)
|
|
10
|
+
// - Threat aggregation (threat_count, max_threat_severity)
|
|
11
|
+
// - Detection rule triggers (detected_threats)
|
|
12
|
+
//
|
|
13
|
+
// Context keys consumed:
|
|
14
|
+
// - tool_risk_score: Long (0-100)
|
|
15
|
+
// - tool_category: String
|
|
16
|
+
// - tool_is_sensitive: Bool
|
|
17
|
+
// - threat_count: Long
|
|
18
|
+
// - max_threat_severity: Long (0-4)
|
|
19
|
+
// - detected_threats: Set<String>
|
|
20
|
+
//
|
|
21
|
+
// Compliance:
|
|
22
|
+
// - OWASP LLM06, OWASP ASI02
|
|
23
|
+
// - MITRE T1059
|
|
24
|
+
//
|
|
25
|
+
// Category: tools
|
|
8
26
|
// Namespace: AIGateway
|
|
9
27
|
// =============================================================================
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@description("Block tool operations when the computed risk score exceeds 90/100")
|
|
29
|
+
@id("tools.block-high-risk-score")
|
|
30
|
+
@name("Block high-risk tools")
|
|
31
|
+
@description("Blocks call_tool when tool_risk_score >= 90.")
|
|
15
32
|
@severity("critical")
|
|
16
|
-
@tags("tool
|
|
17
|
-
@reject_message("Tool execution blocked:
|
|
33
|
+
@tags("category:tools,detection:aggregate,surface:call-tool,owasp:llm06,owasp:asi02")
|
|
34
|
+
@reject_message("Tool execution blocked: tool risk score is at or above 90/100.")
|
|
18
35
|
forbid (
|
|
19
36
|
principal,
|
|
20
37
|
action == AIGateway::Action::"call_tool",
|
|
@@ -24,13 +41,12 @@ when {
|
|
|
24
41
|
context has tool_risk_score && context.tool_risk_score >= 90
|
|
25
42
|
};
|
|
26
43
|
|
|
27
|
-
|
|
28
|
-
@id("tools-block-dangerous-category")
|
|
44
|
+
@id("tools.block-dangerous-category")
|
|
29
45
|
@name("Block dangerous tool category")
|
|
30
|
-
@description("
|
|
46
|
+
@description("Blocks call_tool when tool_category equals \"dangerous\".")
|
|
31
47
|
@severity("critical")
|
|
32
|
-
@tags("
|
|
33
|
-
@reject_message("Tool execution blocked:
|
|
48
|
+
@tags("category:tools,detection:rule,surface:call-tool,owasp:llm06")
|
|
49
|
+
@reject_message("Tool execution blocked: tool is classified as dangerous.")
|
|
34
50
|
forbid (
|
|
35
51
|
principal,
|
|
36
52
|
action == AIGateway::Action::"call_tool",
|
|
@@ -40,30 +56,28 @@ when {
|
|
|
40
56
|
context has tool_category && context.tool_category == "dangerous"
|
|
41
57
|
};
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
@id("tools-block-sensitive-with-threats")
|
|
59
|
+
@id("tools.block-sensitive-with-threats")
|
|
45
60
|
@name("Block sensitive tools with threats")
|
|
46
|
-
@description("
|
|
61
|
+
@description("Blocks call_tool when tool_is_sensitive is true and threat_count >= 1.")
|
|
47
62
|
@severity("high")
|
|
48
|
-
@tags("
|
|
49
|
-
@reject_message("
|
|
63
|
+
@tags("category:tools,detection:aggregate,surface:call-tool,owasp:llm06")
|
|
64
|
+
@reject_message("Tool execution blocked: a sensitive tool was called while threats were detected.")
|
|
50
65
|
forbid (
|
|
51
66
|
principal,
|
|
52
67
|
action == AIGateway::Action::"call_tool",
|
|
53
68
|
resource
|
|
54
69
|
)
|
|
55
70
|
when {
|
|
56
|
-
context has tool_is_sensitive && context.tool_is_sensitive &&
|
|
57
|
-
context has threat_count && context.threat_count
|
|
71
|
+
context has tool_is_sensitive && context.tool_is_sensitive == true &&
|
|
72
|
+
context has threat_count && context.threat_count >= 1
|
|
58
73
|
};
|
|
59
74
|
|
|
60
|
-
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
@description("Prevent tool execution when high or critical severity threats are detected")
|
|
75
|
+
@id("tools.block-high-severity")
|
|
76
|
+
@name("Block high-severity tool calls")
|
|
77
|
+
@description("Blocks call_tool when threat_count >= 1 and max_threat_severity >= 3.")
|
|
64
78
|
@severity("high")
|
|
65
|
-
@tags("tools,
|
|
66
|
-
@reject_message("Tool execution
|
|
79
|
+
@tags("category:tools,detection:aggregate,surface:call-tool")
|
|
80
|
+
@reject_message("Tool execution blocked: high or critical severity threats were detected.")
|
|
67
81
|
forbid (
|
|
68
82
|
principal,
|
|
69
83
|
action == AIGateway::Action::"call_tool",
|
|
@@ -71,15 +85,14 @@ forbid (
|
|
|
71
85
|
)
|
|
72
86
|
when {
|
|
73
87
|
context has threat_count && context has max_threat_severity &&
|
|
74
|
-
context.threat_count
|
|
88
|
+
context.threat_count >= 1 && context.max_threat_severity >= 3
|
|
75
89
|
};
|
|
76
90
|
|
|
77
|
-
|
|
78
|
-
@
|
|
79
|
-
@
|
|
80
|
-
@description("Block tool calls when command injection patterns are detected in arguments")
|
|
91
|
+
@id("tools.block-command-injection")
|
|
92
|
+
@name("Block command injection")
|
|
93
|
+
@description("Blocks call_tool when detected_threats contains \"command_injection\".")
|
|
81
94
|
@severity("critical")
|
|
82
|
-
@tags("command-injection,
|
|
95
|
+
@tags("category:tools,threat:command-injection,detection:rule,surface:call-tool,mitre:t1059,owasp:asi02")
|
|
83
96
|
@reject_message("Tool execution blocked: command injection pattern detected in tool arguments.")
|
|
84
97
|
forbid (
|
|
85
98
|
principal,
|
|
@@ -87,6 +100,5 @@ forbid (
|
|
|
87
100
|
resource
|
|
88
101
|
)
|
|
89
102
|
when {
|
|
90
|
-
context has detected_threats &&
|
|
91
|
-
context.detected_threats.contains("command_injection")
|
|
103
|
+
context has detected_threats && context.detected_threats.contains("command_injection")
|
|
92
104
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// Default Allow
|
|
2
|
+
// LLM Default Allow
|
|
3
3
|
// =============================================================================
|
|
4
|
-
// Permits all LLM prompt processing by default. Deploy
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// Permits all LLM prompt processing by default. Deploy alongside threat-specific
|
|
5
|
+
// forbid policies to create a "default allow, block on threat" posture for LLM
|
|
6
|
+
// chat completions.
|
|
7
7
|
//
|
|
8
|
-
// Category:
|
|
8
|
+
// Category: organization
|
|
9
9
|
// Namespace: AIGateway
|
|
10
10
|
// =============================================================================
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@
|
|
14
|
-
@
|
|
15
|
-
@description("Permits all LLM chat completion requests by default -- threat-specific forbid policies override this when threats are detected")
|
|
12
|
+
@id("organization.permit-llm-default")
|
|
13
|
+
@name("Permit LLM proxy calls")
|
|
14
|
+
@description("Permits all process_prompt actions for the LLM proxy.")
|
|
16
15
|
@severity("low")
|
|
17
|
-
@tags("
|
|
16
|
+
@tags("category:organization,surface:process-prompt,posture:permit-default")
|
|
18
17
|
permit (
|
|
19
18
|
principal,
|
|
20
19
|
action == AIGateway::Action::"process_prompt",
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// MCP Server Allowlist
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Restricts MCP server connections to a pre-approved list. Customize the
|
|
5
|
+
// `context.mcp_server` values in the permit rule to match the allowed
|
|
6
|
+
// servers for your environment.
|
|
4
7
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
8
|
+
// Context keys consumed:
|
|
9
|
+
// - mcp_server: String
|
|
10
|
+
//
|
|
11
|
+
// Category: tools
|
|
12
|
+
// Namespace: AIGateway
|
|
13
|
+
// =============================================================================
|
|
7
14
|
|
|
8
|
-
@id("mcp-allowlist
|
|
9
|
-
@name("Allow
|
|
10
|
-
@description("
|
|
15
|
+
@id("tools.allow-mcp-allowlist")
|
|
16
|
+
@name("Allow allowlisted MCP servers")
|
|
17
|
+
@description("Permits connect_server when mcp_server is in the allowlist.")
|
|
11
18
|
@severity("medium")
|
|
12
|
-
@tags("
|
|
19
|
+
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
13
20
|
permit (
|
|
14
21
|
principal,
|
|
15
22
|
action == AIGateway::Action::"connect_server",
|
|
@@ -18,14 +25,15 @@ permit (
|
|
|
18
25
|
when {
|
|
19
26
|
context has mcp_server &&
|
|
20
27
|
(context.mcp_server == "filesystem" ||
|
|
21
|
-
|
|
28
|
+
context.mcp_server == "playwright")
|
|
22
29
|
};
|
|
23
30
|
|
|
24
|
-
@id("
|
|
25
|
-
@name("
|
|
26
|
-
@description("
|
|
31
|
+
@id("tools.deny-non-allowlisted-mcp")
|
|
32
|
+
@name("Block non-allowlisted MCP servers")
|
|
33
|
+
@description("Blocks connect_server unconditionally so only the allowlist permit applies.")
|
|
27
34
|
@severity("medium")
|
|
28
|
-
@tags("
|
|
35
|
+
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
36
|
+
@reject_message("MCP server connection blocked: server is not on the allowlist.")
|
|
29
37
|
forbid (
|
|
30
38
|
principal,
|
|
31
39
|
action == AIGateway::Action::"connect_server",
|
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// MCP Tool Permissions
|
|
2
|
+
// MCP Tool Permissions
|
|
3
3
|
// =============================================================================
|
|
4
|
-
// Per-tool access control for MCP servers.
|
|
5
|
-
//
|
|
6
|
-
// with fine-grained per-tool control on call_tool action.
|
|
4
|
+
// Per-tool access control for MCP servers. Complements MCP Server Allowlist
|
|
5
|
+
// (which gates connect_server) with fine-grained control on call_tool.
|
|
7
6
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// Ships permit-all by default plus two opt-in safety rails (exclude
|
|
8
|
+
// untrusted/deprecated servers, block unverified servers). Add additional
|
|
9
|
+
// forbid rules to gate specific servers or tools.
|
|
10
10
|
//
|
|
11
|
-
//
|
|
11
|
+
// Context keys consumed:
|
|
12
|
+
// - mcp_server: String
|
|
13
|
+
// - mcp_server_verified: Bool
|
|
14
|
+
//
|
|
15
|
+
// Category: tools
|
|
12
16
|
// Namespace: AIGateway
|
|
13
17
|
// =============================================================================
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@
|
|
18
|
-
@name("Allow all MCP tool calls")
|
|
19
|
-
@description("Permit every call_tool action. Add forbid rules below for per-tool gating.")
|
|
19
|
+
@id("tools.allow-mcp-tools-baseline")
|
|
20
|
+
@name("Permit MCP tool calls")
|
|
21
|
+
@description("Permits all call_tool actions; combine with forbid rules for gating.")
|
|
20
22
|
@severity("low")
|
|
21
|
-
@tags("
|
|
23
|
+
@tags("category:tools,surface:call-tool,posture:permit-default")
|
|
22
24
|
permit (
|
|
23
25
|
principal,
|
|
24
26
|
action == AIGateway::Action::"call_tool",
|
|
25
27
|
resource
|
|
26
28
|
);
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@
|
|
31
|
-
@name("Exclude specific MCP servers")
|
|
32
|
-
@description("Block all tool calls from excluded MCP servers (org-wide exclusion list)")
|
|
30
|
+
@id("tools.exclude-mcp-servers")
|
|
31
|
+
@name("Block excluded MCP servers")
|
|
32
|
+
@description("Blocks call_tool when mcp_server is in the org-wide exclusion list.")
|
|
33
33
|
@severity("critical")
|
|
34
|
-
@tags("
|
|
34
|
+
@tags("category:tools,surface:call-tool,scope:org-wide,posture:deny-default")
|
|
35
|
+
@reject_message("Tool execution blocked: MCP server is on the org-wide exclusion list.")
|
|
35
36
|
forbid (
|
|
36
37
|
principal,
|
|
37
38
|
action == AIGateway::Action::"call_tool",
|
|
38
39
|
resource
|
|
39
|
-
)
|
|
40
|
+
)
|
|
41
|
+
when {
|
|
40
42
|
context has mcp_server &&
|
|
41
43
|
(context.mcp_server == "untrusted-server" ||
|
|
42
44
|
context.mcp_server == "deprecated-server")
|
|
43
45
|
};
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@
|
|
48
|
-
@name("Block tools from unverified MCP servers")
|
|
49
|
-
@description("Deny tool calls from MCP servers not in the verified registry")
|
|
47
|
+
@id("tools.block-unverified-mcp-tools")
|
|
48
|
+
@name("Block unverified MCP server tools")
|
|
49
|
+
@description("Blocks call_tool when mcp_server_verified is false.")
|
|
50
50
|
@severity("high")
|
|
51
|
-
@tags("
|
|
51
|
+
@tags("category:tools,threat:supply-chain,detection:rule,surface:call-tool")
|
|
52
|
+
@reject_message("Tool execution blocked: MCP server is not from a verified registry.")
|
|
52
53
|
forbid (
|
|
53
54
|
principal,
|
|
54
55
|
action == AIGateway::Action::"call_tool",
|
|
55
56
|
resource
|
|
56
|
-
)
|
|
57
|
+
)
|
|
58
|
+
when {
|
|
57
59
|
context has mcp_server_verified && context.mcp_server_verified == false
|
|
58
60
|
};
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// PII Redaction
|
|
2
|
+
// PII & Secrets Redaction
|
|
3
3
|
// =============================================================================
|
|
4
|
-
//
|
|
5
|
-
//
|
|
4
|
+
// Blocks AI Gateway operations when personally identifiable information or
|
|
5
|
+
// secrets are detected in the content. Covers both LLM prompt processing
|
|
6
|
+
// and MCP tool calls, plus a bulk-exposure catch-all.
|
|
6
7
|
//
|
|
7
|
-
//
|
|
8
|
+
// Context keys consumed:
|
|
9
|
+
// - pii_detected: Bool
|
|
10
|
+
// - secrets_detected: Bool
|
|
11
|
+
// - pii_count: Long
|
|
12
|
+
//
|
|
13
|
+
// Compliance:
|
|
14
|
+
// - OWASP LLM06
|
|
15
|
+
// - GDPR, HIPAA (depending on data classification)
|
|
16
|
+
//
|
|
17
|
+
// Category: data-protection
|
|
8
18
|
// Namespace: AIGateway
|
|
9
19
|
// =============================================================================
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@description("Block any AI Gateway operation when PII is detected in the content")
|
|
21
|
+
@id("data-protection.block-pii")
|
|
22
|
+
@name("Block PII in prompts")
|
|
23
|
+
@description("Blocks process_prompt when pii_detected is true.")
|
|
15
24
|
@severity("high")
|
|
16
|
-
@tags("
|
|
17
|
-
@reject_message("
|
|
25
|
+
@tags("category:data-protection,threat:pii,detection:rule,surface:process-prompt,owasp:llm06")
|
|
26
|
+
@reject_message("Prompt blocked: personally identifiable information was detected — remove sensitive data and retry.")
|
|
18
27
|
forbid (
|
|
19
28
|
principal,
|
|
20
29
|
action == AIGateway::Action::"process_prompt",
|
|
@@ -24,29 +33,27 @@ when {
|
|
|
24
33
|
context has pii_detected && context.pii_detected == true
|
|
25
34
|
};
|
|
26
35
|
|
|
27
|
-
|
|
28
|
-
@
|
|
29
|
-
@
|
|
30
|
-
@description("Block any AI Gateway operation when secrets or credentials are detected")
|
|
36
|
+
@id("data-protection.block-secrets")
|
|
37
|
+
@name("Block secrets in prompts")
|
|
38
|
+
@description("Blocks process_prompt when secrets_detected is true.")
|
|
31
39
|
@severity("critical")
|
|
32
|
-
@tags("
|
|
33
|
-
@reject_message("
|
|
40
|
+
@tags("category:data-protection,threat:secrets,detection:rule,surface:process-prompt")
|
|
41
|
+
@reject_message("Prompt blocked: secrets or credentials were detected — remove sensitive data and retry.")
|
|
34
42
|
forbid (
|
|
35
43
|
principal,
|
|
36
44
|
action == AIGateway::Action::"process_prompt",
|
|
37
45
|
resource
|
|
38
46
|
)
|
|
39
47
|
when {
|
|
40
|
-
context has
|
|
48
|
+
context has secrets_detected && context.secrets_detected == true
|
|
41
49
|
};
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
@id("data-block-pii-tools")
|
|
51
|
+
@id("data-protection.block-pii-tools")
|
|
45
52
|
@name("Block PII in tool calls")
|
|
46
|
-
@description("
|
|
53
|
+
@description("Blocks call_tool when pii_detected is true.")
|
|
47
54
|
@severity("high")
|
|
48
|
-
@tags("pii,
|
|
49
|
-
@reject_message("Tool
|
|
55
|
+
@tags("category:data-protection,threat:pii,detection:rule,surface:call-tool,owasp:llm06")
|
|
56
|
+
@reject_message("Tool execution blocked: personally identifiable information was detected in tool arguments.")
|
|
50
57
|
forbid (
|
|
51
58
|
principal,
|
|
52
59
|
action == AIGateway::Action::"call_tool",
|
|
@@ -56,29 +63,27 @@ when {
|
|
|
56
63
|
context has pii_detected && context.pii_detected == true
|
|
57
64
|
};
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
@id("data-block-secrets-tools")
|
|
66
|
+
@id("data-protection.block-secrets-tools")
|
|
61
67
|
@name("Block secrets in tool calls")
|
|
62
|
-
@description("
|
|
68
|
+
@description("Blocks call_tool when secrets_detected is true.")
|
|
63
69
|
@severity("critical")
|
|
64
|
-
@tags("secrets,
|
|
65
|
-
@reject_message("Tool
|
|
70
|
+
@tags("category:data-protection,threat:secrets,detection:rule,surface:call-tool")
|
|
71
|
+
@reject_message("Tool execution blocked: secrets or credentials were detected in tool arguments.")
|
|
66
72
|
forbid (
|
|
67
73
|
principal,
|
|
68
74
|
action == AIGateway::Action::"call_tool",
|
|
69
75
|
resource
|
|
70
76
|
)
|
|
71
77
|
when {
|
|
72
|
-
context has
|
|
78
|
+
context has secrets_detected && context.secrets_detected == true
|
|
73
79
|
};
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
@id("data-block-bulk-pii")
|
|
81
|
+
@id("data-protection.block-pii-bulk")
|
|
77
82
|
@name("Block bulk PII exposure")
|
|
78
|
-
@description("
|
|
83
|
+
@description("Blocks any action when pii_count >= 3.")
|
|
79
84
|
@severity("critical")
|
|
80
|
-
@tags("
|
|
81
|
-
@reject_message("Request
|
|
85
|
+
@tags("category:data-protection,threat:exfiltration,detection:aggregate,posture:catch-all")
|
|
86
|
+
@reject_message("Request blocked: multiple PII matches were detected — possible data exfiltration.")
|
|
82
87
|
forbid (
|
|
83
88
|
principal,
|
|
84
89
|
action,
|
|
@@ -1,117 +1,119 @@
|
|
|
1
1
|
{
|
|
2
2
|
"service": "ai_gateway",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "AI Gateway policy templates for MCP + LLM gateway security",
|
|
5
5
|
"categories": [
|
|
6
6
|
{
|
|
7
7
|
"id": "semantic",
|
|
8
8
|
"name": "Semantic Threat Detection",
|
|
9
|
-
"description": "Detect and block prompt injection, jailbreak attempts, and high-severity AI security threats"
|
|
9
|
+
"description": "Detect and block prompt injection, jailbreak attempts, and high-severity AI security threats."
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"id": "tools",
|
|
13
13
|
"name": "Tool Permissioning",
|
|
14
|
-
"description": "Control access to MCP tools, enforce risk scoring, and manage per-tool permissions"
|
|
14
|
+
"description": "Control access to MCP tools, enforce risk scoring, and manage per-tool permissions."
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"id": "
|
|
17
|
+
"id": "agent-security",
|
|
18
18
|
"name": "Agent Security",
|
|
19
|
-
"description": "Detect
|
|
19
|
+
"description": "Detect tool poisoning, rug pull attacks, indirect prompt injection, and MCP supply chain threats."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"id": "
|
|
22
|
+
"id": "data-protection",
|
|
23
23
|
"name": "Data Protection",
|
|
24
|
-
"description": "Prevent secrets and PII leakage in LLM chat completions and MCP operations"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"id": "content_safety",
|
|
28
|
-
"name": "Content Safety",
|
|
29
|
-
"description": "Enforce content moderation score thresholds on LLM prompts and MCP content"
|
|
24
|
+
"description": "Prevent secrets and PII leakage in LLM chat completions and MCP operations."
|
|
30
25
|
},
|
|
31
26
|
{
|
|
32
27
|
"id": "organization",
|
|
33
|
-
"name": "Organization
|
|
34
|
-
"description": "
|
|
28
|
+
"name": "Organization",
|
|
29
|
+
"description": "Organization-wide baselines and default permit policies."
|
|
35
30
|
}
|
|
36
31
|
],
|
|
37
32
|
"defaults": [
|
|
38
33
|
{
|
|
39
|
-
"id": "baseline
|
|
34
|
+
"id": "organization.permit-baseline",
|
|
40
35
|
"name": "Baseline Permit",
|
|
41
|
-
"description": "Permits all actions by default
|
|
36
|
+
"description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
|
|
42
37
|
"category": "organization",
|
|
43
38
|
"file": "defaults/baseline.cedar",
|
|
44
39
|
"severity": "low",
|
|
45
|
-
"tags": ["
|
|
40
|
+
"tags": ["category:organization", "posture:permit-default"],
|
|
46
41
|
"is_active": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"templates": [
|
|
45
|
+
{
|
|
46
|
+
"id": "organization.permit-baseline",
|
|
47
|
+
"name": "Baseline Permit",
|
|
48
|
+
"description": "Permits all actions by default; threat-specific forbid policies override this when detectors fire.",
|
|
49
|
+
"category": "organization",
|
|
50
|
+
"file": "defaults/baseline.cedar",
|
|
51
|
+
"severity": "low",
|
|
52
|
+
"tags": ["category:organization", "posture:permit-default"],
|
|
53
|
+
"auto_deploy": true
|
|
47
54
|
},
|
|
48
55
|
{
|
|
49
|
-
"id": "semantic
|
|
56
|
+
"id": "semantic.defaults",
|
|
50
57
|
"name": "Semantic Threat Detection",
|
|
51
|
-
"description": "
|
|
58
|
+
"description": "Block prompt injection, jailbreak attempts, and high-severity threats in MCP tool calls and LLM prompts.",
|
|
52
59
|
"category": "semantic",
|
|
53
60
|
"file": "defaults/semantic.cedar",
|
|
54
61
|
"severity": "critical",
|
|
55
|
-
"tags": ["
|
|
56
|
-
"is_active": true
|
|
62
|
+
"tags": ["category:semantic", "threat:injection", "threat:jailbreak", "owasp:llm01", "owasp:llm02"]
|
|
57
63
|
},
|
|
58
64
|
{
|
|
59
|
-
"id": "tools
|
|
65
|
+
"id": "tools.defaults",
|
|
60
66
|
"name": "Tool Permissioning",
|
|
61
|
-
"description": "Enforce tool risk scoring, block dangerous tools, and detect command injection in MCP tool arguments",
|
|
67
|
+
"description": "Enforce tool risk scoring, block dangerous tools, and detect command injection in MCP tool arguments.",
|
|
62
68
|
"category": "tools",
|
|
63
69
|
"file": "defaults/tools.cedar",
|
|
64
70
|
"severity": "critical",
|
|
65
|
-
"tags": ["
|
|
66
|
-
"is_active": true
|
|
71
|
+
"tags": ["category:tools", "threat:command-injection", "owasp:llm06", "owasp:asi02"]
|
|
67
72
|
},
|
|
68
73
|
{
|
|
69
|
-
"id": "agent-security
|
|
74
|
+
"id": "agent-security.defaults",
|
|
70
75
|
"name": "Agent Security",
|
|
71
|
-
"description": "
|
|
72
|
-
"category": "
|
|
76
|
+
"description": "Block tool poisoning, rug pull attacks, indirect prompt injection, and MCP supply chain threats.",
|
|
77
|
+
"category": "agent-security",
|
|
73
78
|
"file": "defaults/agent_security.cedar",
|
|
74
79
|
"severity": "critical",
|
|
75
|
-
"tags": ["tool-poisoning", "rug-pull", "indirect-injection", "
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"templates": [
|
|
80
|
+
"tags": ["category:agent-security", "threat:tool-poisoning", "threat:rug-pull", "threat:indirect-injection", "threat:supply-chain", "owasp:asi01", "owasp:asi04"]
|
|
81
|
+
},
|
|
80
82
|
{
|
|
81
|
-
"id": "tools
|
|
83
|
+
"id": "tools.mcp-server-allowlist",
|
|
82
84
|
"name": "MCP Server Allowlist",
|
|
83
|
-
"description": "Only allow specific MCP servers to be used",
|
|
85
|
+
"description": "Only allow specific MCP servers to be used; customize the allowlist in the permit rule.",
|
|
84
86
|
"category": "tools",
|
|
85
87
|
"file": "mcp_server_allowlist.cedar",
|
|
86
88
|
"severity": "medium",
|
|
87
|
-
"tags": ["
|
|
89
|
+
"tags": ["category:tools", "scope:org-wide", "posture:deny-default"]
|
|
88
90
|
},
|
|
89
91
|
{
|
|
90
|
-
"id": "tools
|
|
92
|
+
"id": "tools.mcp-tool-permissions",
|
|
91
93
|
"name": "MCP Tool Permissions",
|
|
92
|
-
"description": "Permit
|
|
94
|
+
"description": "Permit MCP call_tool by default plus two safety rails (server exclusion list, block unverified servers); add forbid rules for per-tool gating.",
|
|
93
95
|
"category": "tools",
|
|
94
96
|
"file": "mcp_tool_permissions.cedar",
|
|
95
|
-
"severity": "
|
|
96
|
-
"tags": ["
|
|
97
|
+
"severity": "critical",
|
|
98
|
+
"tags": ["category:tools", "threat:supply-chain", "posture:permit-default"]
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
|
-
"id": "data-pii-redaction",
|
|
101
|
+
"id": "data-protection.pii-redaction",
|
|
100
102
|
"name": "PII & Secrets Redaction",
|
|
101
|
-
"description": "Block requests containing PII or secrets across LLM prompts and MCP tool calls
|
|
102
|
-
"category": "
|
|
103
|
+
"description": "Block requests containing PII or secrets across LLM prompts and MCP tool calls.",
|
|
104
|
+
"category": "data-protection",
|
|
103
105
|
"file": "pii_redaction.cedar",
|
|
104
|
-
"severity": "
|
|
105
|
-
"tags": ["
|
|
106
|
+
"severity": "critical",
|
|
107
|
+
"tags": ["category:data-protection", "threat:pii", "threat:secrets", "threat:exfiltration", "owasp:llm06"]
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
|
-
"id": "llm-default
|
|
109
|
-
"name": "
|
|
110
|
-
"description": "Permit all LLM chat completion requests by default
|
|
110
|
+
"id": "organization.permit-llm-default",
|
|
111
|
+
"name": "Permit LLM proxy calls",
|
|
112
|
+
"description": "Permit all LLM chat completion requests by default; deploy alongside threat-specific forbids for a permit-default posture.",
|
|
111
113
|
"category": "organization",
|
|
112
114
|
"file": "llm_default_allow.cedar",
|
|
113
115
|
"severity": "low",
|
|
114
|
-
"tags": ["
|
|
116
|
+
"tags": ["category:organization", "surface:process-prompt", "posture:permit-default"]
|
|
115
117
|
}
|
|
116
118
|
]
|
|
117
119
|
}
|