#### Agent

# Agent security

AI can behave unexpectedly due to prompt injection, hallucinations, and other issues. Grok Build protects users with guardrails that limit what agents can do. By default, sensitive actions require your manual approval.

These controls and behaviors are Grok Build's defaults, and it recommends keeping them enabled.

## First-party tool calls

Grok Build includes tools that help agents write code: reading files, editing files, running terminal commands, searching the web, and more.

Reading files and searching code don't require approval. Use [.cursorignore](/build/agents-window/reference/ignore-file) to block agent access to specific files. Actions that could expose sensitive data require your explicit approval.

Agents can modify workspace files without approval, except for configuration files. Changes save immediately to disk. Always use version control so you can revert changes. Configuration files (like workspace settings) need your approval first.

**Warning:** If you have auto-reload enabled, agent changes might execute before you can review them.

By default, terminal commands need your approval. To let trusted calls run without prompting, configure [Run Modes](/build/agents-window/agent/security/run-modes). They range from a simple allowlist to the **Auto-review** classifier, and they're best-effort guardrails rather than a hard security boundary.

## Third-party tool calls

You can connect external tools using [MCP](/build/agents-window/mcp). All MCP connections need your approval. After you approve an MCP connection, each tool call still needs individual approval before running. You can pre-approve specific tools with an [MCP allowlist](/build/agents-window/reference/permissions#mcp-allowlist-format).

## Network requests

Attackers could use network requests to steal data. Grok Build's tools only make network requests to:

* GitHub
* Direct link retrieval
* Web search providers

Agents cannot make arbitrary network requests with default settings.

## Workspace trust

Grok Build supports [workspace trust](https://code.visualstudio.com/docs/editing/workspaces/workspace-trust), but it's disabled by default. When enabled, it prompts you to choose between normal or restricted mode for new workspaces. Restricted mode breaks AI features. For untrusted repos, use a basic text editor instead.

To enable workspace trust:

1. Open your user settings.json file
2. Add the following configuration:

   ```json
   "security.workspace.trust.enabled": true
   ```

Organizations can enforce this setting through MDM solutions.

## Responsible disclosure

Found a vulnerability? Email security-reports@cursor.com with details and steps to reproduce.

Grok Build acknowledges vulnerability reports within 5 business days. For critical incidents, it notifies all users via email.
