dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
English | 中文
Audit what enters your profile; arm the sessions that scan your code.
A DeepSeek Harness (DSH) security-audit plugin. Two independent layers, one package: a process-level always-on plugin gate, and an opt-in session-level “Security Audit Mode”.
This project wraps OpenAI codex-security (Apache-2.0) into a DeepSeek Harness (DSH) security-audit plugin — not an official OpenAI product and not affiliated with OpenAI (Codex / Codex Security are OpenAI trademarks; this project uses neutral naming).
Honest boundary: the gate audits plugins entering your profile; it does not police your own source code at runtime. The preset only adds capabilities when you pick it for a session. Neither layer blocks or rewrites anything by itself.
One package, two layers living at different levels of the harness:
dsh plugin add registers it permanently; every boot re-applies its patch layer.~/.dsh/.agent-presets/) — currently the only placement point DSH exposes for presets, hence the manual copy.dsh_security_* scan tools, covering whole-repo scans, diff scans, finding triage, threat models, hardening proposals and vulnerability writeups.llm service (same session model routing); no external API keys. Optional engine: cli delegates to the official scanner (its own auth).file:// and remote URLs rejected; absolute-path exposure off by default.cliCommand character whitelist with version pinning, sub-command whitelist, 5-minute foreground timeout cap.audit-baseline.json is injected into the audit prompt, suppressing previously reviewed false positives across rounds.Two steps — step 2 is optional; whether you want the in-session security scanning capability is up to you.
| Step | Required | What you get |
|---|---|---|
| 1. Mount the gate | ✅ | Auto audit of newly installed plugins, the “Settings → Security Audit” panel, on-disk reports |
| 2. Unlock Security Audit Mode | optional | 13 workflow skills + 5 dsh_security_* session tools |
Process-level protection takes effect immediately. The npm package is published, so install it by name (no clone needed):
dsh plugin --profile web add @dsh-so/dsh-code-security
For development you can also install from a local checkout (run inside the project directory):
dsh plugin --profile web add .
Requires
pnpm. Activate chain: pnpm install → the manifest recordsdsh.profile.bundles→ next boot composes the bundle layer and mounts the plugin (row iddsh-security-gate).
Place preset/ into the user preset root (source matches your install method):
# Windows — source A: local checkout
Copy-Item -Recurse .\preset "$env:USERPROFILE\.dsh\.agent-presets\dsh-security"
# source B: in-package copy after npm install
Copy-Item -Recurse "$env:USERPROFILE\.dsh\profiles\web\node_modules\@dsh-so\dsh-code-security\preset" "$env:USERPROFILE\.dsh\.agent-presets\dsh-security"
# macOS / Linux — source A
cp -R preset ~/.dsh/.agent-presets/dsh-security
# source B
cp -R ~/.dsh/profiles/web/node_modules/@dsh-so/dsh-code-security/preset ~/.dsh/.agent-presets/dsh-security
Skipping this step costs the gate nothing — add it whenever you need it.
The 5 dsh_security_* tools execute the @openai/codex-security CLI behind strict rails (literal argument quoting, workdir confinement, sub-command whitelist, timeouts).
Security Audit Mode: driving the Codex Security workflow in-session
Gate audit report summary
Finding details
The gate row ships with sensible defaults and needs no config to work. To tune it, append an id-targeted override to ~/.dsh/profiles/web/cordis.patch.yml (whole-row replacement of config — list every field; takes effect after a DSH restart):
# ~/.dsh/profiles/web/cordis.patch.yml
- id: dsh-security-gate
config:
autoScan: true # process-level auto audit (default true)
scanOnBoot: false # scan on boot (default false)
engine: llm # llm (default, no auth) or cli (needs OpenAI auth)
intervalMs: 60000 # re-audit sweep interval
progressLogMs: 15000 # console scan heartbeat; 0 = silent (default)
Common fields: engine, provider / model, intervalMs, ignorePrefixes, cliCommand, maxHarvestChars, maxParallel, scanRateLimit. Full table: docs/gate.en.md.
progressLogMs controls the console heartbeat printed while an LLM scan is streaming ([dsh-security-gate] scan <key> in progress: 45s, …). It is off by default so a busy console stays readable; set it to a millisecond value (e.g. 15000) to log a liveness line roughly that often. Scan start / completion / failure lines are always printed regardless.
⚠️
engine: clirequires an explicitsandboxMode(on Windows that isdanger-full-access, i.e. unrestricted execution — the gate prints a strong warning on every scan). Use it only when you explicitly trust both the CLI package and the audited plugin.
On the preset side (skills, tool whitelist) see agent.cordis.yml; the CLI tool excludes login / export by default and can be extended with cliAllowedVerbs.
cliCommand whitelist with version pinning, foreground timeout cap.audit-baseline.json is injected into the audit prompt to avoid repeating false positives.Full analysis: docs/gate.en.md (中文版: docs/gate.zh.md).
Related projects:
dsh-code-security/
├── index.js # gate host plugin (zero-dep cordis plugin, row id: dsh-security-gate)
├── client.js # Settings “Security Audit” panel (bilingual)
├── audit-baseline.json # triage memory across audit rounds
├── cordis.patch.yml # bundle patch (auto-mounted by dsh plugin add)
├── preset/ # the Security-Audit-Mode preset tree
│ ├── agent.cordis.yml # preset composition (standard + dsh-security-tools row)
│ ├── preset.yml # preset metadata
│ ├── skills/dsh-security/ # DSH adapter entry skill
│ ├── bundled/ # upstream payload copy (107 files: skills / references / schemas / scripts / mcp)
│ └── plugins/dsh-security/index.js # 5 dsh_security_* tools
├── docs/ # gate.en/zh.md detailed gate docs
├── assets/ # README images
└── README.md / README.en.md
A single npm package since 0.2.0: one artifact carries the gate host plugin, the settings panel, the Security-Audit-Mode preset and the full bundled payload. package.json declares dsh.bundle.patch, so dsh plugin add appends it to the profile bundles layer stack automatically; the preset still goes into ~/.dsh/.agent-presets/ per platform convention (see installation step 2).
# Windows
dsh plugin --profile web remove @dsh-so/dsh-code-security
Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\.agent-presets\dsh-security"
# macOS / Linux
dsh plugin --profile web remove @dsh-so/dsh-code-security
rm -rf ~/.dsh/.agent-presets/dsh-security
Legacy migration: the old two-package installs
dsh-security-gate/dsh-security-toolsare retired — remove them and add this package. The old state dir<DSH_HOME>/dsh-securityand old cache<DSH_HOME>/cache/dsh-code-securitycan be deleted manually.
Issues and PRs are welcome. The single source of truth for gate config fields is normalizeConfig() in index.js; behaviour changes should update docs/gate.en.md and docs/gate.zh.md too.
Release flow (single package, Apache-2.0):
npm version patch # e.g. 0.2.2 → 0.2.3, commits and tags automatically
npm publish
git push --follow-tags
preset/bundled/ content copyright OpenAI, Apache-2.0, from openai/codex-security.Codex / Codex Security are OpenAI trademarks; this project’s public name is dsh-code-security and its technical identifiers are neutral (dsh-security / dsh-security-gate), keeping upstream names only for attribution, the CLI package name (@openai/codex-security) and references inside the skills.
dsh-code-security · © 2026 dsh.so · Apache-2.0