Security
How the Droid CLI protects code and data with local execution, command approval, sandboxing, and enterprise controls.
Security-first design
The Droid CLI runs where your code already lives. Shell commands and file edits execute locally, while prompts and selected context follow the model and gateway configuration set by you or your organization.
Use this page for user-facing CLI protections. For organization-wide enforcement, see Enterprise Controls and Agent Safety & Controls.
Key security features
OAuth login with encrypted token storage. Tokens auto-rotate every 30 days and are stored with OS-level file permissions.
Risky operations require explicit approval unless your settings allow them. Organizations can enforce command allowlists, denylists, and blocklists.
Droid reads and edits files on the machine where it runs. It does not require uploading or indexing a static copy of your repository.
Org-managed settings control models, MCP servers, hooks, plugins, sandboxing, retention, and feature access.
Command policies, hooks, and Droid Shield bound agent behavior before model output matters.
Security best practices
Always review suggested code and commands before approval. You control what Droid can access and execute.
- Review before approving. Verify proposed commands and file changes, especially package installs or system-file edits, operations involving sensitive data or credentials, network requests to external services, and file operations outside your project directory.
- Use isolated environments. Run Droid in containers or VMs for untrusted code repositories, external APIs or web services, experimental or potentially risky operations, and shared development environments.
- Manage permissions carefully. Block commands that should never run, use "ask" for medium-risk operations that need oversight, "allow" only low-risk commands you trust completely, and review permissions regularly in the Settings menu.
- Protect sensitive data. Never include secrets in prompts: use environment variables for API keys and tokens, store credentials in secure credential managers, exclude sensitive files from Droid's working directory, and use
FACTORY_API_KEYfor CI/CD and service-account automation.
Built-in protections
The Droid CLI includes multiple layers of security:
Write access restrictionDroid file-edit tools are scoped to the active project directory and subdirectories.
Command approvalRisky operations require explicit user confirmation.
Command policyManaged allowlists, denylists, and blocklists constrain shell execution.
Droid ShieldSecret scanning can block
git commitandgit pushwhen staged diffs contain likely credentials.Network controlsSandbox rules and enterprise IP restrictions reduce where commands and Factory requests can go.
Session isolationEach conversation maintains separate, secure context.
Enterprise security
Enterprise Controls for model access, BYOK policy, MCP allowlists, hooks, plugins, sandboxing, and retention.
Current reports, subprocessor lists, and security materials are available in the Factory Trust Center.
OpenTelemetry metrics, hosted analytics, audit events, and workflow logs for enterprise monitoring.
Report security vulnerabilities through our responsible disclosure program. Contact security@factory.ai for details.