Skip to content
MyDSHMy DSH Field Notes
中文
Independently maintained; not affiliated with DeepSeek. No association with mydsh.dev or other MyDSH sites.

Home/Models, permissions & security/Permissions & allowlists

Three sandbox modes: read-only, workspace-write, danger-full-access

Unsure what it is actually allowed to do, or a recipe that works elsewhere cannot write files here.

VerifiedVersion and environmentChecked 2026-11-14
Host version
0.1.2-alpha.5
Source
docs/subsystems/sandbox.zh.md
Checked
2026-11-14

Copyable command

dsh --dump-config | grep -i -A3 sandbox

In the official definition, sandbox mode governs exactly one thing: file system effects. Network and process visibility are outside this vocabulary — do not assume tightening the sandbox also limits network access.

ModePermitsTypical use
read-onlyOnly required sinks such as /dev/null. Not even the workspace is writableRead-only analysis, code review, research
workspace-writeWrites under the workspace root plus a backend-provided temp areaMost daily work: editing files, producing artifacts
danger-full-accessBypasses confinement and spawns the raw processWhen you know exactly why you need to leave the workspace
The docs are explicit: only the first two modes are sent to a provider. The danger-full-access consumer spawns raw argv and never calls ctx.sandbox. It is not a wider sandbox; it is no sandbox.

One recipe under two permissions

Run a recipe that writes a file (say, generate an index .md) under both modes and watch:

  • read-only: no artifact. It may error, or it may report success while the file does not exist — the second is worse.
  • workspace-write: the artifact appears inside the workspace; paths outside still fail.
  • danger-full-access: writes outside the workspace succeed too. Now nothing in the mechanism answers 'did it overstep'; only your own reading does.

One easily missed fact: enforcement can be partial

The docs define SandboxEnforcement as full or partial. Partial means the active backend or an older kernel ABI governs only a subset of the promised effects — known cases include older Landlock ABIs and the Everyone and hardlink boundaries on the Windows ACL backend.

Practical takeaway: if you need a hard 'cannot write outside the workspace' guarantee, confirm the backend reports full. Under partial it is not a hard boundary. That matters more than the mode name.

What counts as working

Check every line. All of them pass or the job is not done.

  • You know your current mode
  • You know whether enforcement is full or partial here
  • You verified with a writing recipe, not just by reading config

Where it fails

Symptom, cause, what to do — written in the order it actually happens.

SymptomCauseWhat to do
The recipe reports success under read-only but produces nothingThe tool call was refused or failed silentlyAlways check that the artifact exists; never trust 'done' in the reply
Network still works after tightening the sandboxThe sandbox governs file effects onlyLimits on network belong elsewhere

Sources

Verified means measured here. Compiled means every line carries a source.