chendengyuanxm/dsh-plugin-security-audit ↗★ 0
dsh-plugin-security-audit
Static security audit for dynamic Cordis plugins in DeepSeek Harness (DSH): rule-based source scanning, risk reports injected into tool results, and user-approval escalation before activating high-risk plugin packages.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chendengyuanxm/dsh-plugin-security-audit说明文档
阅读完整 README ↗dsh-plugin-security-audit
Static security audit for dynamic Cordis plugins in DeepSeek Harness (DSH).
What it does
Dynamic Cordis plugins defined in a DSH session run plain JavaScript with
access to real Host services — files, shell, sessions, credentials. The
sandbox restricts accidental misuse; it is not a security boundary against
malicious code. This plugin adds a deterministic, zero-token static audit
layer over every cordis_define / cordis_run call in the session:
- Scan on define — every
cordis_define'scode.host/code.clientsource is scanned by a 16-rule engine before the package is minted. - Gate on activate — a
cordis_runfor a package withcriticalorhighfindings is escalated to a user approval ({kind:'ask'}) whose reason carries the top findings. Clean and low-risk packages run normally. - Report in the conversation — a compact risk report is appended beside
every
cordis_define/cordis_runresult as anadditionalContextsnotice, so both the model and the user see it in the tool-result stream. - Fail-open by design — any internal scan error is logged and the audited call proceeds untouched. The audit layer itself is never a failure point for the harness.
Install
Requires DSH with the dsh plugin command (v0.1.0-rc.6+).
# from npm (once published)
dsh plugin --profile web add dsh-plugin-security-audit
# from GitHub
dsh plugin --profile web add github:/dsh-plugin-security-audit
Restart the profile (dsh web) afterwards; bundle layers take effect on
boot. Verify the row composed:
dsh --profile web --dump-config | grep plugin-security-audit
To use it in an agent preset instead, copy into and select the preset when starting a session.