
dongsheng123132/dsh-policy-drift-proof
30最近提交 2026年8月14日
dsh-policy-drift-proof DSH 插件
该插件通过比较基线快照与观测快照,提供策略或配置漂移的证据。它不强制执行工具调用、批准操作或修复配置。证据模型使用 SHA-256 摘要和修订版追踪,将漂移分类为弱化、收紧、精确或未分类。
如何安装 dsh-policy-drift-proof DSH 插件
dsh plugin --profile policy-proof add github:dongsheng123132/dsh-policy-drift-proof#<commit>来源命令需要人工核对。复制不会执行命令。
dsh-policy-drift-proof DSH 插件数据来源
dsh-policy-drift-proof DSH 插件快照日期:2026年8月16日
discovered
dsh-policy-drift-proof DSH 插件能做什么
- 通过 SHA-256 摘要和修订版固定基线快照和观测快照。
- 支持漂移规则:ordered-not-weaker、set-no-additions、exact。
- 仅生成包含路径、分类和 SHA-256 摘要的报告(不包含策略值)。
- 拒绝涉密字段、原始输出字段、绝对/转义路径、符号链接、超大输入和过度结构。
- 验证器不执行网络调用或子进程,仅写入一个内容寻址的 JSON 报告。
dsh-policy-drift-proof DSH 插件适合哪些场景
- 在 CI/CD 流水线中检测非预期的策略变更。
- 验证观测到的策略快照是否与批准的基线一致。
- 审计不同环境间的配置漂移。
- 为合规要求提供证据。
dsh-policy-drift-proof DSH 插件适合谁
- 需要在 DeepSeek Harness 中追踪策略漂移的安全工程师。
- 管理多环境策略合规性的 DevOps 团队。
dsh-policy-drift-proof DSH 插件的限制
- 仅支持 Node.js 22 或更高版本。
- 不强制执行工具调用、批准操作或修复配置;仅提供证据。
- 报告从不包含策略值,仅包含摘要和分类。
dsh-policy-drift-proof DSH 插件的仓库 README 摘录
以下文字摘自 dsh-policy-drift-proof DSH 插件的上游仓库 dongsheng123132/dsh-policy-drift-proof 的 README,版权归原作者,仅作引用。
Read-only, content-addressed policy/configuration drift evidence for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). This plugin does **not** enforce tool calls, approve actions, scan repositories, or repair configuration. `dsh-tool-policy` already provides pre-execution policy routing, while SecurStack provides security scans and policy gates. This plugin covers the missing evidence question: did the policy snapshot actually observed by an operator differ from the pinned baseline, and was the difference weakening, tightening, exact, or unclassified? ## Evidence model The explicit manifest pins a baseline and observed `policy-snapshot/v1` by SHA-256 and revision. Rules cover declared JSON Pointer roots: - `ordered-not-weaker`: enum order is restrictive to permissive; moving right fails. - `set-no-additions`: additions fail, removals are recorded as tightening. - `exact`: any change fails. - any changed covered leaf without a rule fails closed as `UNCLASSIFIED_DRIFT`. Reports include paths, classifications and SHA-256 digests only. They never include policy values. Secret-shaped fields, raw output fields, absolute/escaping paths, symlinks, oversized inputs
阅读完整 README仓库许可: MIT
dsh-policy-drift-proof DSH 插件常见问题
如何安装 dsh-policy-drift-proof?
使用 DSH 命令行:`dsh plugin --profile policy-proof add github:dongsheng123132/dsh-policy-drift-proof#<commit>`,然后运行 `dsh profile --profile policy-proof compose` 注册工具。确保你的 Node.js 版本为 22 或更高。
支持哪些漂移规则?
插件支持三种规则:`ordered-not-weaker`(枚举顺序必须从限制到宽松,向右移动失败)、`set-no-additions`(添加失败,移除记录为收紧)、`exact`(任何变更失败)。你可以在清单中定义这些规则。
这个插件会修改策略或配置吗?
不会,它是只读的。它只生成漂移证据报告,不强制执行工具调用、批准操作或修复配置。其目的是提供可验证的证据,证明策略快照与基线不同。
CLI 使用哪些退出码?
CLI 将 JSON 对象输出到标准输出。如果检测到漂移违规,退出码为 2。无效使用(例如缺少必要参数)退出码为 1。成功验证且无漂移违规时退出码为 0。
我可以在没有 DeepSeek Harness 的情况下使用这个插件吗?
该插件设计为 DSH 插件,但您也可以直接使用 CLI 运行:`node bin/dsh-policy-drift-proof.mjs inspect` 或 `verify` 并带上相应参数。不过,绑定注册和 MCP 服务器是 DeepSeek Harness 特有的。