
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@opensec/secbot
Advanced tools
安全警告:本工具仅用于获得明确授权的安全测试、研究与教学。未经授权的网络攻击、渗透、爆破或控制行为可能违法。详见 docs/SECURITY_WARNING.md。
secbot-cli 自动模式与 superhackbot 专家模式,结合规划、执行、总结链路完成安全任务。terminal-ui/(Ink TUI)、app/(Expo / React Native)与 desktop/(Tauri + Vite)工程。flowchart LR
subgraph Clients["客户端"]
tui["terminal-ui (Ink)"]
mobile["app (Expo)"]
desktop["desktop (Tauri)"]
end
tui --> api["NestJS /api/*"]
mobile --> api
desktop --> api
api --> chat["ChatModule"]
chat --> agents["AgentsModule"]
agents --> tools["ToolsModule (54 工具)"]
tools --> db["DatabaseModule (SQLite)"]
agents --> memory["MemoryModule"]
agents --> summary["SummaryAgent"]
summary --> sse["SSE 事件流"]
sse --> tui
sse --> mobile
sse --> desktop
更细的 UI 与事件流说明见 docs/UI-DESIGN-AND-INTERACTION.md,API 细节见 docs/API.md。
18+(后端与所有前端均需要)npm install -g @opensec/secbot
secbot
git clone https://github.com/iammm0/secbot.git
cd secbot
npm install
创建 .env,至少填写一组可用推理后端配置:
# 云端推理(默认推荐)
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-your-api-key
DEEPSEEK_MODEL=deepseek-reasoner
# 或改用本地 Ollama
# LLM_PROVIDER=ollama
# OLLAMA_BASE_URL=http://localhost:11434
# OLLAMA_MODEL=gemma3:1b
启动完整终端体验:
# 一键启动后端 + TUI
npm run start:stack
# 或分步启动
npm run dev # 启动后端(开发模式,热重载)
npm run start:tui # 在另一终端启动 TUI
从 Releases 下载 npm 打包产物(.tgz),解压后运行。
更详细的发布包说明见 docs/RELEASE.md。
# 开发模式(后端热重载)
npm run dev
# 生产构建
npm run build
npm start
# 终端 TUI
npm run start:tui
# 移动端
cd app && npm install && npm start
# 桌面端
cd desktop && npm install && npm run tauri dev
| 变量 | 用途 | 默认值 |
|---|---|---|
LLM_PROVIDER | 当前推理后端 | deepseek |
DEEPSEEK_API_KEY | DeepSeek API Key | 无 |
DEEPSEEK_MODEL | DeepSeek 默认模型 | deepseek-reasoner |
OLLAMA_BASE_URL | Ollama 服务地址 | http://localhost:11434 |
OLLAMA_MODEL | Ollama 默认模型 | gemma3:1b |
PORT | 后端监听端口 | 8000 |
| 命令 | 说明 |
|---|---|
/model | 选择推理后端、模型、API Key、Base URL |
/agent | 切换 secbot-cli / superhackbot |
/list-agents | 查看当前可用智能体 |
/system-info | 查看系统信息 |
/db-stats | 查看 SQLite 统计 |
secbot/
├── server/ # NestJS 后端
│ └── src/
│ ├── main.ts # 应用入口
│ ├── app.module.ts # 根模块
│ ├── common/ # 公共基础设施(LLM 抽象、过滤器、拦截器)
│ └── modules/ # 业务模块
│ ├── agents/ # 多智能体(Planner/Hackbot/Coordinator/Summary)
│ ├── chat/ # SSE 聊天接口
│ ├── tools/ # 54 个安全工具(10 大类)
│ ├── database/ # SQLite 持久化
│ ├── memory/ # 记忆子系统
│ ├── vuln-db/ # 漏洞数据库
│ ├── network/ # 网络发现与远程控制
│ ├── defense/ # 防御扫描
│ ├── sessions/ # 会话管理
│ ├── system/ # 系统信息与配置
│ ├── crawler/ # 爬虫调度
│ └── health/ # 健康检查
├── npm-bin/ # npm CLI 入口包装
│ ├── secbot.js
│ └── secbot-server.js
├── terminal-ui/ # Ink 终端前端
├── app/ # Expo / React Native 客户端
├── desktop/ # Tauri + Vite 桌面端
├── scripts/ # 启动与构建脚本
├── tools/ # 工具能力说明文档
└── docs/ # 项目文档
# 类型检查
npm run typecheck
# 代码检查
npm run lint
# 代码格式化
npm run format
# 运行测试
npm test
# 构建
npm run build
| 文档 | 说明 |
|---|---|
| docs/QUICKSTART.md | 快速启动指南 |
| docs/API.md | REST + SSE 接口说明 |
| docs/APP.md | Expo / React Native 移动端 |
| docs/LLM_PROVIDERS.md | 多厂商模型后端与配置 |
| docs/OLLAMA_SETUP.md | 本地 Ollama 配置 |
| docs/UI-DESIGN-AND-INTERACTION.md | TUI 交互设计 |
| docs/DEPLOYMENT.md | 后端部署指南 |
| docs/RELEASE.md | 发布与打包说明 |
| docs/DATABASE_GUIDE.md | SQLite 结构与操作 |
| docs/TOOL_EXTENSION.md | 工具扩展开发指南 |
欢迎提交 Issue 和 Pull Request。
git checkout -b feat/your-changegit commit -m "feat: 新增某功能"提交信息遵循 Conventional Commits 规范。
本项目使用 LICENSE 中定义的 Secbot Open Source License:
商用授权联系:wisewater5419@gmail.com
赵明俊(Zhao Mingjun)
FAQs
Secbot pure TypeScript security automation backend and CLI.
We found that @opensec/secbot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.