Skip to content

Commit 10f7f85

Browse files
ant-kurtbogini
andauthored
feat(claude-code-settings): add managed/enterprise settings fields (SchemaStore#5389)
Co-authored-by: bogini <bogini@users.noreply.github.com>
1 parent 7aee8ff commit 10f7f85

4 files changed

Lines changed: 173 additions & 8 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"allowManagedMcpServersOnly": "yes",
3+
"blockedMarketplaces": [
4+
{
5+
"source": "github"
6+
}
7+
],
8+
"sandbox": {
9+
"network": {
10+
"allowManagedDomainsOnly": "yes"
11+
}
12+
}
13+
}

src/schemas/json/claude-code-settings.json

Lines changed: 115 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,13 +1012,9 @@
10121012
},
10131013
"description": "Allowlist of network domains for sandboxed commands. Supports wildcard patterns like *.example.com"
10141014
},
1015-
"deniedDomains": {
1016-
"type": "array",
1017-
"items": {
1018-
"type": "string",
1019-
"minLength": 1
1020-
},
1021-
"description": "Denylist of network domains for sandboxed commands. Supports wildcard patterns like *.example.com"
1015+
"allowManagedDomainsOnly": {
1016+
"type": "boolean",
1017+
"description": "(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."
10221018
}
10231019
},
10241020
"additionalProperties": false
@@ -1177,6 +1173,118 @@
11771173
"additionalProperties": false
11781174
},
11791175
"description": "Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format). See https://code.claude.com/docs/en/plugins"
1176+
},
1177+
"allowManagedMcpServersOnly": {
1178+
"type": "boolean",
1179+
"description": "(Managed settings only) Only allowedMcpServers from managed settings are respected. deniedMcpServers still merges from all sources. Users can still add their own MCP servers, but only the admin-defined allowlist applies."
1180+
},
1181+
"blockedMarketplaces": {
1182+
"type": "array",
1183+
"description": "(Managed settings only) Blocklist of marketplace sources. These exact sources are blocked from being added as marketplaces. The check happens before downloading, so blocked sources never touch the filesystem.",
1184+
"items": {
1185+
"anyOf": [
1186+
{
1187+
"type": "object",
1188+
"properties": {
1189+
"source": { "type": "string", "const": "url" },
1190+
"url": {
1191+
"type": "string",
1192+
"format": "uri",
1193+
"description": "Direct URL to marketplace.json file"
1194+
},
1195+
"headers": {
1196+
"type": "object",
1197+
"additionalProperties": { "type": "string" },
1198+
"description": "Custom HTTP headers (e.g., for authentication)"
1199+
}
1200+
},
1201+
"required": ["source", "url"]
1202+
},
1203+
{
1204+
"type": "object",
1205+
"properties": {
1206+
"source": { "type": "string", "const": "github" },
1207+
"repo": {
1208+
"type": "string",
1209+
"description": "GitHub repository in owner/repo format"
1210+
},
1211+
"ref": {
1212+
"type": "string",
1213+
"description": "Git branch or tag to use"
1214+
},
1215+
"path": {
1216+
"type": "string",
1217+
"description": "Path to marketplace.json within repo"
1218+
}
1219+
},
1220+
"required": ["source", "repo"]
1221+
},
1222+
{
1223+
"type": "object",
1224+
"properties": {
1225+
"source": { "type": "string", "const": "git" },
1226+
"url": {
1227+
"type": "string",
1228+
"pattern": ".*\\.git$",
1229+
"description": "Full git repository URL"
1230+
},
1231+
"ref": {
1232+
"type": "string",
1233+
"description": "Git branch or tag to use"
1234+
},
1235+
"path": {
1236+
"type": "string",
1237+
"description": "Path to marketplace.json within repo"
1238+
}
1239+
},
1240+
"required": ["source", "url"]
1241+
},
1242+
{
1243+
"type": "object",
1244+
"properties": {
1245+
"source": { "type": "string", "const": "npm" },
1246+
"package": {
1247+
"type": "string",
1248+
"description": "NPM package containing marketplace.json"
1249+
}
1250+
},
1251+
"required": ["source", "package"]
1252+
},
1253+
{
1254+
"type": "object",
1255+
"properties": {
1256+
"source": { "type": "string", "const": "file" },
1257+
"path": {
1258+
"type": "string",
1259+
"description": "Local file path to marketplace.json"
1260+
}
1261+
},
1262+
"required": ["source", "path"]
1263+
},
1264+
{
1265+
"type": "object",
1266+
"properties": {
1267+
"source": { "type": "string", "const": "directory" },
1268+
"path": {
1269+
"type": "string",
1270+
"description": "Local directory containing .claude-plugin/marketplace.json"
1271+
}
1272+
},
1273+
"required": ["source", "path"]
1274+
},
1275+
{
1276+
"type": "object",
1277+
"properties": {
1278+
"source": { "type": "string", "const": "hostPattern" },
1279+
"hostPattern": {
1280+
"type": "string",
1281+
"description": "Regex pattern to match the host/domain extracted from any marketplace source type"
1282+
}
1283+
},
1284+
"required": ["source", "hostPattern"]
1285+
}
1286+
]
1287+
}
11801288
}
11811289
},
11821290
"title": "Claude Code Settings"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"allowManagedHooksOnly": true,
3+
"allowManagedMcpServersOnly": true,
4+
"allowManagedPermissionRulesOnly": true,
5+
"allowedMcpServers": [
6+
{
7+
"serverName": "approved-server"
8+
},
9+
{
10+
"serverUrl": "https://mcp.company.com/*"
11+
}
12+
],
13+
"blockedMarketplaces": [
14+
{
15+
"repo": "untrusted-org/plugins",
16+
"source": "github"
17+
},
18+
{
19+
"package": "malicious-plugins",
20+
"source": "npm"
21+
},
22+
{
23+
"hostPattern": "^untrusted\\.example\\.com$",
24+
"source": "hostPattern"
25+
}
26+
],
27+
"deniedMcpServers": [
28+
{
29+
"serverName": "dangerous-server"
30+
}
31+
],
32+
"disableAllHooks": false,
33+
"permissions": {
34+
"allow": ["Bash(git:*)", "Read"],
35+
"deny": ["Bash(rm:*)"]
36+
},
37+
"sandbox": {
38+
"enabled": true,
39+
"network": {
40+
"allowManagedDomainsOnly": true,
41+
"allowedDomains": ["*.company.com", "registry.npmjs.org"]
42+
}
43+
}
44+
}

src/test/claude-code-settings/modern-complete-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@
118118
"network": {
119119
"allowAllUnixSockets": false,
120120
"allowLocalBinding": true,
121+
"allowManagedDomainsOnly": true,
121122
"allowUnixSockets": ["/var/run/docker.sock"],
122123
"allowedDomains": ["github.com", "*.npmjs.org", "registry.yarnpkg.com"],
123-
"deniedDomains": ["malware.example"],
124124
"httpProxyPort": 8080,
125125
"socksProxyPort": 8081
126126
}

0 commit comments

Comments
 (0)