dsh-baseline: A Fail-Closed Security Baseline DSH plugin for DeepSeek Harness

bbo777/dsh-baseline

Development & OperationsVerified
Listed on 2026-10-25
Page last updated 2026-10-26

A fail-closed security baseline for DeepSeek Harness: policy-gated network egress, a monotonic subagent permission ceiling, and a hash-chained audit log of every tool decision and result.

dsh-baseline is a security baseline plugin for DeepSeek Harness that unifies network egress, a subagent permission ceiling, and audit records into one verifiable mechanism. It targets the three escape routes that tool-name-level permission control misses: network egress, subagent inheritance, and the question of who allowed what, when, and why. The plugin is fail-closed, rejecting any unverifiable decision, missing or timed-out approval, broken lineage, or unavailable audit store with an explicit reason, while destructive system commands and raw device writes sit as non-overridable lines. It relies only on documented extension points and coexists with permission-gating and global-audit plugins.

How to Install

install
npmdsh plugin --profile web add dsh-baseline
Category
Development & Operations
Platform
DSH Plugin
Author
bbo777
Distribution
Plugin

dsh-baseline Key Features

Default-blocked egress with allowlistsSubagent permissions only narrowHash-chained audit of decisionsReuses DSH standard approvalsSidebar baseline audit panel
Listed on dsh-plugin.org

dsh-baseline Repo Summary

What Does It Do?

Baseline is a DSH plugin for DeepSeek Harness that turns network egress, subagent permission ceilings, and audit logging into one verifiable mechanism. It addresses the three places where real escapes happen despite tool-name-level permission control: network egress, subagent inheritance, and the question of who allowed what, when, and why. The plugin is fail-closed: any uncertain decision, missing or timed-out approval, broken subagent lineage, or unavailable audit store is rejected with an explicit reason. It relies only on officially documented DSH extension points and events without patching the host source, is maintained by bbo777, and is released under the MIT license.

Core Features

  • Layered network egress: private, loopback, link-local, CGNAT, and cloud metadata hostnames are blocked by default, with host allowlists, per-session egress budgets, and per-call approval in strict mode; network commands and URLs are extracted at pre-execute and re-checked in the guard.
  • Monotonic subagent permission ceiling: walks ancestors via session.header.parentSession and replays the policy of the same call inside ctx.tools.guard(), which can only deny or stay out of the way, so later-registered listeners cannot widen permissions.
  • Hash-chained audit: every decision and result is written to a single SHA-256 hash chain, redacted before writing, with verifyChain() returning the first broken link; the client queries read-only and never touches SQLite directly.
  • Non-overridable baseline rules: destructive system commands and raw writes to device or kernel interfaces always take precedence over custom rules and cannot be disabled from config or the panel.
  • Complementary by design: it does not replace permission categories and only guards the network, subagent ceiling, credential, and destructive-operation lines, so it can coexist with permission-gating and global-audit plugins.

How to Use This Plugin?

Once enabled in DSH, a "Baseline Audit" entry appears in the sidebar, and the panel and HTTP API depend on DSH running in Web mode. Day to day there is nothing extra to do: the plugin evaluates and records every tool call automatically. To adjust behavior, edit policy items such as blockedCIDRs in the config file, or explicitly turn off credential-read denial and the subagent ceiling via the guard switches, which the panel cannot toggle. In strict mode every network egress goes through the standard DSH approval flow. Note that it does not cover malicious plugins calling native processes directly, Code Mode worker-thread escapes, or DNS resolution; those need process-level isolation or container policies.

How to Troubleshoot This Plugin?

The plugin rejects execution whenever it cannot verify a decision, and the error states the reason: missing or timed-out approval means checking whether the DSH approval flow is working; broken subagent lineage means confirming the session's parentSession chain is intact; an unavailable audit store usually means the runtime lacks node:sqlite support, so repair the runtime per the official instructions. If the panel or HTTP routes do not appear, first confirm DSH is running in Web mode.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: bbo777/dsh-baseline. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub

DSH Plugin FAQ