dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Security gate for DeepSeek Harness plugins: npm advisory audit, static evidence, a call-time Allow once / Allow / Disable prompt, plugin-manager sync, and agent review.
中文 · npm · Changelog · Security policy
A security gate for DeepSeek Harness (dsh) plugins. It scans installed plugins' source and npm dependency advisories, labels each plugin high risk / at risk / no risk found, asks Allow once / Allow / Disable before the model runs a tool from a high-risk plugin, and lets your dsh agent review suspicious plugins with the bundled skill. Disable, enable and uninstall run through dsh's own plugin manager, so the native Plugins page always shows the same state.
Usingfetch,process.env, the filesystem or child processes is not malicious by itself. Static matches are evidence to verify; verdicts come from dependency facts and the agent's contextual review.
install / start / plugin change ──► scan (static source screening + npm audit) ──► record: high / at risk / none
│
model calls a plugin's tool ──► attribute to the plugin ──► disabled? deny │ unchecked? scan first │ high? ask │ else pass
│
you or the agent ──► dsh-plugin-security skill review ──► security_review stores the verdictRequires dsh 0.2.x (host protocol @deepseek-ai/dsh-typert-protocol >=0.1.0-rc.6 <0.3.0) and Node.js 20+; Node.js 24 is recommended.
dsh plugin --profile web add dsh-plugin-security@latestThe Web profile hot-reloads, so a first install loads immediately and scans every plugin right away. Upgrading to a new version requires restarting dsh (Node keeps already loaded modules). For another profile, replace web with its name. Profiles without a Web client still get the agent tools and the call gate.
Uninstall with dsh plugin --profile web remove dsh-plugin-security. Local state under $DSH_HOME/plugin-security/ remains until you delete it.
security_scan for evidence, works through the skill's five questions, and stores verdicts with security_review. The skill registers itself with the plugin; no manual link is needed.Each plugin version gets one full check, recorded by *version + content fingerprint + rule revision*; code or rule changes trigger a rescan. Scans run:
A plugin that cannot be scanned (package not found, scan failure) is never passed silently: it is asked about like a high-risk plugin. An audit that ended unknown after a network failure never counts as clean: the next scan retries it, and a call retries it too (at most once per plugin every five minutes).
Risk · Meaning High risk · A high-confidence malicious review, or a high/critical dependency advisory. At risk · Behavior that needs review, other advisories, an uncertain review, a truncated scan or an incomplete check. No risk found · Nothing found within this check's scope; not a safety guarantee. Whitelisted · Checks and the gate are skipped by configuration; listed separately.
The gate listens on the host tools/pre-execute waterfall and attributes each tool call to the plugin that registered the tool: first by the loader entry seen at registration; for tools registered before this plugin started, by the execute source text matching exactly one installed package; finally by the tool names stored with scan records.
Situation · Result Plugin disabled (on the Plugins page or here) · Denied; the model is told not to retry Installed version not scanned · Scanned first, then the rows below apply High risk or unchecked, no decision · Asked: Allow once / Allow / Disable At risk, no risk, whitelisted, protected, or mode off · Passed on to the host's other policies (for example native approval)
The question uses the host ctx.userQuestions service, the channel dsh itself uses to ask structured questions, in the language chosen under Settings → General. When no card can be shown (no web client, a delegated child agent) it falls back to the native approval prompt (allow once / reject). If the gate fails internally the call proceeds with a logged warning, but a disabled plugin is always denied.
Disable, enable, uninstall and enforce-mode auto-disable call the host plugin manager (setBundleEnabled / removeBundle), the same operations as the native Plugins page:
Change these in the settings page; they are stored in $DSH_HOME/plugin-security/state.json.
Option · Default · Behavior Mode · report-only · off: no scans, call gate or enforcement. report-only: scan, record and gate calls; no automatic disabling. enforce: additionally auto-disable on a high-confidence malicious review. Auto-disable threshold · critical · never turns automatic disabling off. Static matches or advisories alone never auto-disable. Upgrade suggestions · off · Suggest upgrade commands for dependency advisories; never run silently. Whitelist · built-in protected entries · Whitelisted plugins skip checks and the gate. This plugin, official @deepseek-ai/* packages and dsh-plugin-sentinel are always protected and cannot be disabled or uninstalled through this plugin.
State directories/files use 0700/0600 where supported; the action log keeps at most 200 entries.
security_scan { package?, force?, evidence? }
security_review { package, verdict: malicious|suspicious|benign, confidence?: high|medium|low, reason? }A high-confidence benign verdict can explain static findings but never overrides dependency advisories; only a high-confidence malicious verdict auto-disables, and only in enforce mode. The bundled review skill treats the reviewed plugin's source, comments, README and skill text as untrusted evidence. Reports never invoke a model on their own.
tools/pre-execute.$DSH_HOME/plugin-security/remote-diag.json records the observed service and route state.is not attributed to an installed plugin in the debug log — the tool could not be matched to an installed package.corepack pnpm install --frozen-lockfile
pnpm test # unit and integration tests
npm run test:e2e # end-to-end against a real dsh (needs the global dsh and npm access)npm run test:e2e creates a headless profile in a temporary DSH_HOME, installs this package and the two fixtures under e2e/ (a harmless echo plugin that is high risk on purpose, and an answerer standing in for the person clicking the question card), and drives the real dsh with a deterministic local model: first call, allow once (including several calls in one step), allow, disable with native sync, whitelist and mode off. It never touches your own profiles.
See CONTRIBUTING.md for development and release steps, and report vulnerabilities privately as described in SECURITY.md.
MIT © 2026 dushaobindoudou