@highflame/policy 2.2.26 → 2.2.27
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.
|
@@ -0,0 +1,41 @@
|
|
|
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.
|
|
7
|
+
//
|
|
8
|
+
// Context keys consumed:
|
|
9
|
+
// - mcp_server: String
|
|
10
|
+
//
|
|
11
|
+
// Category: tools
|
|
12
|
+
// Namespace: Guardrails
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
@id("tools.allow-mcp-allowlist")
|
|
16
|
+
@name("Allow allowlisted MCP servers")
|
|
17
|
+
@description("Permits connect_server when mcp_server is in the allowlist.")
|
|
18
|
+
@severity("medium")
|
|
19
|
+
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
20
|
+
permit (
|
|
21
|
+
principal,
|
|
22
|
+
action == Guardrails::Action::"connect_server",
|
|
23
|
+
resource
|
|
24
|
+
)
|
|
25
|
+
when {
|
|
26
|
+
context has mcp_server &&
|
|
27
|
+
(context.mcp_server == "filesystem" ||
|
|
28
|
+
context.mcp_server == "playwright")
|
|
29
|
+
};
|
|
30
|
+
|
|
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.")
|
|
34
|
+
@severity("medium")
|
|
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.")
|
|
37
|
+
forbid (
|
|
38
|
+
principal,
|
|
39
|
+
action == Guardrails::Action::"connect_server",
|
|
40
|
+
resource
|
|
41
|
+
);
|
|
@@ -231,6 +231,15 @@
|
|
|
231
231
|
"severity": "critical",
|
|
232
232
|
"tags": ["category:tools", "threat:supply-chain", "posture:deny-default"]
|
|
233
233
|
},
|
|
234
|
+
{
|
|
235
|
+
"id": "tools.mcp-server-allowlist",
|
|
236
|
+
"name": "MCP Server Allowlist",
|
|
237
|
+
"description": "Restrict MCP server connections to a pre-approved list. Customize the allowlist values to match the servers permitted in your environment.",
|
|
238
|
+
"category": "tools",
|
|
239
|
+
"file": "mcp_server_allowlist.cedar",
|
|
240
|
+
"severity": "medium",
|
|
241
|
+
"tags": ["category:tools", "surface:connect-server", "scope:org-wide", "posture:deny-default"]
|
|
242
|
+
},
|
|
234
243
|
{
|
|
235
244
|
"id": "security.chat-assistant",
|
|
236
245
|
"name": "Chat Assistant — Security",
|
|
@@ -1184,6 +1184,48 @@ when {
|
|
|
1184
1184
|
context has mcp_server_verified && context.mcp_server_verified == false
|
|
1185
1185
|
};
|
|
1186
1186
|
`;
|
|
1187
|
+
const GUARDRAILS_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR = `// =============================================================================
|
|
1188
|
+
// MCP Server Allowlist
|
|
1189
|
+
// =============================================================================
|
|
1190
|
+
// Restricts MCP server connections to a pre-approved list. Customize the
|
|
1191
|
+
// \`context.mcp_server\` values in the permit rule to match the allowed
|
|
1192
|
+
// servers for your environment.
|
|
1193
|
+
//
|
|
1194
|
+
// Context keys consumed:
|
|
1195
|
+
// - mcp_server: String
|
|
1196
|
+
//
|
|
1197
|
+
// Category: tools
|
|
1198
|
+
// Namespace: Guardrails
|
|
1199
|
+
// =============================================================================
|
|
1200
|
+
|
|
1201
|
+
@id("tools.allow-mcp-allowlist")
|
|
1202
|
+
@name("Allow allowlisted MCP servers")
|
|
1203
|
+
@description("Permits connect_server when mcp_server is in the allowlist.")
|
|
1204
|
+
@severity("medium")
|
|
1205
|
+
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
1206
|
+
permit (
|
|
1207
|
+
principal,
|
|
1208
|
+
action == Guardrails::Action::"connect_server",
|
|
1209
|
+
resource
|
|
1210
|
+
)
|
|
1211
|
+
when {
|
|
1212
|
+
context has mcp_server &&
|
|
1213
|
+
(context.mcp_server == "filesystem" ||
|
|
1214
|
+
context.mcp_server == "playwright")
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1217
|
+
@id("tools.deny-non-allowlisted-mcp")
|
|
1218
|
+
@name("Block non-allowlisted MCP servers")
|
|
1219
|
+
@description("Blocks connect_server unconditionally so only the allowlist permit applies.")
|
|
1220
|
+
@severity("medium")
|
|
1221
|
+
@tags("category:tools,surface:connect-server,scope:org-wide,posture:deny-default")
|
|
1222
|
+
@reject_message("MCP server connection blocked: server is not on the allowlist.")
|
|
1223
|
+
forbid (
|
|
1224
|
+
principal,
|
|
1225
|
+
action == Guardrails::Action::"connect_server",
|
|
1226
|
+
resource
|
|
1227
|
+
);
|
|
1228
|
+
`;
|
|
1187
1229
|
const GUARDRAILS_SECURITY_CHAT_ASSISTANT_CEDAR = `// =============================================================================
|
|
1188
1230
|
// Chat Assistant — Security
|
|
1189
1231
|
// =============================================================================
|
|
@@ -3568,6 +3610,15 @@ export const GUARDRAILS_TEMPLATES = [
|
|
|
3568
3610
|
severity: 'critical',
|
|
3569
3611
|
tags: ['category:tools', 'threat:supply-chain', 'posture:deny-default'],
|
|
3570
3612
|
},
|
|
3613
|
+
{
|
|
3614
|
+
id: 'tools.mcp-server-allowlist',
|
|
3615
|
+
name: 'MCP Server Allowlist',
|
|
3616
|
+
description: 'Restrict MCP server connections to a pre-approved list. Customize the allowlist values to match the servers permitted in your environment.',
|
|
3617
|
+
category: 'tools',
|
|
3618
|
+
cedarText: GUARDRAILS_TOOLS_MCP_SERVER_ALLOWLIST_CEDAR,
|
|
3619
|
+
severity: 'medium',
|
|
3620
|
+
tags: ['category:tools', 'surface:connect-server', 'scope:org-wide', 'posture:deny-default'],
|
|
3621
|
+
},
|
|
3571
3622
|
{
|
|
3572
3623
|
id: 'security.chat-assistant',
|
|
3573
3624
|
name: 'Chat Assistant — Security',
|
|
@@ -3995,6 +4046,15 @@ export const GUARDRAILS_TEMPLATES_JSON = `{
|
|
|
3995
4046
|
"severity": "critical",
|
|
3996
4047
|
"tags": ["category:tools", "threat:supply-chain", "posture:deny-default"]
|
|
3997
4048
|
},
|
|
4049
|
+
{
|
|
4050
|
+
"id": "tools.mcp-server-allowlist",
|
|
4051
|
+
"name": "MCP Server Allowlist",
|
|
4052
|
+
"description": "Restrict MCP server connections to a pre-approved list. Customize the allowlist values to match the servers permitted in your environment.",
|
|
4053
|
+
"category": "tools",
|
|
4054
|
+
"file": "mcp_server_allowlist.cedar",
|
|
4055
|
+
"severity": "medium",
|
|
4056
|
+
"tags": ["category:tools", "surface:connect-server", "scope:org-wide", "posture:deny-default"]
|
|
4057
|
+
},
|
|
3998
4058
|
{
|
|
3999
4059
|
"id": "security.chat-assistant",
|
|
4000
4060
|
"name": "Chat Assistant — Security",
|