Skip to content

Sandbox writes to project dir by default #1864

Open

Description

@jbellis

What feature would you like to see?

Sandboxing writes would limit the blast radius of Auto/YOLO permissions.

Additional information

No response

Activity

  1. added
    enhancement
    on Jul 17, 2026
  2. xuwenhao commented on Jul 23, 2026

    @xuwenhao

    I've opened PR #1934 implementing this: an optional [sandbox] config section that runs Bash commands under an OS-level sandbox (bubblewrap on Linux, sandbox-exec on macOS) — workspace-only writes in workspace-write mode, deny_read masking for sensitive paths (ssh keys, .env, credentials), and network off by default — plus matching permission policies so file tools get hard denies and outside-workspace asks.

    One design point worth maintainer input: the issue title asks for sandboxing by default, while the PR ships it opt-in (enabled = false) as a conservative first step (fail-open when bwrap/sandbox-exec is unavailable, so nothing breaks on hosts without it). Happy to flip the default or add an onboarding prompt in a follow-up if that's the preferred direction.

  3. Ram-Pavith commented on Oct 3, 2026

    @Ram-Pavith

    #4115 implements this: an experimental [sandbox] config section with workspace-write (default when enabled) / read-only / danger-full-access modes — commands spawned via the Bash tool run inside macOS Seatbelt or Linux bwrap, so writes outside the workspace fail at the OS level even under Auto/YOLO. Off by default behind KIMI_CODE_EXPERIMENTAL_SANDBOX; context in #4114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions