mirror of
https://github.com/anthropics/claude-code.git
synced 2026-02-01 22:48:05 +00:00
Compare commits
2 Commits
v2.1.22
...
kurt/setti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90c07d1c7e | ||
|
|
f93f614768 |
31
examples/settings/README.md
Normal file
31
examples/settings/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Settings Examples
|
||||
|
||||
Example Claude Code settings files, primarily intended for organization-wide deployments. Use these are starting points — adjust them to fit your needs.
|
||||
|
||||
These may be applied at any level of the [settings hierarchy](https://code.claude.com/docs/en/settings#settings-files), though certain properties only take effect if specified in enterprise settings (e.g. `strictKnownMarketplaces`, `allowManagedHooksOnly`, `allowManagedPermissionRulesOnly`).
|
||||
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
> [!WARNING]
|
||||
> These examples are community-maintained snippets which may be unsupported or incorrect. You are responsible for the correctness of your own settings configuration.
|
||||
|
||||
| Setting | [`settings-lax.json`](./settings-lax.json) | [`settings-strict.json`](./settings-strict.json) | [`settings-bash-sandbox.json`](./settings-bash-sandbox.json) |
|
||||
|---------|:---:|:---:|:---:|
|
||||
| Disable `--dangerously-skip-permissions` | ✅ | ✅ | |
|
||||
| Block plugin marketplaces | ✅ | ✅ | |
|
||||
| Block user and project-defined permission `allow` / `ask` / `deny` | | ✅ | ✅ |
|
||||
| Block user and project-defined hooks | | ✅ | |
|
||||
| Deny web fetch and search tools | | ✅ | |
|
||||
| Bash tool requires approval | | ✅ | |
|
||||
| Bash tool must run inside of sandbox | | | ✅ |
|
||||
|
||||
## Tips
|
||||
- Consider merging snippets of the above examples to reach your desired configuration
|
||||
- Settings files must be valid JSON
|
||||
- Before deploying configuration files to your organization, test them locally by applying to `managed-settings.json`, `settings.json` or `settings.local.json`
|
||||
- The `sandbox` property only applies to the `Bash` tool; it does not apply to other tools (like Read, Write, WebSearch, WebFetch, MCPs), hooks, or internal commands
|
||||
|
||||
## Full Documentation
|
||||
|
||||
See https://code.claude.com/docs/en/settings for complete documentation on all available managed settings.
|
||||
16
examples/settings/settings-bash-sandbox.json
Normal file
16
examples/settings/settings-bash-sandbox.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"allowManagedPermissionRulesOnly": true,
|
||||
"sandbox": {
|
||||
"enabled": true,
|
||||
"autoAllowBashIfSandboxed": false,
|
||||
"allowUnsandboxedCommands": false,
|
||||
"excludedCommands": [],
|
||||
"network": {
|
||||
"allowUnixSockets": [],
|
||||
"allowLocalBinding": false,
|
||||
"httpProxyPort": null,
|
||||
"socksProxyPort": null
|
||||
},
|
||||
"enableWeakerNestedSandbox": false
|
||||
}
|
||||
}
|
||||
6
examples/settings/settings-lax.json
Normal file
6
examples/settings/settings-lax.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"permissions": {
|
||||
"disableBypassPermissionsMode": "disable"
|
||||
},
|
||||
"strictKnownMarketplaces": []
|
||||
}
|
||||
26
examples/settings/settings-strict.json
Normal file
26
examples/settings/settings-strict.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"permissions": {
|
||||
"disableBypassPermissionsMode": "disable",
|
||||
"ask": [
|
||||
"Bash"
|
||||
],
|
||||
"deny": [
|
||||
"WebSearch",
|
||||
"WebFetch"
|
||||
]
|
||||
},
|
||||
"allowManagedPermissionRulesOnly": true,
|
||||
"allowManagedHooksOnly": true,
|
||||
"strictKnownMarketplaces": [],
|
||||
"sandbox": {
|
||||
"autoAllowBashIfSandboxed": false,
|
||||
"excludedCommands": [],
|
||||
"network": {
|
||||
"allowUnixSockets": [],
|
||||
"allowLocalBinding": false,
|
||||
"httpProxyPort": null,
|
||||
"socksProxyPort": null
|
||||
},
|
||||
"enableWeakerNestedSandbox": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user