Securing Claude Code for Enterprises

Is your Claude Code policy actually in force? A verification runbook

Most security teams that govern Claude Code stop at "we deployed managed settings." That is the easy half. The harder half is proving, per machine, that the policy loaded, that nothing in it was silently discarded, and that it behaves the way you intended.

Claude Code gives you the tools for this. Here is a three-step loop to run on one canary machine per platform, before and after every policy change.

1. Check which source delivered the policy

Run /status in a session and read the Setting sources line. It names where the managed policy came from: (remote), (plist), (HKLM), (file), and so on.

2. Check what was dropped

Run claude doctor. It lists every entry Claude Code dropped during validation, with its source and field.

This matters more than it sounds. A policy that loads and drops half its keys enforces half its intent while looking healthy. Archive the dropped-entries list for each canary; a growing list is an early warning that a client update or a hand edit broke something.

3. Exercise the behavior

Schema validation cannot catch a valid key with a wrong value. So test one representative denial per control area in a real session:

If all three refuse, the policy is doing its job.

Know which keys fail closed

When an individual entry fails validation, Claude Code drops it with a warning. That would be dangerous for restrictive keys, so a specific set fails closed instead:

Two keys deliberately fail open: an invalid disableAllHooks is dropped (enforcing it would unload your own hooks), and the required-version keys drop invalid values so a typo cannot brick the fleet.

The operational consequence: a typo in an allowlist takes access away, and you will hear about it from the help desk. A typo in a deny rule removes a control, and you will not hear about it at all. Step 3 is how you catch the second kind.

A starting map of controls to keys

ControlKeys
Permission lock-downallowManagedPermissionRulesOnly, permissions.disableBypassPermissionsMode
Sandboxingsandbox.enabled, sandbox.network.allowedDomains
MCP controlallowedMcpServers, deniedMcpServers, allowManagedMcpServersOnly
Marketplace controlstrictKnownMarketplaces, blockedMarketplaces, disableSideloadFlags
Hook restrictionsallowManagedHooksOnly, allowedHttpHookUrls
Login and providerforceLoginMethod, forceLoginOrgUUID, allowedProviders
Version governancerequiredMinimumVersion, requiredMaximumVersion, autoUpdatesChannel

Claude Code changes often. Check every key against the current documentation before you deploy it.

What a developer can still change

Be honest in your risk register about the residue. A local administrator can edit the managed file itself, which is why scheduled MDM redeployment matters. And managed settings bind Claude Code only: a developer who calls the model provider's API from another tool was never under them. That gap is closed at the network layer, not in settings.


Tested enforcement hooks and a telemetry baseline are in the free companion repo: https://github.com/ellisvantor/claude-code-enterprise-security

This post is adapted from Securing Claude Code for Enterprises, which adds three complete managed-settings baselines, ten SIEM detections, and a control mapping to NIST CSF 2.0, ISO 27001, and the OWASP LLM Top 10: https://www.securingclaudecode.com/

Independent publication. Not affiliated with or endorsed by Anthropic.

Cover of Securing Claude Code for Enterprises

Securing Claude Code for Enterprises — by Ellis Vantor

Kindle $12.99 Paperback $29.99

256 pages · Kindle and paperback