Skip to content

feat(review): a review runs its tools in the network-less sandbox by default #2096

Closed

Description

@dan-petty

Friction

Part 4 (Part D) of the tracker #772. A review runs its tools with no sandbox. DirectToolExecutor starts each tool as a child process of devops-cli with the parent's environment and network, and it is the executor that a scanner gets when nobody gives it another (src/devops_cli/security/tool_executor.py, module docstring). SandboxToolExecutor exists (bubblewrap through HostSandbox: no network, a cleared environment, a read-only tree, read-only inputs and a private temporary HOME), but a review does not select it.

What should happen

A review runs its tools in SandboxToolExecutor by default. When the host cannot start the sandbox, the review says so and does not run the tool outside the sandbox without a person's choice.

Evidence

Feasibility to check first

Whether bubblewrap starts in the devcontainer (rootless Podman on WSL2) and in CI, and which pinned tools need a network or a database (#1144, #1146 fetch them outside the sandbox).

Order

After Part 2 (the workspace through the constructor) merges.

Source: #772

Activity

  1. added
    source/agent
    type/feature
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate proposes a new behavior for how reviews run their tools, which is a feature addition.
    • Priority: P2-Medium. This change improves security and sandboxing, which is important but not critical to core functionality.
    • Value: High. Improving sandboxing for all review tools increases security for users.
    • Effort: Medium. Implementing sandboxing requires checking compatibility with devcontainer and CI environments, and ensuring network needs are handled.
    • Related: refactor(security): mypy and the review canary start their tools through a ToolExecutor #1978, which asks for a different change. Both items relate to tool execution in reviews, but the candidate wants sandboxing by default while item 1978 concerns mypy and review canary starting tools outside ToolExecutor.
  3. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Added scope, 2026-10-24 (from #1978). Since #1978, mypy and the review canaries run through the ToolExecutor, with the reviewed repository's .venv interpreter in ToolRequest.program. Before mypy can run in the sandbox:

    • The sandbox binds the Python installation that the python of a .venv outside the tree links to, read-only, behind the _is_python_installation guard of HostSandbox. The mypy request already names the .venv in read_only_binds.
    • Mypy and its canary get a writable cache directory in the sandbox (MYPY_CACHE_DIR).
  4. added 2 commits that reference this issue on Oct 24, 2026
    8ace471
    1f53ec7
  5. added 2 commits that reference this issue on Oct 24, 2026
    b94adcc
    20915ce
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

    source/agenttype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions