DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

FAKE0704 /

FAKE0704/dsh-docker-policy-ceiling

Verified

DeepSeek Harness community plugin: sandbox policy ceiling — refuse danger-full-access at the resolve layer, single boolean opt-in

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@2a032234

dsh-docker-policy-ceiling

A DeepSeek Harness community plugin that keeps a sandbox mode ceiling over a profile: it replaces the stock sandbox-policy service with one that refuses danger-full-access at the resolve layer, with a single boolean to restore upstream semantics.

Built for container execution worlds (see dsh-container-lifecycle): when a profile's subprocess/sandbox/fs run over ssh into a container, the policy question "what may escalate to full host access?" deserves an explicit, default-deny answer that does not silently loosen just because the transport changed. This plugin is transport-independent — it composes with any sandbox provider.

Status: experimental (Stage A). Independent community plugin — not part of DeepSeek Harness, not reviewed or endorsed by the DeepSeek team. Tested against 0.2.2-rc.1 and 0.2.2-rc.2 (see the supported versions; the v0.1.0-rc.1 tag serves rc.1 hosts).

What it does

  • Replaces the base sandbox-policy row (disable + insert — by-id patches cannot rename) with a service that extends the upstream SandboxPolicyService and refuses danger-full-access at resolve with the plugin-owned PolicyCeilingRefusalError (upstream's shared SandboxUnsupportedPolicyError was removed in 0.2.2-rc.2), naming the source (approved grant / session override / deployment default) and the opt-in.
  • Stricter than upstream ssh semantics, on purpose. Upstream treats remote transports more loosely; this plugin makes the ceiling explicit. One config boolean restores the upstream behavior:
- id: sandbox-policy-ceiling
  config:
    allowDangerFullAccess: true   # default false — restores upstream semantics
  • mode / workspaceRoot inherit the base row's defaults (DSH_PERMISSION_MODE / process cwd) and stay overridable from a profile patch.
  • Composition-safe with dsh-headless: replacing the sandbox-policy row drops the headless bundle's by-id config on that row (patch config replaces, never merges), so the plugin re-attaches the headless CLI's additionalWritableRoots grant at runtime — order-free, and only when headlessStartup actually exists (union with any config-set roots, deduplicated).
  • Prompt rendering stays total. A session override to danger-full-access renders a one-line refusal in the model context instead of throwing inside every prompt assembly; the enforcing path (tools calling resolve) keeps the actionable PolicyCeilingRefusalError. A deployment default of danger-full-access without the opt-in fails loudly at load with the same guidance rather than booting a session whose every confined call would be denied.
  • The approval waterfall is unchanged: escalation requests, approver payloads, and post-grant retries are byte-identical to upstream apart from the ceiling refusal itself. A cosmetic pre-deny on the approval stream (escalate sandbox to danger-full-access:) fails fast before a human is asked; enforcement lives at the resolve layer, and the README says so because a cosmetic layer alone would be security theater. Known wording limitation: the waterfall's outcome vocabulary is a closed enum, so the model-facing copy for a pre-denied escalation reads as a user rejection; the honest, actionable refusal text reaches the model on the enforcing resolve path, and the operator's log records the plugin as the denier.

Install

Same three-step shape as the lifecycle plugin (see its README for the full paste blocks); in the profile manifest add both bundles:

"dsh": { "profile": { "bundles": [
  "@deepseek-ai/dsh-base",
  "@deepseek-ai/dsh-headless",
  "dsh-container-lifecycle",
  "dsh-docker-policy-ceiling"
] } }

then dsh plugin --profile headless add dsh-docker-policy-ceiling. The plugin's own bundle patch replaces the base sandbox-policy row; profile-level patches can still override its config by id.

Tests

tests/matrix-test.mjs — 72 assertions, all green, run against the pinned dependency versions:

  • A. resolve matrix: 4 session cases × 3 mode cases × 3 configs (base / ceiling default / ceiling opt-in).
  • B. escalation ladder: every wider-mode request × 4 outcomes × 3 configs; approver payloads asserted byte-identical to upstream apart from the ceiling path.
  • C. post-grant retry: an approved grant cannot smuggle danger-full-access past the ceiling.
  • D. pre-deny waterfall: the cosmetic pre-deny fires before the approval stream, with the resolve-layer refusal still authoritative.
  • E. composition semantics: headless additionalWritableRoots re-attach (deduped, frozen, unioned with config roots); the guarded prompt render is byte-identical to the real base service's registered text for every non-refused mode; a danger-full-access deployment default loads on base/opt-in and is refused actionably at load on ceiling-default.

Implementation note (for anyone extending it): the service must use plain properties, not #private fields — the cordis context hands services through derived views (Object.create chains) that fail private-field brand checks.

Supported versions

Component This release pins Notes
DeepSeek Harness runtime >=0.2.2-rc.2 <0.2.2-rc.3 (engines.dsh) Tested on 0.2.2-rc.1 and 0.2.2-rc.2
@deepseek-ai/dsh-sandbox-policy / dsh-sandbox exact 0.2.2-rc.2 The service extends the upstream SandboxPolicyService; upstream removed SandboxUnsupportedPolicyError in rc.2, so the refusal is the plugin-owned PolicyCeilingRefusalError
@deepseek-ai/cordis exact 4.1.0

License

MIT. Independent community plugin; not affiliated with or endorsed by DeepSeek.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout
—/ 5

No ratings yet

Verified DSH bundle

Commit 2a0322343cd5

Community comments

No comments yet. Be the first to write one.