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

# Govern GitHub Copilot with Formal

> Apply Endpoint rules to the Copilot CLI and Copilot for Xcode.

On macOS, the Endpoint recognizes the Copilot CLI and Copilot for Xcode. VS Code has no dedicated identity, so match it by hostname.

## Use cases

| Use case | Guide |
| - | - |
| Block Git pushes from the Copilot CLI | [Block Agent Git Pushes](https://docs.formal.ai/docs/guides/example-use-cases/block-agent-git-pushes.md) |
| Block MCP servers and skills outside your Catalog | [Guardrails](https://docs.formal.ai/docs/guides/ai-governance/guardrails.md) |

## What Formal sees

| Surface | Detected by |
| - | - |
| Copilot CLI (macOS) | `process.is_copilot` |
| Copilot for Xcode (macOS) | `process.is_copilot_xcode` |
| VS Code and web | A hostname rule |
| Remote MCP tools | [MCP Gateway](https://docs.formal.ai/docs/guides/core-concepts/connectors/mcp-gateway.md) |

## 1. Add a network rule

Create this [Network Rule](https://app.formal.ai/network-rules) to inspect all traffic from the Copilot CLI and Copilot for Xcode, and set it to **Active**:

```cel theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
{
  "condition": {
    "pre_tcp": os == "macos" &&
      (process.is_copilot || process.is_copilot_xcode),
    "pre_tls": os == "macos" &&
      (process.is_copilot || process.is_copilot_xcode),
    "post_tls": true
  }
}
```

## 2. Check the logs

Enable [Transparent Mode](https://docs.formal.ai/docs/guides/client-apps/desktop-app.md#transparent-mode), run a Copilot request on a Mac, then search [Logs](https://app.formal.ai/logs):

```text theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
source:desktop
```


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