id7869/dsh-security

Plugin插件 Native原生 ⭐ 2 MIT Approval & Security审批与安全

在 DeepSeek Harness (DSH) 内等价重建 OpenAI codex-security 安全审计能力的原生插件

Project Overview项目介绍

dsh-security is a purpose-built plugin for DeepSeek Harness that re-implements the full security audit workflow of OpenAI’s codex-security, matching its methodology exactly without porting any original code. It is distributed as a standalone DSH bundle of skills and workflows, and does not function as an independent CLI tool or CI pipeline. To install it, you can clone the GitHub repository and link it to your DSH profile via the DSH CLI, or manually add a link entry to your profile’s package.json if the CLI is unavailable. It requires DSH v0.1.5-rc.1 or newer and Node.js 22 or newer, and has no external peer dependencies, so you do not need to install a separate node_modules folder for the plugin.

The default workflow follows the discover-validate-report sequence, but users can opt to enable the full patch and verify-fix cycle for detected vulnerabilities. Unlike the original codex-security, this implementation removes vector pre-filtering, and instead relies on finding identity fingerprints and local JSONL history to deduplicate candidates. It uses a two-stage review process with the same DSH model: first a coarse pass to separate identical and distinct findings, then a deeper review to merge and canonicalize confirmed issues. This plugin is intended for developers who need to run full local security audits on their own code repositories directly within DSH.

All scanning logic uses only DSH’s native model and built-in capabilities, so there is no dependency on external embedding services, OpenAI API keys, Python runtime, or Docker containers. All audit results are persisted only to local JSONL files stored in the plugin’s state directory, and no external database like SQLite is required. The plugin is released under the permissive MIT open source license, so it is free to use, modify, and distribute. It has a few known limitations: patch risk assessment is not implemented, security policy uses a static pre-defined file, CSV export is not supported, and fingerprint and finding ID algorithms differ from the original codex-security, so results cannot be directly interchanged.

这是一款专为 DeepSeek Harness (DSH) 开发的原生安全审计插件,在 DSH 内等价重建了 OpenAI codex-security 的「发现→验证→报告」完整安全审计能力,仅借鉴方法论,不移植原有代码。插件形态为独立的 DSH 技能 + 工作流包,并非独立 CLI 或 CI 工具,要求 DSH 版本不低于 0.1.5-rc.1,Node.js 版本不低于 22。核心能力默认走发现→验证→报告流程,也支持可选的漏洞修复与修复后复验。

它去掉了原方案的向量预筛步骤,候选漏洞通过漏洞身份指纹和本地 JSONL 历史记录去重,采用同模型两阶段评审机制,先粗筛区分相同/不同漏洞,再深度确认合并规范项。插件支持全仓库标准扫描、diff 扫描(针对提交/PR/分支变更)、深度扫描、威胁建模、漏洞修复、已有告警入库、漏洞跟踪、报告撰写和安全加固建议等全流程能力,适合开发人员对本地代码仓库开展完整的安全审计工作。

插件严格仅使用 DSH 当前自带的模型和原生能力,不依赖额外的 embedding 服务、OpenAI 密钥、Python 环境或 Docker,所有审计结果仅持久化保存在本地的 JSONL 文件中,不需要 SQLite 等数据库。它采用 MIT 开源许可证,完全免费使用,目前已知能力缺口为未实现补丁风险评估功能,安全策略使用静态文件预定义,不支持 CSV 导出,指纹算法和原方案不同,语义一致但无法互认。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:id7869/dsh-security

把 id7869/dsh-security 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-security

在 DeepSeek Harness (DSH) 内等价重建 OpenAI codex-security 的「发现 → 验证 → 报告」安全审计能力,只借鉴其方法论、不移植其代码。

  • 形态:独立 DSH 插件(skills + workflow),不是独立 CLI/CI。
  • 主能力线:发现 → 验证 → 报告(report-only 默认;可选 patch/verify-fix 修复复验)。
  • 去重:砍掉向量预筛,候选来自 finding 身份指纹 + 本地 JSONL 历史,同模型两阶段评审(粗筛 SAME/DISTINCT → 深度确认 canonical+merged)。
  • 模型/依赖:严格只用 DSH 当前模型 + 原生能力(无 embedding / OpenAI key / Python / Docker)。
  • 持久化:仅本地 JSONL 文件(state/ 下),无 SQLite、无 Mnemon。

v4 优化记录

  • 指纹:djb2(32bit, 含 title+line) → FNV-1a 64(category|file|context),行号/标题扰动不影响 id。
  • 契约:新增确定性生成(workflow/scan.js 内纯函数)+ seal 阶段校验/哈希/scan-manifest.json + coverage.json。
  • 落库:findings.jsonl 改为「同 id 覆盖、唯一 id 重写」,新增 findings-index.jsonl,历史召回有界(historyLimit)。
  • 新增 diff 扫描(workflow/diff.js + diff-inventory/security-diff-scan)。
  • 新增 deep reducer(reductions.json)、track(track.js)、writeup、propose-hardening、security-policy.md。
  • 新增纯 JS SHA-256、coverage.snapshotDigest 与 SARIF CWE/security-severity/relationships,seal 阶段改为「按预期哈希校验」。
  • 打包:修复 package.json files(workflow、cordis.patch.yml)。
  • 防护:path 白名单 + 不可信数据只读约定。

目录结构

dsh-security/
  package.json             # dsh.bundle.patch → cordis.patch.yml
  cordis.patch.yml         # insert 自身到 profile 合成树
  lib/index.js             # bundled skill provider(注册阶段 skill + 入口 skill)
  skills/                  # 各阶段 DSH skill(SKILL.md)
    inventory/             # 代码盘点
    threat-model/          # 威胁建模
    discover/              # 假设 → 候选 finding
    validate/              # 独立复核 → disposition
    dedupe/                # 去重:指纹+历史召回 → 两阶段评审 → 传递闭包
    severity/              # rubric 重分级(可选)
    report/                # 逐字写入 findings.json / report.md / SARIF / coverage.json
    seal/                  # 校验产物 + 哈希 + scan-manifest.json + JSONL 落库
    diff-inventory/        # diff 扫描:变更文件盘点
    security-diff-scan/    # diff 扫描入口
    track/                 # 跟踪 finding 到工单/导出
    writeup/               # 漏洞报告撰写
    propose-hardening/     # 安全加固建议
    fix/                   # 修复(patch,可写源码)
    verify-fix/            # 修复复验(独立读码,fixed/not_fixed/regressed)
    triage-finding/        # 已有 finding 独立复核入库
    run/                   # 入口 skill(驱动 workflow 脚本)
  workflow/scan.js         # 扫描编排(原生 workflow 工具执行)
  workflow/diff.js         # diff 扫描编排
  workflow/fix.js         # 修复编排(patch → verify-fix)
  workflow/triage.js       # 已有 finding 入库编排
  workflow/track.js        # 跟踪编排(issue 创建 / export-track)
  schema/finding.schema.json
  schema/coverage.schema.json
  rubric/severity-policy.md
  rubric/security-policy.md
  report/report.template.md
  examples/fixture/        # 合成测试靶(含故意埋入的漏洞,仅供自测)
  state/                   # 本地 JSONL workbench(运行时生成)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-attention 下一个 Next dsh-approval-hotkeys →