theoffsecgirl/bb-copilot
GitHub: theoffsecgirl/bb-copilot
一款基于大语言模型的漏洞赏金辅助工具,以结构化方式引导分析并生成报告。
Stars: 0 | Forks: 0
# bb-copilot
**AI-powered bug bounty assistant — methodology vault + guided CLI**





*by [theoffsecgirl](https://github.com/theoffsecgirl)*
```
bbcopilot ask "api.target.com uses JWT and org_id in every request"
bbcopilot plan --target api.target.com --type api
bbcopilot vuln idor --context notes.txt
bbcopilot triage --finding "IDOR on /api/v1/invoices/{id}"
bbcopilot report --finding "IDOR on /api/v1/invoices/{id}" --target api.target.com -o report.md
```
## 它做什么
- Reads your local vault (Markdown playbooks by vuln type and phase)
- Sends the right context + your input to the configured model
- Returns structured, actionable output: hypotheses → steps → evidence → impact
- Generates complete reports ready to submit to HackerOne, Bugcrowd or YesWeHack
- Saves local history of all sessions in `~/.bbcopilot/history/`
- Does NOT automate attacks. Guides your reasoning.
## 堆栈
- Python 3.12+
- [Typer](https://typer.tiangolo.com/) + [Rich](https://github.com/Textualize/rich)
- Any OpenAI-compatible LLM API: **Ollama, Groq, OpenAI, Anthropic**
- Markdown vault (local, Git-versioned)
- Local JSON history (`~/.bbcopilot/history/`)
## 安装
```
git clone https://github.com/theoffsecgirl/bb-copilot
cd bb-copilot
make setup
```
Then edit `.env` according to your chosen provider (see **LLM Providers** section).
## LLM 提供商
| Provider | Cost | Privacy | Setup |
|---|---|---|---|
| **Ollama** (default) | Free | Local — 100% private | `brew install ollama` |
| Groq | Free (limited tier) | Cloud | API key at console.groq.com |
| OpenAI | Paid | Cloud | API key at platform.openai.com |
| Anthropic | Paid | Cloud | API key at console.anthropic.com |
### Ollama(默认)
```
brew install ollama
ollama pull llama3.1 # ~4GB, one-time
ollama serve # run in background
```
`.env`:
```
OPENAI_API_KEY=ollama
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_MODEL=llama3.1
```
### Groq(免费,云端)
Note: free tier has ~6000 token context limit. Add to `.env`:
```
BBCOPILOT_MAX_CONTEXT_TOKENS=5000
```
### OpenAI
```
OPENAI_API_KEY=sk-proj-...
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o
```
## 用法
```
# 使用完整保险库作为上下文提出自由形式问题
bbcopilot ask "target has GraphQL with user_id in mutations"
# 目标的优先攻击计划
bbcopilot plan --target example.com --type web
bbcopilot plan --target api.example.com --type api
# 特定漏洞的剧本
bbcopilot vuln ssrf
bbcopilot vuln idor --context my-notes.txt
# 对发现进行分步处理并给出后续步骤
bbcopilot triage --finding "open redirect on /redirect?url="
# 生成可提交的完整报告
bbcopilot report --finding "IDOR on /api/v1/invoices/{id} exposes other users' invoices"
bbcopilot report --finding "..." --target api.example.com --context requests.txt --output report.md
# 会话历史
bbcopilot history
bbcopilot history --last 5
bbcopilot history --clear
# 列出所有可用剧本
bbcopilot vault-list
```
## 输出示例
### `bbcopilot ask`
```
$ bbcopilot ask "api.target.com uses JWT and org_id in every request"
╭─ bb-copilot ─────────────────────────────────────────────────────────╮
│ Context loaded: 8 playbooks (idor, auth, jwt, api, cors, ssrf, biz) │
╰───────────────────────────────────────────────────────────────────────╯
📌 Hypotheses (prioritized)
1. IDOR via org_id manipulation
→ Replace org_id in requests with another org's ID
→ Test: GET /api/v1/invoices?org_id=标签:AI风险缓解, Anthropic, Bugcrowd, CIS基准, DLL 劫持, HackerOne, Homebrew安装, JSON存储, LLM, LLM评估, Markdown, Ollama, OpenAI, Python, Rich, Ruby, Typer, Unmanaged PE, YesWeHack, 二进制发布, 内存规避, 大语言模型, 安全辅助, 开源工具, 无后门, 本地历史, 漏洞方法论, 环境配置, 知识库, 自动化辅助, 逆向工具, 防御加固