Skip to content

Claude Code guardrails

[PUBLISHED_DATE] 2026.11.23
[READ_TIME] 6 MIN
[AUTHOR_ID] MARKETING OPS

With Claude Code's managed settings, which override anything a developer sets. From there your organization blocks the mode that skips permission prompts, denies access to sensitive files, approves the MCP servers people can use and requires the company account. The strongest delivery is MDM on managed devices.

Claude Code works in the developer's terminal, with access to code, files and commands. That's what makes it so useful, and it's why it needs rules the developer can't change.

What should you control?

These are the rules we recommend as a starting point at a bank, insurer or health system:

Risk Control Setting
Someone turns off all permission prompts Block bypass mode permissions.disableBypassPermissionsMode: "disable"
Claude reads credentials or secrets Deny rules permissions.deny with paths such as .env or secrets/
A project or user adds their own permission rules Only your organization's rules count allowManagedPermissionRulesOnly: true
Unvetted MCP servers get connected An MCP allowlist allowedMcpServers with allowManagedMcpServersOnly: true
Someone signs in with a personal account Require the organization account forceLoginMethod and forceLoginOrgUUID
Commands reach any site on the internet Sandbox with approved domains sandbox.enabled and sandbox.network.allowManagedDomainsOnly
Plugins get installed from anywhere Approved marketplaces strictKnownMarketplaces

A minimal example policy:

{
  "permissions": {
    "deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"],
    "disableBypassPermissionsMode": "disable"
  },
  "allowManagedPermissionRulesOnly": true,
  "allowManagedMcpServersOnly": true,
  "allowedMcpServers": [{ "serverName": "github" }],
  "forceLoginMethod": "claudeai",
  "forceLoginOrgUUID": "YOUR-ORGANIZATION-UUID"
}

One important detail: a rule like Bash(curl *) only matches the command as Claude writes it. For a control that doesn't depend on the command text, use the sandbox, which the operating system enforces on shell commands.

How do you deliver the policy?

Path How it works When to use it
MDM or OS policy A macOS configuration profile or Windows registry value, through Jamf, Intune or Group Policy If you already manage devices. It's the strongest option
System file managed-settings.json in a system directory on each machine Machines without MDM, Linux hosts or your own images
claude.ai console Server-managed settings, on Team and Enterprise plans One place to change policy, and the only one that reaches cloud sessions

To confirm the policy arrived, a developer runs /status in Claude Code and checks the setting sources line.

What are the limits?

According to Anthropic's documentation, these are the limits to know before you call it done:

  • The claude.ai console is a client-side control, not a security boundary. On an unmanaged device, a user can bypass it without admin rights, for example by configuring a different model provider such as Bedrock or a custom base URL.
  • A local admin can edit the policy file. That's why MDM, which reapplies the profile, is stronger.
  • The console applies one policy to the whole organization. Per-group policies aren't supported yet.
  • Cloud sessions don't read the device policy, only the console's. And Cowork sessions don't read the console's.

That's why we recommend combining three layers: MDM on devices, the console for cloud sessions, and an AI acceptable use policy your team knows.

How does this fit your existing controls?

Claude Code doesn't need a new control framework. It slots into the ones you already run:

  • Least privilege: deny rules, the sandbox and the MCP allowlist limit what the tool can reach.
  • Identity and access: the login pin keeps every session on the organization's account, where offboarding and audit already work.
  • Vendor oversight: every approved MCP server and plugin is a third party that belongs in your vendor inventory. Banks follow the interagency guidance on third-party relationships for this; we cover the questions to ask in AI vendor due diligence.
  • Change management: treat the managed policy like any other configuration baseline, with an owner, version control and review.

What if the code touches PHI?

Anthropic's BAA covers Claude Code only with the HIPAA configuration applied on a HIPAA-ready Enterprise plan, signed in with the Enterprise account and connected directly to Anthropic. Not covered, among others: the VS Code and JetBrains extensions, routes through Bedrock, Google Cloud, Foundry, gateways or custom base URLs, connectors, local MCP servers and skills. We go deeper in is Claude HIPAA compliant?

An honest caveat: Claude Code ships updates every week, and some settings require recent versions. Review the policy every quarter.

How do we handle it at Andes?

We use Claude Code in our own development and help IT and security teams define the policy, deliver it the right way and document it (how we work with Claude). For the rest of the organization's setup, read the Claude Enterprise setup checklist and how to write an AI acceptable use policy.

Are your developers already using AI without rules?

If everyone configured their own tool, you need one policy. See our AI for regulated institutions service and let's define it with your team.


Sources

  • Claude Code Docs, Settings files and precedence: https://code.claude.com/docs/en/settings
  • Claude Code Docs, Deploy managed settings: https://code.claude.com/docs/en/managed-settings
  • Claude Code Docs, Server-managed settings: https://code.claude.com/docs/en/server-managed-settings
  • Claude Code Docs, Configure permissions: https://code.claude.com/docs/en/permissions
  • Claude Code Docs, Configure the sandboxed Bash tool: https://code.claude.com/docs/en/sandboxing
  • Claude Help Center, Business Associate Agreements (BAA) for Commercial Customers: https://support.claude.com/en/articles/8114513
Direct_Answers

Frequently asked questions

With managed settings. They sit at the top of Claude Code's settings hierarchy: no user or project file overrides them, apart from a few security keys that can only be stricter. You deliver them through MDM, a file in a system directory, or the claude.ai admin console on Team and Enterprise plans.

Yes. Setting permissions.disableBypassPermissionsMode to disable in managed settings blocks the mode that skips permission prompts. Pair it with allowManagedPermissionRulesOnly so that only the permission rules your organization defines count.

Not on their own. According to Anthropic's documentation, server-managed settings are a client-side control, not a security boundary: on an unmanaged device a user can bypass them, for example by configuring a different model provider. On MDM-managed devices, enforcement is stronger.

Yes. allowedMcpServers in managed settings defines an allowlist by server name, command or URL, and allowManagedMcpServersOnly makes that list the only one that counts. deniedMcpServers blocks specific servers from any source.

READY FOR THE NEXT DEPLOYMENT?

Start a Technical Consultation