> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Coding Agent Governance

> Secure your code generation factory. Includes an interactive rollout planning wizard.

Coding Agent Governance gives security and engineering teams visibility and control over AI coding agents across developer workstations and cloud environments. It inventories the agents, models, MCP servers, and skills in use. It monitors agent actions such as commands, file access, and tool calls, and enforces policies to block, alert on, or require approval for risky behavior before it executes.

Secure coding checks extend these controls with detection backed by Endor Labs intelligence. The malware check looks up packages in the Endor Labs malware feed, and the secrets check scans content the agent writes or reads. The dependency risk check flags new dependencies with known vulnerabilities. See [Secure coding checks](https://docs.endorlabs.com/agent-governance/secure-coding.md) to review what each check inspects.

These controls are guardrails for accidental agent behavior, not a sandbox or hard security boundary. See [How Coding Agent Governance works](https://docs.endorlabs.com/agent-governance/how-it-works.md) for what that means in practice and how events flow into Endor Labs.

> [!WARNING]
>
> Keep three operating caveats in mind when you rely on Coding Agent Governance:
>
> * **Hook problems never block developers.** If a hook cannot run, or a malware policy cannot reach Endor Labs for a verdict, the action proceeds. The event stays missing from inventory and policy violations until you fix the cause. An unreadable policy cache still enforces the built-in system policies. See [Limitations](https://docs.endorlabs.com/agent-governance/how-it-works.md#limitations-of-coding-agent-governance).
> * **Policy changes apply at the next session start.** Hooks evaluate against the policy snapshot fetched when a session starts, so tell developers to restart the agent after a policy edit. See [Local policy cache](https://docs.endorlabs.com/agent-governance/policies.md#local-policy-cache).
> * **Redaction is pattern-based.** The redactor masks secret-named keys and known credential formats before an event leaves the machine, but a secret in an unknown format can still reach the backend. See [Data sent to Endor Labs](https://docs.endorlabs.com/agent-governance/how-it-works.md#data-sent-to-endor-labs).

## Supported agents and platforms

Coding Agent Governance enforces policies for supported agents on developer machines. Endor Labs discovers other AI coding tools at session start but does not govern them.


&#x20; \- Agent and form factor: Claude Code (App and CLI)
&#x20; Supported: -yes-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: Claude Cowork¹
&#x20; Supported: -no-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: Claude Cloud²
&#x20; Supported: -yes-
&#x20; Platforms: Hosted sandbox
&#x20; \- Agent and form factor: Cursor (IDE)
&#x20; Supported: -yes-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: Cursor Cloud³
&#x20; Supported: -limited-
&#x20; Platforms: Linux
&#x20; \- Agent and form factor: Cursor CLI⁴
&#x20; Supported: -limited-
&#x20; Platforms: macOS, Linux
&#x20; \- Agent and form factor: Codex (CLI)
&#x20; Supported: -yes-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: GitHub Copilot (CLI)
&#x20; Supported: -yes-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: GitHub Copilot (VS Code agent mode)
&#x20; Supported: -yes-
&#x20; Platforms: macOS, Linux, Windows
&#x20; \- Agent and form factor: Snowflake Cortex Code (CLI)⁵
&#x20; Supported: -yes-
&#x20; Platforms: macOS
&#x20;&#x20;

> [!WARNING]
>
> ¹ **Claude Cowork**: Not supported while [claude-code issue #40495](https://github.com/anthropics/claude-code/issues/40495) is open. The Cowork sandbox ignores user settings, managed settings, and environment variables, so governance hooks never load and Cowork sessions are neither monitored nor governed. The failure is silent. Use Claude Code (app or CLI) for governed work.
>
> ² **Claude Cloud**: Hooks run inside the hosted sandbox and fire from session start.
>
> ³ **Cursor Cloud**: Agent lifecycle events, such as stop and agent response, do not fire.
>
> ⁴ **Cursor CLI**: Shell command hooks fire reliably. Prompt, file edit, and stop events do not. On Windows, run the CLI under WSL.
>
> ⁵ **Snowflake Cortex Code**: Verified on macOS only. Linux and native Windows are not yet verified.

## Set up

**1. Complete the prerequisites**

Confirm tenant access, check license eligibility, and create an API key with the **AI Audit User** role. See [Prerequisites](https://docs.endorlabs.com/agent-governance/prerequisites.md).

**2. Deploy hooks**

Install hooks for [Cursor](https://docs.endorlabs.com/agent-governance/cursor.md), [Claude Code](https://docs.endorlabs.com/agent-governance/claude-code.md), [Codex](https://docs.endorlabs.com/agent-governance/codex.md), [GitHub Copilot](https://docs.endorlabs.com/agent-governance/copilot.md), and [Snowflake Cortex Code](https://docs.endorlabs.com/agent-governance/cortex-code.md). To roll them out across a fleet, see [MDM deployment](https://docs.endorlabs.com/agent-governance/mdm-deployment.md) and build each configuration with the [in-browser generator](https://docs.endorlabs.com/agent-governance/mdm-deployment.md#generate-a-configuration-in-your-browser). The generator doesn't cover Cortex Code yet.

## Operate

**1. Review your inventory**

Find the agents, MCP servers, models, and skills your developers use, each rated with an [Endor Score](https://docs.endorlabs.com/agent-governance/endor-score.md). See [Review your agent inventory](https://docs.endorlabs.com/agent-governance/inventory.md).

**2. Triage policy violations**

Filter, read, and respond to violations from your governed agents as they arrive. See [Triage policy violations](https://docs.endorlabs.com/agent-governance/policy-violations.md).

**3. Review and extend policies**

Endor Labs provides an in-built policy catalog, enabled by default. Review it, then add custom rules for what to block, alert on, or ask permission for. See [Coding Agent Governance policies](https://docs.endorlabs.com/agent-governance/policies.md) to write a policy.

## Plan your rollout

Pick your AI coding agent and rollout style. The wizard returns a tailored checklist with deep links to every page you need.

## Names you'll see

Each name covers a different part of the same capability:

* **Coding Agent Governance** is the feature name, used across this documentation.
* **Agent Governance** is the name in the Endor Labs user interface, on the left-sidebar entry and on the policy tab under **Policies & Rules**.
* **AI Audit** is the machinery hooks run as. It appears in the **AI Audit User** role for hook API keys, the [endorctl ai-audit](https://docs.endorlabs.com/developers-api/cli/commands/ai-audit.md) command, and the `ENDOR_AI_AUDIT_*` environment variables.

## Frequently asked questions

> [accordion] Is Coding Agent Governance a security boundary?
>
> No. It puts guardrails around agent behavior, not a sandbox, firewall, or hardened boundary. Policy controls lower the risk of agent mistakes and limit the damage they can do. Hard guarantees require isolation at the operating system, system call, or sandbox level, which Coding Agent Governance works alongside. See [What Coding Agent Governance is (and isn't)](https://docs.endorlabs.com/agent-governance/how-it-works.md#what-coding-agent-governance-is-and-isn’t).

> [accordion] Will it stop a determined user from getting around it?
>
> No, and that is by design. It targets accidental agent behavior, not a person deliberately trying to defeat the controls. See [What Coding Agent Governance is (and isn't)](https://docs.endorlabs.com/agent-governance/how-it-works.md#what-coding-agent-governance-is-and-isn’t).

> [accordion] What happens when a policy blocks an action?
>
> The agent receives a deny response explaining that a governance policy blocked the action and telling it not to work around the block. The event appears in **Policy Violations**. See [Hooks and what they govern](https://docs.endorlabs.com/agent-governance/how-it-works.md#hooks-and-what-they-govern).

> [accordion] Why did a blocked action succeed in a different form?
>
> Policies match commands and patterns, not the end effect, so an agent can occasionally reach the same result another way. That trade-off comes with pattern-based controls that can miss some cases. See [Limitations](https://docs.endorlabs.com/agent-governance/how-it-works.md#limitations-of-coding-agent-governance).

> [accordion] What actions can a policy take?
>
> **Block**, **Alert** (record only), or **Ask Permission**, written as blocklists or allowlists over shell commands, file access, and MCP tool calls. Secure coding checks add malware, dependency risk, and secrets detection. See [Coding Agent Governance policies](https://docs.endorlabs.com/agent-governance/policies.md) to write a policy.

> [accordion] Can policies catch malicious packages and leaked secrets?
>
> Yes. The malware check flags packages from the Endor Labs malware feed in installs and manifest edits. The secrets check scans content the agent writes or reads on the developer's machine. A secrets violation reports the rule and location, never the secret value. See [Secure coding checks](https://docs.endorlabs.com/agent-governance/secure-coding.md) to review what each check inspects.

> [accordion] Can I change the built-in system policies?
>
> Yes. Override a system policy with one of the same name and a different action, turn it off in the policy list, or author your own from the same templates. See [Coding Agent Governance policies](https://docs.endorlabs.com/agent-governance/policies.md) to write a policy.

> [accordion] How is sensitive data handled?
>
> Every command line, file path, URL, environment value, and MCP tool input or output passes through a redactor on the developer's machine before the hook sends anything. Secret-named keys and common credential formats become `[REDACTED]`. Prompt text stays local. See [Data sent to Endor Labs](https://docs.endorlabs.com/agent-governance/how-it-works.md#data-sent-to-endor-labs).

> [accordion] Are skills and plugins checked for security?
>
> Endor Labs discovers skills at session start and rates them with an [Endor Score](https://docs.endorlabs.com/agent-governance/endor-score.md), and policies can flag or block suspicious ones. It assesses plugins through the MCP servers and skills they contribute, not as a single unit. See [Skills](https://docs.endorlabs.com/agent-governance/inventory.md#skills).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.