Dev.to AI 🤖 Ai 👁 0 📖 3 min read

Your coding agent is privileged automation: a workstation baseline for Claude Code

A coding agent reads the repository, runs shell commands with the developer's privileges, edits code and calls external tools. On the workstation, the least production-like place it runs, it is often left ungoverned. But

A coding agent reads the repository, runs shell commands with the developer's privileges, edits code and calls external tools. On the workstation, the least production-like place it runs, it is often left ungoverned. But distance from production does not remove the path to production.

This is a condensed version of a baseline from the AI Delivery Factory reference, written for a regulated firm running Claude Code on managed Windows with WSL2, Linux workstations and hosted CI. It is vendor-specific on purpose.

The settings file is not the boundary

Managed settings are a client-side control, not a security boundary. A local administrator can edit the managed source, and managed settings bind only Claude Code. Every high-risk context needs an OS or network control behind the policy file.

Also: only managed settings and hooks enforce. CLAUDE.md, rules, skills and subagents steer the model, so a control self-assessment should never claim a control on the strength of guidance.

Five layers

  • Identity and tenancy: SSO, a pinned login method and organisation, workload credentials for pipelines, no raw API keys on endpoints.
  • Managed policy: one version-controlled document, delivered by device management and locked.
  • Runtime isolation: the OS sandbox, plus dev containers for high-risk repositories.
  • Network and data: egress allow-lists, tenant restrictions, secret placement, short local retention.
  • Monitoring and evidence: OpenTelemetry export, hook events to the SIEM, and host process telemetry as the independent record.

Lock the merge

Permission rules merge across scopes. A deny anywhere wins, but allows from user and project files combine with managed allows unless you lock them. The allowManaged*Only flags close that separately for permission rules, hooks and MCP servers: locking the rules does not lock the MCP allow-list. Check it by sampling /permissions on real workstations and reading the source column.

Denies are weaker than they look

Evaluation runs deny, then ask, then allow. But rule matching is fragile: a deny on curl does not catch /usr/bin/curl or an sh -c wrapper.

  • Use whole-command denies, not argument-constraining allows.
  • Never allow-list environment runners such as npx or docker exec.
  • Put real parsing in a PreToolUse command hook.

Denies don't cover arbitrary subprocesses or network access; the sandbox and the egress allow-list carry that load, and the agent should not be able to ask its way out of the sandbox.

Command hooks enforce, HTTP hooks carry evidence

HTTP hooks fail open by default, so enforcement belongs in command hooks set to block on failure. Hooks and MCP servers run outside the sandbox, so review hook scripts as privileged code. Sending prompt content to the SIEM is a works-council and DPIA decision, not a default.

Know where the sandbox stops

It covers shell commands and their children only; file tools, MCP and hooks run outside it. Native Windows and WSL1 have no sandbox, so make it fail rather than fall back silently. Default read access covers much of the machine, and a Docker socket is effectively host access.

Before you rely on it

This baseline is a design proposal to pilot, not a certified configuration. Setting names, minimum versions and defaults change quickly, so confirm each one on the build you pin.

The full baseline, with the threat model, identity routes, the seven-hook bundle and the regulated overlay: Coding-Agent Workstation Baseline (Claude Code)

This cross-post was condensed from the original with AI assistance.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.