Agent security
The agent is designed to be powerful but controllable. Safety comes from a combination of approvals, scoping, and organization policy — not from limiting what the agent can help with, but from ensuring you see and approve what crosses trust boundaries.
What protects you
Approval layers
Tool-level gates
Individual tools declare when approval is needed — e.g.
bashfor dangerous commands,read/writefor sensitive paths.User confirmation
You approve, deny, or allow-for-session each pending action in the agent UI.
Organization policy
Admins constrain models, spend, plugin availability, and cloud network egress.
Scoping and sandboxing
Desktop and CLI
- The agent's filesystem scope is the workspace root you opened.
.gitignorerules apply — ignored paths are not casually exposed.- Terminal commands run in a non-interactive shell with timeouts and output limits.
- Dev servers can run detached; you still started the session and approve risky commands.
Cloud agents
Cloud runs execute in isolated environments with org-defined permissions:
Treat cloud agents like CI: grant the minimum repo and network access the task needs.
Organization controls
Admins shape what's allowed across the org:
UI restrictions are enforced server-side. Policy changes are audited so admins can review who changed what and when.
Handling secrets
Avoid pasting credentials into prompts. Use environment variables or your secret manager, and
keep secret files in .gitignore so the agent doesn't read them.
Best practices:
The 1Password marketplace plugin helps validate locally mounted env files before shell commands run — a useful guardrail when development secrets live outside the repo.
Terminal command gates
The bash tool enforces a 120-second timeout per command and evaluates shell input against
heuristic patterns before execution. Commands matching destructive patterns — recursive rm,
find with -delete, disk tools like shred or dd, and fork bombs — always require approval.
The same gate triggers when a command references sensitive paths such as .env files, SSH keys
(id_rsa, id_ed25519), or ~/.aws/credentials. These checks live in packages/agents-core
and apply consistently on desktop and cloud; they complement org policy rather than replacing
your review of unfamiliar commands.
MCP and plugin security
Installed plugins register MCP servers through the tool broker. Treat each connection like any other third-party integration:
- Prefer OAuth or short-lived tokens over long-lived API keys where supported.
- Scope credentials to least privilege — read-only for triage, write only when the task requires it.
- Review which plugins are org-approved; unused integrations reduce attack surface.
- Disconnect MCP servers you no longer need from Tools & MCP in the app.
Security checklist for teams
Set model and budget policy
Limit models to what you support and cap spend per member or org.
Curate plugins
Allow only marketplace plugins your team actually uses.
Configure cloud egress
Default-deny outbound network for cloud agents; allowlist required hosts.
Train members
Review approvals before accepting; never paste production secrets into prompts.