Cover of Securing Claude Code for Enterprises

Securing Claude Code for Enterprises

Policy, Sandboxing, MCP Control, and Audit for Cybersecurity Teams

Kindle $12.99 Paperback $29.99

256 pages · Kindle and paperback · November 2026

About the book

Your developers already have an AI agent with a shell. Now secure it.

Claude Code reads repositories, runs commands, calls MCP servers, and reaches the network on a developer's behalf. This book shows security teams how to govern it with every control the tool exposes, layered into a deployment you can defend in an audit.

What's in the book

Deliverables

Contents

  1. Threat model for an agentic coding tool
  2. Architecture and data flow
  3. Identity, authentication, provider lock-down
  4. Policy delivery: managed settings
  5. Permissions and permission modes
  6. Sandboxing and isolation
  7. Extension supply chain: MCP, plugins, skills, mods
  8. Hooks as enforcement
  9. Network, egress, and LLM gateways
  10. Observability, audit, detection
  11. CI/CD, headless runs, and adjacent surfaces
  12. Rollout program and incident response

Excerpt

Excerpt from Chapter 4

Two commands answer "is the policy in force?". /status shows the Setting sources line — (remote), (plist), (HKLM), (file), (drop-ins), (helper), (parent process), or a , merged list — plus a Skipped sources line naming higher-priority sources that overrode yours. claude doctor lists every entry Claude Code dropped, with its source and field.

Make verification a runbook, not a hope. On one canary per platform per ring: run /status first — a missing Setting sources line means no managed source delivered a policy key, and the fix is a file at the right path containing at least one policy key rather than only the control keys, or a claude doctor fetch check for the server-managed path; a line naming a different source means a higher-priority document overrode yours, and Skipped sources tells you which. Then run claude doctor and archive the dropped-entries list, because a policy that loads and drops half its keys enforces only half its intent. Then exercise the behavior: open a session and confirm one representative denial per control area — a denied read, a blocked provider, a refused plugin — because a schema-valid key with a typo'd value enforces nothing while looking healthy. Repeat on every canary after every policy edit; the loop takes minutes and catches the classes of failure that otherwise surface as help-desk tickets weeks later.

Behavior when your policy is malformed is deliberate and tiered. A file that is not valid JSON, or whose top level is not an object, makes Claude Code refuse to start and name the source — even when another admin source delivers a valid policy. An absent file is not a failure; an empty one counts as {}. Individual entries that fail schema validation are dropped with warnings, and values that still fail are dropped — except the keys that fail closed. The fail-closed set is exactly the set where an attacker benefits from a "broken" policy: a single-restrictive-value key such as allowManagedPermissionRulesOnly, disableAutoMode, or skipDangerousModePermissionPrompt that cannot be read is treated as its restrictive value until fixed; allowedMcpServers, allowedProviders, allowedHttpHookUrls, allowedChannelPlugins, strictKnownMarketplaces, and availableModels are enforced as empty allowlists until fixed; forceLoginOrgUUID invalid means no organization may log in; an invalid crossSessionInbound reads as refuse; inside the sandbox block, invalid Booleans read strictest, and while a deny list cannot be read, the corresponding allow lists are withheld so grants never apply without their neighboring restrictions. Two deliberate fail-opens to know: an invalid disableAllHooks is dropped (enforcing it would unload your own deployed hooks), and requiredMinimumVersion/requiredMaximumVersion drop invalid values rather than bricking the fleet. The permissions, autoMode, worktree, and attribution blocks are repaired per field rather than dropped whole.

About the author

Ellis Vantor writes practical guides on securing developer tooling and AI agents in enterprise environments.