Skip to content

Sandbox: report the extra temp-storage read-write rule in sandbox.decision, and allow opting out #5365

Description

@vikramgorla

When a host passes a sandbox config with exactly one read-write path, the resolved policy reports two read-write rules (sandbox.decision / policy_resolved shows readwrite: 2). The second one is the temporary-storage grant, which follows $TMPDIR. It is not named in the event, and the schema's readwritePaths does not mention it either; the schema only says temporary storage "follows its own rules and stays granted".

Repro (Linux, bubblewrap, Copilot CLI 1.0.105; also seen with the SDK 1.0.24 runtime):

  1. Start a session with a sandbox config whose only read-write path is the project folder, addCurrentWorkingDirectory: false, allowDevToolAccess: false.
  2. Approve touch "$TMPDIR/x": it succeeds. A sibling folder outside the project is refused, as expected.
  3. The sandbox.decision event lists readwrite: 2 without saying what the second rule is.

Requests:

  1. Include the resolved rule paths (or at least the temp-storage path) in sandbox.decision, so a host can show the user exactly what is writable.
  2. Offer an opt-out for the temp-storage grant (for example allowTempStorage: false), for hosts that want a strict policy and can give the session its own scratch folder.
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

    area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictions

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions