面向 DeepSeek Harness(dsh)的渗透测试模式 @CloverSecLabs
在 DeepSeek Harness 终端运行:
dsh plugin --profile web add howmp/dsh-pentest面向 DeepSeek Harness(dsh)的渗透测试模式:
在授权范围内记录目标、探索线索、验证结果、资产与漏洞,并在 Web 中以探索链路、漏洞和资产视图展示。
本目录是自包含 bundle 包(@howmp/dsh-pentest):宿主插件、Web 界面和 sqlite 后端通过包内 exports
一同分发。Release 资产可直接由 dsh plugin add 安装。
dsh plugin --profile web add https://github.com/howmp/dsh-pentest/releases/latest/download/dsh-pentest.tar.gz
dsh plugin --profile web add file:C:\path\to\dsh-pentest.tar.gz
重启 dsh 后,在新会话中选择自动注册的「渗透模式」。






src/dsh-pentest/src/spec.ts):storage domain pentest(version 2)——goals / intents /facts / findings / assets / edges 六张表。边即链路词汇:spawns(goal→intent)、yields(intent→fact)、derived_from(fact→intent)、proves(intent→finding),资产关系用 parent(asset→asset)。finding 必填reproducibleSteps(至少一条)。store.ts):节点/边 id 为 <kind>-<n>(按会话计数,goal 重置后归零)——工具返回 id 供模型tools.ts):pentest_submit(子 agent 直写指定父 intent)/ pentest_add_goal(重置整图)/ pentest_add_intent(恰好一个锚点)/pentest_add_fact / pentest_add_finding(步骤必填,可关联影响资产)/ pentest_add_asset(可选 parentId,pentest_state / pentest_graph / pentest_report。projection.ts):折叠已日志化的 pentest_* 调用为 { goal, nodes, assets, edges, counts },pentestMounted 标记单元:当该会话自身日志证明组合pentest_* 工具 / 已记录调用 / 子 agent 委派提交)时置真,供 Web 标签页判定。src/dsh-client-ui-pentest):按会话注册(当前会话或列表祖先链命中 pentest 预设名、pentest-* 复制预设名,或该会话带 pentestMounted 标记即显示;无证据的会话隐藏);四个子标签——探索链路instructions.ts):系统提示词段 pentest:protocol(order 50),沿链路推进、子 agent 通过pentest_submit 直写父 intent、资产先父后子、与用户交互一律中文。$DSH_HOME/storages/pentest-sessions.db(sqlite,经 bundle 补丁路由)。pentest_add_goal 的 authorization 参数可填写授权说明(授权对象 /pentest_add_goal。preset/pentest/ 后自改即可(工具、协议、投影都随行pentest- 前缀(如 pentest-sec)会立即显示;改成pentestMounted(会话自身日志证据)置位显示——预设名不是能力,pentest_state / pentest_report(读存储层)为准。node:sqlite,宿主运行时需 Node.js >= 22.5。dsh-pentest/ # 项目根 = bundle 包 @howmp/dsh-pentest(自带 zod/schemastery 运行时依赖,其余宿主提供)
├── package.json # bundle manifest:dsh.bundle.patch + dsh.client + exports 子路径
├── cordis.patch.yml # 补丁层:UI、sqlite 后端与 storage-domain 路由
├── lib/ # 构建产物(npm pack 的内容)
│ ├── index.js # 包入口:空 apply
│ ├── pentest.js # 宿主渗透插件:9 个 pentest_* 工具 + 协议注入 + 会话投影/挂载标记
│ ├── preset-root.js # 注册包内只读「渗透模式」预设目录(兼容 DSH rc.6)
│ ├── storage-sqlite.js # 渗透记录专用的 sqlite 后端(node:sqlite)
│ ├── ui-pentest.js # Web 插件宿主半:空 apply(0.1.1 时代的子路径行座位;bundle 已改挂包根)
│ ├── ui-pentest.client.js # Web 插件浏览器半:渗透视图标签页(4 个子标签,@xyflow/react 内联)
│ └── invariant.js # 探索图不变量伴生(与官方各包同构,生产环境不加载)
├── src/ # 源码快照(继续开发/重新构建用)
│ ├── index.ts / invariant.ts
│ ├── dsh-pentest/ # host 包源码:src/ + tests/ + tsconfig + tsdown + README
│ └── dsh-client-ui-pentest/ # client 包源码:src/client/(视图/图布局/注册)+ tests/
├── tests/bundle.spec.ts # bundle 补丁层测试
├── packages/ # 三个构建好的子包(仅作构建源保留;bundle 不再依赖它们)
│ ├── dsh-pentest/ # host 插件源码构建产物
│ ├── dsh-client-ui-pentest/ # Web 界面插件源码构建产物
│ └── dsh-storage-sqlite/ # sqlite 后端构建产物(来自 dsh 仓库,无独立源码)
├── preset/pentest/ # 「渗透模式」agent 预设(由 bundle 自动注册)
├── images/ # README 界面预览截图
└── README.md
登录后即可为该插件评分和评价。
还没有人评价这个插件,来抢个沙发吧!