truelove-dreamer/dsh-plugin-security-audit ↗★ 0
dsh-plugin-security-audit
DeepSeek Harness plugin: run a live security health check on the deployment (credential file permissions, process-env secrets, permission/approval mode, telemetry, anonymous id, LAN exposure, sandbox backend) and get an actionable report mapping each finding to upstream discussions.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-security-audit
DeepSeek Harness 插件:对当前部署运行实时安全体检,输出 PASS/WARN/FAIL 报告。
背景
我们审计 DeepSeek Harness 0.1.0-rc.6 时发现了 2 条 critical + 17 条 major(凭据保密边界、Windows 沙箱语义、审批可被 LAN 旁路、glob/grep 绕过沙箱、匿名 ID 外发等)。这个插件把那些发现变成可重复运行的健康检查:对任意部署跑一遍,逐项给出严重级、详情,以及对应的上游讨论帖链接。
检查项
| id | 检查 | 对应发现 |
|---|---|---|
| credential_file_permissions | 凭据文件 0600(POSIX)/ACL 继承(Windows,SB3) | 讨论 962 |
| process_env_secrets | 进程环境中的 API key(C2:`/proc/ | |
| /environ` 可读) | 讨论 962 | |
| permission_mode / approval_policy | 权限模式与审批策略(danger-full-access → never) | — |
| telemetry_mode | 遥测模式(FULL 原始导出无脱敏,L3) | 讨论 962 |
| anonymous_id | .anonymous-user-id 存在性(telemetry 关闭仍外发,M14) | 讨论 952 |
| lan_exposure | webserver 绑定(0.0.0.0 → critical;trustedHosts → warn,W1/W3) | 讨论 950 |
| sandbox_backend | 当前平台的沙箱后端是否挂载 | — |
每条检查还附 recommendations(安装 search-gate / credential-guard、收紧 ACL、scrub 环境变量等可执行建议)。
安装
dsh plugin --profile web add dsh-plugin-security-audit
挂载(profile cordis.patch.yml 或 agent preset):
- id: security-audit
name: dsh-plugin-security-audit
使用
- 模型工具:
security_audit(无参数) - 斜杠命令:
/security-audit
示例输出:
# Security audit — FAIL (3/8)
critical=1 warn=2 info=0 ok=5
[CRITICAL] credential_file_permissions: "/home/alice/.dsh/.credentials.yaml" is group/other-readable (mode 644)...
ref: https://github.com/deepseek-ai/deepseek-harness/discussions/962
[WARN] process_env_secrets: API keys are present in the harness process environment (DEEPSEEK_API_KEY)...
...
Recommendations:
1. Mount dsh-plugin-search-gate to stop glob/grep reading outside the workspace (discussion 951).
2. Mount dsh-plugin-credential-guard to deny model reads of credential stores and .env (mitigates discussion 962).
...