threatdeck
Live 13:45 UTC ·

Learn / Securing AI coding assistants in an organisation

Lesson 3 of 69 minReviewed

Managed settings and policy across a fleet

Find the layer each coding tool reserves for administrators, deliver a baseline policy to every machine, and plan for the gaps that managed settings do not close.

Settings a developer controls are preferences. An organisation needs a layer that users and repositories cannot override, delivered to every machine and checked for drift. Most coding tools now have one, but they differ in what it can lock and how it arrives.

Enforced policy layers (vendor documentation, November 2026)
ToolEnforced layerDeliveryCan lock, for example
Claude CodeManaged settings [1]managed-settings.json in /Library/Application Support/ClaudeCode/, /etc/claude-code/ or C:\Program Files\ClaudeCode\; macOS profile domain com.anthropic.claudecode; HKLM\SOFTWARE\Policies\ClaudeCode; or server-managed settings from the claude.ai console [2]Permission rules, bypass modes, MCP servers, telemetry, models
OpenAI Codexrequirements.toml, described as admin-enforced constraints users can't override [3]Admin Console (Agent security), device-managed files, or an HTTPS endpoint you run [3]Approval policies, sandbox modes or permission profiles, MCP server allowlist, deny-read paths [3]
GitHub CopilotEnterprise managed-settings.json plus the "MCP servers in Copilot" policy [4]A .github-private repository or MDM [4]Which MCP servers run, by URL or command [4]
CursorWorkspace trust setting [5]MDM [5]Restricted mode for new workspaces; the agent security page describes no central run-mode controls [5]

Claude Code precedence

When a key is set in several places, Claude Code uses the highest level: managed settings, then --settings on the command line, then project local, shared project and user settings. Nothing in a user's files or --settings overrides a managed key [1]. List keys such as permissions.allow merge across files instead of replacing each other, so a user can add allow rules next to yours unless managed settings set allowManagedPermissionRulesOnly [1]. A few security keys work the other way: a stricter value from a lower level still counts, for example permissions.blockReadsOutsideWorkingDirectories: true from any scope [1].

Some keys never apply from a repository file. Claude Code ignores auto and bypassPermissions as defaultMode in project or local settings, and committed allow rules wait until each developer trusts the folder, while deny and ask rules apply at once [1]. That asymmetry is deliberate: a cloned repository can tighten a session but should not be able to loosen it.

Gaps to plan for

  • Local administrators. A developer with admin rights can edit the managed source itself; Anthropic notes this is why MDM tools redeploy the file on a schedule [2].
  • Defaults versus locks. A managed model is only a starting default; restrict choice with availableModels [2].
  • Other tools. Managed settings bind Claude Code only; a developer calling the API from another tool is not covered [2]. Each tool on your inventory needs its own policy.
  • Refresh intervals. MDM and OS policies are read at startup and checked every 30 minutes; a local edit to the server-managed cache lasts only until the next fetch [2].
  • Malformed policy. If a managed settings document cannot be parsed as JSON, Claude Code refuses to start [2]. On Copilot, a malformed MCP policy is treated as an empty allowlist that blocks every server except built-in defaults [4]. Stage rollouts on a pilot group.

A practical baseline for Claude Code: bypass and auto modes disabled, deny rules for credential paths and destructive commands, the sandbox on with fail-closed behaviour, an MCP allowlist, shortened cleanupPeriodDays, and telemetry exported to your collector. Confirm it landed with /status, which names the managed source in force, and claude doctor, which lists entries it dropped [2].

Try it on ThreatDeck

Self-check

4 questions

Pick an answer to see whether it is right and why. Only your score is saved, in this browser.

  1. A user's ~/.claude/settings.json and your managed settings both set the same scalar key. Which value does Claude Code use?
  2. Your managed policy has permissions.allow rules. A developer adds more allow rules in their own settings. What happens by default?
  3. In Codex managed configuration, how do requirements.toml and config.toml differ?
  4. Why stage a managed settings change on a pilot group first?

References

  1. Settings files and precedence. Anthropic (Claude Code docs).
  2. Deploy managed settings. Anthropic (Claude Code docs).
  3. Managed configuration (Codex). OpenAI.
  4. Configuring an MCP server allowlist for your enterprise. GitHub Docs.
  5. Agent Security. Cursor docs.
Completing the self-check also marks the lesson complete. Saved in this browser only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.