Community plugin

casualjim / dsh-heimdall-sandbox

DSH sandbox provider delegating confinement to the heimdall-sandbox binary: mode-to-policy-JSON mapping over the pi-heimdall policy fragment format

  • TypeScript
  • MIT
  • 1 stars
  • Sep 20, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-heimdall-sandbox is a DSH plugin published from the dsh-heimdall-sandbox package in the casualjim/dsh-plugins repository.

  • Listing statusManifest verified
  • Manifest checkedNov 16, 2026
  • Packagedsh-heimdall-sandbox
  • Package pathdsh-heimdall-sandbox
  • Repository createdAug 23, 2026

Capabilities and topics

dsh-pluginsdsh-skilldsh-web
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

dsh-heimdall-sandbox

DSH sandbox provider (ctx.sandbox) delegating confinement to the heimdall-sandbox binary (>= 0.1.45).

Mapping

DSH modeheimdall policy
read-onlydeclared-empty filesystem block — reads kept, writes denied except platform temps + /dev/null
workspace-writefilesystem.writable: [session-cwd, ...configured]; platform temps granted by profile defaults
danger-full-accessnever reaches the provider

filesystem.deny passes through in pi-heimdall's own syntax (~/x, absolute, ordered !negations); denied beats writable.

Config

The config format is the pi-heimdall policy fragment, verbatim — the same property names across agent harnesses, no renamed aliases.

- id: sandbox
  name: dsh-heimdall-sandbox
  config:
    binaryPath: ""            # empty: npm wrapper, then PATH
    filesystem:
      writable: []            # beyond the session workspace
      deny: []                # verbatim pi-heimdall deny syntax
      virtual: {}             # in-sandbox path -> host path mounts
    network: host             # "host" (default) or "none"
    proc: default             # "default" or "none"
    env:                      # parent env filter
      allow: []
      deny: []
    sshAgent: false           # mount agent sockets (linux bwrap)
    gpgAgent: false
    ageAgent: false
    projects:                 # per-workspace overrides, longest key wins
      /path/to/project:
        filesystem:
          writable: []
          deny: []

Layers

Policy layers, each merging over the previous (lists append, scalars take the most specific layer, absent fields stay at binary defaults):

  1. ~/.config/heimdall/default.jsonc — GENERATED deny corpus, regenerated by dsh-heimdall's loader on every load. Byte-identical to pi-heimdall's generated file; never hand-edit it. useDefaultFilesystemDeny: false in user/workspace config strips the generated deny list (explicit entries stay).
  2. plugin definition cordis.patch.yml — deployment baseline only (binaryPath); the deny corpus is NOT embedded here.
  3. ~/.dsh/profiles/<profile>/cordis.patch.yaml — the DSH loader merges 1+2 into the provider config the plugin receives
  4. ~/.config/heimdall/config.json(c) — sandbox section, user-global (user-owned overrides)
  5. <workspaceRoot>/.config/heimdall.json(c) — sandbox section, per-workspace

The projects map lives in layers 1–2 (deployment config) and is matched by workspace root between the config layers and the file layers.

Every policy field (except binaryPath) is valid inside a projects entry and inside all files' sandbox sections. The files are multi-plugin: they may also carry other plugins' sections (e.g. dsh-heimdall's commandPolicies); this provider reads only sandbox. The workspace file's sandbox section is the opt-in — committing it lets that repo widen its own writables to any path not covered by the deny corpus. Deny still beats every writable. Malformed JSON fails loudly.

Layers 0, 3, and 4 are read through dsh-heimdall's shared config loader (dsh-heimdall/config): one parser (JSONC), one representation (SandboxOptions), one schema-driven merge (mergeSandboxOptions), and one migrate-and-delete pass that moves legacy .pi/.omp/.dsh heimdall files into the universal locations before anything is read. This package owns no parser, no merge, and no deny corpus of its own — the same corpus definition feeds pi-heimdall, omp, and DSH.

Notes

  • One policy JSON file per confine() call under a fresh private temp dir; removed when the provider stops. A crashed server leaks small files until OS temp sweeps.
  • The in-process fs fence (read/write/edit tools) still enforces DSH's own workspace containment and does not see filesystem.deny/extras — only spawned processes go through this provider.
  • Enforcement reported full (Seatbelt on macOS, bubblewrap on Linux).

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/casualjim/dsh-plugins/dsh-heimdall-sandbox)