
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
Declarative tool fencing for DeepSeek Harness: allow/deny/ask rules over tool invocations with argument globs, wired to the native approval flow, with an audit trail.
Declarative tool fencing for DeepSeek Harness (dsh).
dsh gives you tools/pre-execute waterfalls and approval policies, but keeping agents away from rm -rf, .env writes, or internal URLs still means hand-writing listeners. dsh-fence turns that into config:
# in your profile's cordis.patch.yml
- id: fence
name: dsh-fence
config:
rules:
- match: { tool: bash, arguments: { command: "*rm -rf*" } }
decision: deny
reason: "no recursive deletes"
- match: { tool: write, arguments: { path: ".env*" } }
decision: ask
- match: { tool: web_fetch, arguments: { url: "**internal.example.com**" } }
decision: deny
defaultDecision: allow
allow / deny / ask — ask hands off to dsh's native approval flow (UI prompt or headless responder). dsh-fence never auto-approves anything.command, path, nested options.mode, …) with * patterns. * matches any characters including separators, so *rm -rf* catches rm -rf /tmp/x. Over-matching is the safe default for a fence./fence command.Unmatched tools fall through to defaultDecision (allow unless you say otherwise).
Requires a dsh profile (see the dsh plugin docs):
dsh plugin --profile <name> add dsh-fence
# or from git:
dsh plugin --profile <name> add github:leesama/dsh-fence
| Field | Type | Notes |
|---|---|---|
match.tool | glob | Tool name, e.g. bash, write, * |
match.arguments | map of path → glob | Dot paths into the parsed tool arguments; missing value ⇒ rule doesn't match |
decision | allow | deny | ask | ask delegates to the native approval waterfall |
reason | string | Shown on deny/ask and in the audit report |
/fence — decision counts and the most recent 20 audited calls.tools/pre-execute (waterfall)
├─ evaluateRules(config, toolName, arguments) ← pure engine, first match wins
├─ allow → next() ← tool proceeds through the pipeline
├─ deny → { kind: "deny", reason } ← tool never runs
└─ ask → preserve downstream denial, otherwise { kind: "ask", reason }
(allowed-once runs; otherwise rejected)
The rule engine (src/engine.ts) is pure and unit-tested; src/index.ts provides the Cordis wiring. The suite named test:e2e drives apply() against a mock DSH pipeline. These are simulated integration tests; they do not start a real DSH process or verify its approval UI.
test:package separately builds the release, packs and installs the tarball into a temporary directory, and imports its entry in a fresh Node process. This verifies the published module layout, not full DSH behavior.
npm install
npm run typecheck # tsc --noEmit (strict)
npm test # unit + e2e
npm run test:coverage
npm run test:package # pack, install and load the built module
npm run build # tsc → lib/
MIT
FAQs
Declarative tool fencing for DeepSeek Harness: allow/deny/ask rules over tool invocations with argument globs, wired to the native approval flow, with an audit trail.
The npm package dsh-fence receives a total of 2 weekly downloads. As such, dsh-fence popularity was classified as not popular.
We found that dsh-fence demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.