vladlearns/dsh-fs-deny-policy
Denies reads, writes, searches and shell commands inside folders you list, which the DSH sandbox cannot block.
Closes a gap the sandbox leaves open by design: DSH's sandbox can stop writes to places, but every sandbox mode still allows reading, so ~/.ssh and a licence folder are readable to the model. This lets you name a few directories and denies any tool call that resolves inside them — reads, writes, searches and shell commands alike — and it tells the model the list up front, so turns are not burned discovering the fence by hitting it. The most useful part of the README is the github: caveat: the first install from a git dependency fails because pnpm 10 and later refuse to run a dependency's build script until you allow it, and that allowance means trusting the package to run code at install time — so read the source, and pin a commit while you are at it.
Install
npx @deepseek-ai/dsh plugin --profile main add dsh-fs-deny-policyThe README's npx line, --profile main included — that is the profile its author uses, and the same command with your own profile name works identically. The npm package ships prebuilt, so nothing compiles. The plugin starts doing nothing: with an empty deny list it makes no prompt changes and blocks nothing, which is why installing before configuring is the documented order. Deny roots then go in ~/.dsh/profiles/YOUR_PROFILE/cordis.patch.yml; a missing row or a config written before the install is the README's own troubleshooting case. npx @deepseek-ai/dsh --profile main --dump-config shows whether the list composed.
Compatibility
Node.js 22.19 or newer and the dsh CLI. Paths must be absolute, and a relative or duplicated entry fails the load with an error naming the offender rather than silently protecting nothing — the right failure direction for a security plugin. Three toggles exist: fenceReads (reads and searches), fenceShell, and fenceContentSearch, all on by default, with write tools always fenced. Two limits are stated instead of glossed: it only sees calls that pass through the tool pipeline, and there is an unavoidable window between the check and the file actually being touched — an ancestor symlink swapped in that window would not be seen.
Details
- Repo: vladlearns/dsh-fs-deny-policy
- Category: Files & Data
- Stars: 0
- Version: 0.1.0 (npm)
Alternatives
lolkda/dsh-dexsql-mcp · VviLliAm-qwq/dsh-open-path · perrylink/dsh-data-quality