D
dsh-code-scan
v0.1.0 · 0 天前发布
DeepSeek Harness 插件:为 Agent 增加 code_scan 工具,用 semgrep 扫描代码并输出按文件/行号/严重级别分组的中文报告
README
dsh-code-scan
给 DeepSeek Harness(DSH)的 Agent 增加 code_scan 工具:对指定目录运行 semgrep 代码安全扫描,输出按文件、行号、严重级别分组的中文 Markdown 报告。
功能
code_scan,传入目录路径即可扫描。安装前提
本机需安装 semgrep,并保证 semgrep 命令在 PATH 上。Windows 建议用独立虚拟环境安装,避免污染其他 Python 环境:
powershell
python -m venv C:\Users\<你>\semgrep-venv
C:\Users\<你>\semgrep-venv\Scripts\pip install semgrep
把 C:\Users\<你>\semgrep-venv\Scripts 加入用户 PATH
安装插件
sh
dsh plugin --profile web add dsh-code-scan
安装完成后重启 dsh web 生效。
使用
在 DSH 对话中让 Agent 扫描某个目录,例如:
用 code_scan 工具扫描 C:\path\to\your\project
报告示例:
```markdown
semgrep 扫描报告
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-code-scan
- Repo
- git+https://github.com/xiaohuang-zaianlian/dsh-code-scan.git
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}