joy-cli/docs/ops/manhuang-oss-path.md
feibisi 2c6281d041 feat(manhuang): supply-chain dashboard, probes, and side-cache data
Expand manhuang collect/UI (tabs, markets, guishi/quote probes), add
configs and launchd helpers, ops handbooks, and scripts for channel
validation and price/threat enrichment. Keys stay in keys.env.example only.
2026-07-13 02:08:29 +08:00

122 lines
6.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 蛮荒 · 开源路线(默认)
> 原则:**不依赖商业 SaaS 账号/API key 作主路径**。
> 账号/key 会过期、限流、改条款——当辅线即可。
> 主路径 = 公开下载源 + 自托管 + 本地 CLI。
> 总手册:[manhuang-handbook.md](./manhuang-handbook.md) · 自托管选型:[manhuang-selfhost-catalog.md](./manhuang-selfhost-catalog.md)
## 架构
```
┌─ 公开零 key 源cron 6h─────────────────────────────┐
│ CISA KEV · IPsum · OpenPhish · blocklist.de │
│ URLhaus CSV · Feodo CSV · SSLBL · MITRE ATT&CK STIX │
│ → scout:data/manhuang/feeds/open/ + open-summary.json│
│ → enrich-open-hits.py对撞自有域名 / 技术栈 → hits │
└───────────────────────────┬───────────────────────────┘
┌─ 自托管 ──────────────────────────────────────────────┐
│ Miniflux :8080 ← 公开 RSSCISA/MSRC/SANS/PD/HN…
│ Tor · resource-pool · scout-intel.duckdb │
│ holehe/maigret 本地批跑 │
└───────────────────────────┬───────────────────────────┘
┌─ Mac live-pulse + 动作层 ─────────────────────────────┐
│ 主actions要你管的事= hits + 密令补货 + 基建 │
│ 辅open-summary 信号 + 栈相关 KEV + crt.sh CT │
│ 关OTX/urlscan/ThreatFox APIMANHUANG_ENABLE_…=1
│ UIhero/总览/帮派/密令优先动作;源条数表默认折叠 │
└───────────────────────────────────────────────────────┘
┌─ 密令闭环(凭证供应链)──────────────────────────────┐
│ 平台 × 准入(access) × 获取(acquire) ×× 注册机 │
│ → miling.capabilities + miling.actions │
│ 接口 tab = 消费侧;黑市 tab = 采购渠道观察 │
│ 帮派/游侠 = 用这些能力干活的域(威胁 / 灰产) │
└───────────────────────────────────────────────────────┘
```
## 已落地scout
| 组件 | 路径/命令 | 周期 |
|------|-----------|------|
| 公开源拉取 | `~/scripts/manhuang/fetch-open-feeds.sh` | cron `20 */6` |
| **比价探针(本地缓存)** | `joy-cli/scripts/manhuang/run-quote-probe.sh``~/.cache/manhuang/quotes/ai-accounts.json` | launchd `com.feibisi.manhuang-quotes` 每 4h 轮询 |
| **命中对撞** | `~/scripts/manhuang/enrich-open-hits.py` | 接在 open-feeds 末尾 |
| 摘要 | `~/data/manhuang/feeds/open-summary.json`(含 `hits`/`actions` | 同上 |
| RSS 播种 | `~/scripts/manhuang/miniflux-seed-rss.py` | 按需 |
| Miniflux | `:8080` + `~/data/manhuang/miniflux.auth` | 常驻 |
| 批跑 | `social-batch.py` | 按需 |
### 命中契约(有用的结果,不是干条数)
| 字段 | 含义 | 下一步示例 |
|------|------|------------|
| `hits.brand_ioc` | 公开威胁源出现**自有域名** URL | 核验钓鱼/挂马 |
| `hits.lookalike` | 主机名含品牌 token 的仿冒 | 登记/投诉 |
| `hits.kev_stack` | CISA KEV ∩ 自有技术栈关键词 | 对照版本 → 补丁或忽略 |
| `hits.cc_history` | 自有域 Common Crawl 样本 | 暴露面基线 |
| `actions[]` | `title` + **`next`** 可执行动作 | 面板主视野 |
### 实测规模2026-07-11 晚扩展后)
| 源 | 量级 |
|----|------|
| 公开源 ok | **23/23** |
| CISA KEV | ~1637 |
| IPsum | ~11 万 IP |
| OpenPhish | ~300 URL |
| FireHOL abusers | ~14 万 |
| DigitalSide urls/ips | ~3.7 万 / ~2.1 万GitHub raw |
| Common Crawl | collinfo + 自有域 CDX 样本CC-MAIN-2026-25 |
| Miniflux 订阅 | **28**(中文安全 Seebug/4hou + 供应链 Snyk/OSV/WP/语言生态) |
## 故意不做的(主路径)
- abuse.ch **API Auth-Key**CSV 公开下载已够用)
- OTX / urlscan 注册 key
- HIBP / Censys / Shodan 付费或注册制(可进 resource-pool 台账,不进 live 主信号)
商业 API 仅 opt-in`MANHUANG_ENABLE_VENDOR_API=1`
## 部署平面feibisi 2026-07-11
| 类型 | 节点 |
|------|------|
| **Docker / 长期数据·API 服务** | **ai-team** `10.211.55.107` |
| 轻量 cron 拉公开文件、本地 CLI | scout |
| 面板 | Mac joy-cli |
栈文档linuxjoy 仓库):`docs/ops/manhuang-ai-team-stack.md` · compose `configs/manhuang/ai-team-stack/`
## 下一阶自托管候选
| 优先级 | 项目 | 节点 | 用途 |
|--------|------|------|------|
| P1 | **RSSHub + Redis** | **ai-team** | 无官方 RSS → 自托管 |
| P1 | Miniflux 订 ai-team RSSHub | scout | 社区 tab |
| P1 | 公开源扩类 | scout cron | CC / Wayback |
| P2 | ChangeDetection.io | **ai-team** | 页面变更 |
| P3 | MISP / OpenCTI | **ai-team** | 正式 TIP |
## 脚本入口
```bash
# scout
bash ~/scripts/manhuang/fetch-open-feeds.sh # 末尾自动 enrich-open-hits
python3 ~/scripts/manhuang/enrich-open-hits.py # 仅重算 hits/actions
python3 ~/scripts/manhuang/miniflux-seed-rss.py
python3 ~/scripts/manhuang/social-batch.py --dry-run
# Mac 面板
# 开源模式默认;强制刷新 open-summary
scp scout:data/manhuang/feeds/open-summary.json ~/.cache/manhuang/feeds/
rm -f ~/.cache/manhuang/live-pulse/bundle.json
# 浏览器硬刷新 http://localhost:8899 蛮荒 tab → 先看「要你管的事」
```
## 相关文档
- [manhuang-data-sources.md](./manhuang-data-sources.md) — 按标签契约
- [manhuang-selfhost-catalog.md](./manhuang-selfhost-catalog.md) — 候选目录
- [joy-manhuang.md](./joy-manhuang.md) — 面板结构