Answer in brief
Separate soft instructions, human approval, filesystem enforcement, and tool policy.
A security label is not a complete guarantee. DeepSeek Harness has separate layers for instruction, tool policy, approval, and process sandboxing.
| Layer | Nature |
|---|---|
| Prompt / Plan | Soft behavioral constraint |
| Tool Schema / policy | Call and parameter boundary |
| Approval policy | Human decision point |
| Sandbox | Enforcement of filesystem effects |
Sandbox Modes
read-onlyrejects filesystem writes apart from required sinks.workspace-writepermits the workspace and backend-provided temp area.danger-full-accessbypasses confinement.
This sandbox vocabulary governs filesystem effects, not network or process visibility. “Never use the network” needs a network control or no exposed network capability.
Backends report full or partial enforcement. Platform, kernel, or ACL limitations can make the boundary partial; workflows requiring an absolute guarantee must not treat that as equivalent to full enforcement.
Prefer Enforceable Invariants
Ask in order:
- Can the rule be a type or Schema?
- Can registration reject it early?
- Can sandbox or approval enforce it?
- Only then should policy judgment live in a Skill or prompt.
Runtime invariants such as paired tool calls/results, replayable event order, and cleanup on plugin disposal are more reliable than asking the model to remember internal consistency.
Permission Matrix Exercise
For “scan dependencies and produce a report,” permit reading manifests, optionally writing one report directory, reject installation, explicitly decide whether a vulnerability database may be contacted, and do not expose unrelated environment secrets. Start read-only and widen only the one capability proven necessary.
Destructive actions need an explicit target in the contract, approval showing the actual command, a preview or backup, and independent post-action verification.
Next: Reliable Tool Design.