dsh-ironbound-policy
Identified@shizhanyu13/dsh-ironbound-policy — DSH plugin: Ironbound hard-gate guard. Blocks dangerous shell commands before they reach a tool, with a double-layer degrade counter over tools/execute. dsh-plugin.
dsh-ironbound-policy
A hard-gate guard for DeepSeek Harness. Blocks dangerous shell commands before they ever reach a tool — and degrades an agent that keeps trying to run them.
🚀 Install:
npm install @shizhanyu13/dsh-ironbound-policy— then wire it intocordis.patch.yml(see Quickstart below).
Why this exists
A DSH agent can run arbitrary shell. One bad call — rm -rf /, git push --force, a curl | sh — and the model has already done something you can't undo. That's the Ironbound problem: put a hard gate between the model and the machine, not just a prompt telling it to be careful.
dsh-ironbound-policy is that gate. It listens on the tools/execute seam before a tool runs, replaces a dangerous call with a structured TOOL_BLOCKED result, and applies a double-layer degrade counter so a model that keeps hitting the same wall gets progressively more constrained — from a warning, to a human-review message, to a hard block.
Provenance & trust: this is a community-maintained port, not an official DeepSeek AI package. The danger regex is ported from Claude Code's
block-dangerous-cmd.shblacklist. It targets the DSH plugin system (dsh-plugin). Use it with your own judgment — and feel free to open an issue.
Quickstart
npm install @shizhanyu13/dsh-ironbound-policy
Add the plugin to a profile's cordis.patch.yml:
- id: ironbound-policy
name: '@shizhanyu13/dsh-ironbound-policy'
config:
denyList: [] # extra regex patterns merged over the built-in deny list
perIssueLimit: 3 # same issue repeated N times -> degrade message
totalLimit: 10 # cumulative denials beyond this -> hard block
That's it. The plugin ships prebuilt ESM + .d.ts, so no build step at runtime. It needs a DSH host that provides the peer packages (@deepseek-ai/cordis, @deepseek-ai/dsh-agent, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-invariants).
What it does
1. Dangerous-command deny
A built-in denylist (the block-dangerous-cmd.sh blacklist) plus your denyList. A matching shell call never runs; instead the model sees a structured result:
tool-bash error: Ironbound policy: dangerous command blocked (A:Bypass): rm -rf /
code: TOOL_BLOCKED
2. Double-layer degrade counter
- Per issue — the same problem repeated
perIssueLimittimes degrades to a human-review message. - Total — cumulative denials beyond
totalLimithard-block the agent. - The per-issue counter resets on a clean run; the total does not.
3. It's a listener, not a tool
It never appears in the model's tool catalog and has no request-cache effect. It's pure overhead on the execution seam — zero surface area on the prompt.
Configuration
| field | default | meaning |
|---|---|---|
denyList | [] | extra regex patterns merged over BUILTIN_DENY |
perIssueLimit | 3 | consecutive same-issue denials before a degrade message |
totalLimit | 10 | cumulative denials before a hard block |
Default behavior
- Active by default when wired through
dsh-base; every profile inherits this row. - A dangerous shell command →
TOOL_BLOCKED; the tool never runs. - Wired as a single source in your profile; override the limits to tune it.
Known limitations
ENG-02surgical scope is deferred (needs thectx.fsread seam).- The counter is per-agent in-process (a
WeakMapkeyed byAgent), not persisted — a process restart resets it. - Direct
ctx.tools.execute()callers outside the agent loop are denied outright without counting. GATE-03read-before-edit is provided by the companion@deepseek-ai/dsh-fs-observation-policy— compose it alongside for the full Ironbound gate set.
Community & contribution
- Discoverability: tag your own plugin repo with the
dsh-plugintopic so the DSH community can find it. - Upstream PRs: DSH does not currently accept external pull requests, so this is delivered as an independent plugin rather than a patch to
deepseek-ai/deepseek-harness. - Feedback, bug reports, feature ideas: open an issue, or start a discussion.
License
MIT
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 17.5k
CC0-1.0
Python
Sep 30, 2026
by zhu1090093659
DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
★ 8.2k
↓ 134/wk
Apache-2.0
TypeScript
Oct 1, 2026
dsh plugin --profile web add dsh-webby yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
★ 7k
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby strukto-ai
The World's First Virtual Terminal for AI Agents
★ 3.7k
↓ 264/wk
Apache-2.0
TypeScript
Oct 1, 2026
dsh plugin --profile agent add @struktoai/mirage-dshby xmanrui
通过扫码或机器人凭据把IM机器人接入DeepSeek Harness(支持飞书、微信、钉钉、企业微信、QQ、Slack、Telegram、Discord和WhatsApp)。 Connect IM bots to DeepSeek Harness via QR code or credentials (9 channels).
★ 1.6k
↓ 16.4k/wk
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add @xmanrui/dsh-imby hyhmrright
AI code reviews grounded in 12 classic engineering books — decay risk diagnostics with book citations, severity labels, and 6 analysis modes including full-sweep auto-fix
★ 1.5k
MIT
JavaScript
Sep 28, 2026