SafetyCard Request a review

Kilo Code

Agentic engineering platform: IDE extension + CLI coding agent

github.com/Kilo-Org/kilocode · 2026-10-03 · 76bcfd4

Defense-in-depth score

2.3 / 10

Kilo's default coding agent edits files, fetches any URL and runs MCP tools without asking, and its default shell auto-approve list is not a strict boundary. Opening a repository is enough for its kilo.json or .kilo/plugin folder to load plugin code, start MCP servers and loosen permissions, with no trust prompt. Kilo ships a solid OS sandbox, but it is off by default. Turning the sandbox on and adopting the 'Review first' permission preset closes much of the gap.

Safest setup

Kilo ships a well-built permission engine whose prompts show the exact command or full diff, an OS sandbox that confines writes and network, workspace snapshots, and a record of every tool call. As shipped, the default agent acts without asking, the sandbox is off and a repository's own config loads with no trust prompt, so the safest setup turns on the prompts and sandbox Kilo already includes and adds containment around it.

SetupHowWhat it gives you
Scoped, low-limit keysStart Kilo from a shell that holds only the keys this task needs, each scoped or read-only with a spending limit set at the providerCommands and MCP servers inherit only the access you chose, not every credential on your machine C1
Ask before actingpermission set to "ask" in your global config, adding allow only for tools that just readEdits, shell commands, web fetches and MCP tools each wait for a person to see the exact call C2
The OS sandboxenabled: true under sandbox in your global config, keeping the default network setting of denyShell commands can write only to the workspace and Kilo's own state, and reach no network unless you list a host C4
A reviewed workspaceOpen only repositories whose kilo.json, opencode.json, .kilo folder and AGENTS.md you have readPermission rules, MCP servers, plugins and instructions come only from sources you trust C6
Workspace snapshotsKeep the default snapshot setting onFile changes inside the workspace can be reverted after a session C2
Step and command limitssteps: <n> on each agent under agent, and KILO_COMMAND_TIMEOUT_MAX_MS=<ms> in the environmentEach session ends after a set number of iterations and no shell command runs past your ceiling C10
Cloud uploads offKILO_DISABLE_SESSION_INGEST=1 in the environment and openTelemetry: false under experimentalTranscripts stay out of Kilo's session-ingest service, and usage telemetry stops C8
Its own container or VMRun Kilo in a container or VM whose network reaches only the model provider and the hosts the task needsAn outer boundary around local MCP servers, plugins and anything that runs outside the sandbox, and a narrow path for data to leave C5

Approving with confidence

  • Read each prompt and approve calls one at a time; prompts show the exact command or the full diff.
  • An allow rule covers every later call it matches, so keep allow rules for tools that only read.
  • A call that writes kilo.json, opencode.json or anything under .kilo changes what later sessions may do, so read those with extra care.

Handling data

  • kilo.db in Kilo's data directory keeps the input and output of every tool call; store it like sensitive logs, and copy it off the machine when you need a record the agent's shell can't change.
  • Provider keys saved through Kilo sit in a plaintext, owner-only file; prefer short-lived keys.

Key gaps (6)

  1. A hijacked session holds the developer's full ambient authority: every shell command and MCP server inherits the whole environment and the sandbox is off by default. C1 · Identity & least privilege
  2. Workspace kilo.json/opencode.json can loosen approval rules (e.g. '*': 'allow') with no trust prompt. C2 · Approval gates
  3. By default model-chosen commands, workspace scripts and local MCP servers run on the host as the user with the full environment; the OS sandbox is opt-in. C4 · Code-execution isolation
  4. A prompt-injected session can exfiltrate data via auto-approved webfetch and make changes via auto-allowed edit and write tools, with no human involved. C5 · Untrusted input blast radius
  5. Workspace kilo.json/.kilo can add MCP servers, in-process plugins and permission allow rules with no trust decision. C6 · Memory, context & configuration integrity
  6. Opening a repository whose kilo.json lists an npm plugin, or whose .kilo/plugin folder holds a .ts file, imports that code into the Kilo process without consent. C7 · Third-party extensions

Criteria

C1 Identity & least privilege

0.07 / 1.00

Kilo runs as the developer's OS user and uses whatever credentials that user has. Shell commands and local MCP servers inherit the full process environment, with only Kilo's own server and config variables stripped, so cloud keys, GitHub tokens and provider API keys in the environment reach every subprocess. There is no scoped identity or per-request authorization beyond the tool permission rules. Protection of the project's own configuration against agent writes is not tamper-resistant, which lets the agent widen its own permissions for later sessions.

C2 Approval gates

0.25 / 1.00

The permission engine itself is well built: shell commands are parsed with tree-sitter, each sub-command is matched against allow/ask/deny rules, and prompts show the exact command or file diff. But the default code agent allows everything not explicitly listed, so file edits and writes, web fetches and all MCP tools run without asking. The default shell auto-approve list is not a strict boundary, which lets some commands have side effects without a prompt. A cloned repository's kilo.json can also set permissions to allow everything with no trust prompt.

C3 Tool & action scoping

0.33 / 1.00

File tools check that paths stay inside the project, but path containment is not a strict boundary. The shell tool takes arbitrary command strings filtered by wildcard rules, and webfetch accepts any URL with no block on internal or metadata addresses. MCP tools get no validation layer. In the default agent, shell, edit, write, web fetch and MCP are all available.

C4 Code-execution isolation

0.50 / 1.00

By default, shell commands, workspace scripts and local MCP servers run directly on the host as the user, with the full environment. Kilo ships a real OS sandbox (bubblewrap on Linux, Seatbelt on macOS) that makes the filesystem read-only except the workspace, denies network by default, fails closed when unavailable, and requires an interactive human reply to escalate, and a project config can only tighten it. It is off unless the user enables it, so it scores as an opt-in control.

C5 Untrusted input blast radius

0.00 / 1.00

Nothing in the code distinguishes untrusted content (web pages, files, MCP results) from the user's instructions. In the default agent, webfetch to any URL runs without approval, so a hijacked session can send data out in a URL. It can also read environment secrets through the auto-approved printenv and make lasting changes without a prompt through auto-allowed edit and write tools; gaps in the shell auto-approve list widen this further. Leaking data and taking irreversible actions are both possible without a human involved.

C6 Memory, context & configuration integrity

0.13 / 1.00

Project files load automatically with no trust prompt: kilo.json/opencode.json can add permission rules and MCP servers, any .ts/.js file in .kilo/plugin is imported as code, and AGENTS.md is injected as instructions. Kilo does restrict project config from reading environment variables and outside files, and the optional memory feature is off by default, asks before saving, filters secrets and lives outside the project. Because protection of those project files against agent writes is not tamper-resistant, one injection can persist into every later session, and to every user of a repo if committed.

C7 Third-party extensions

0.00 / 1.00

Plugins declared in any config, including a cloned project's kilo.json, are installed from npm at their latest version and imported into the Kilo process, and plugin files in the project's .kilo/plugin folder are imported directly. Local MCP servers from project config are launched automatically on the host with the inherited environment. There is no pinning, integrity check or consent step, so opening a malicious repository is enough to run its code with everything Kilo can reach.

C8 Secrets & sensitive-data protection

0.15 / 1.00

Provider credentials are stored in a plaintext JSON file with owner-only permissions, and a few paths mask secrets (memory writes, remote error reports). Nothing redacts secrets in subprocess environments or model-bound tool output, and printenv is auto-approved so environment secrets can reach the model. PostHog usage telemetry is on by default, and when signed in to Kilo every message and tool part is synced unredacted to Kilo's session-ingest service unless an environment variable opts out.

C9 Audit & traceability

0.65 / 1.00

Every tool call, including MCP tools and sub-agent sessions, is stored as a structured record in a SQLite database outside the project: input, output, status, start and end time, and why it was allowed or denied (manual approval, which rule, and whether it came from global config, project config or auto-approve mode). Sub-agent sessions link to their parent. The database is written per action but is an ordinary file in the user's data directory, so a shell command running as the same user could alter it, and there is no tamper evidence or off-host export by default.

C10 Limits & kill switch

0.20 / 1.00

There is no default step, time or cost limit on a session: the step limit defaults to infinity and the only cost control is an optional, non-blocking alert in the terminal UI. Shell commands have a 2-minute default timeout that the model can raise, and repeated identical tool calls trigger a prompt. Stopping a session kills running shell commands, but the model can start persistent background processes that outlive the session.