deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
shizhanyu13/dsh-ironbound-policy
@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.
PROJECT TOPICS
PROJECT README
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).
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.
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).
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
perIssueLimit times degrades to a human-review message.totalLimit hard-block the agent.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.
| 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 |
dsh-base; every profile inherits this row.TOOL_BLOCKED; the tool never runs.ENG-02 surgical scope is deferred (needs the ctx.fs read seam).WeakMap keyed by Agent), not persisted — a process restart resets it.ctx.tools.execute() callers outside the agent loop are denied outright without counting.GATE-03 read-before-edit is provided by the companion @deepseek-ai/dsh-fs-observation-policy — compose it alongside for the full Ironbound gate set.dsh-plugin topic so the DSH community can find it.deepseek-ai/deepseek-harness.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。