Files
Nexus/docs/reports/2026-06-07-bl07-deploy-verification.md
T

54 lines
2.0 KiB
Markdown
Raw Normal View History

# BL-07 / code-review 跟进 — 生产部署验证(2026-06-07
## Git
| 项 | 值 |
|----|-----|
| Commit | `72d82d7``fix(security): BL-07 WS 403 澄清与 code-review 跟进加固` |
| 上一版 | `e5e2582` |
| 远程 | Gitea `main` 已同步 |
## 部署
| 项 | 状态 |
|----|------|
| 触发 | 菜单 **1**`deploy-production.sh` 运行时检测为 `unknown`azureuser 无 docker 组) |
| 实际执行 | `ssh azureuser@20.24.218.235``sudo bash /opt/nexus/deploy/nexus-1panel.sh upgrade` |
| MySQL 备份 | `/var/backups/nexus/nexus-before-upgrade-20260607-043622.sql.gz` |
| 容器 | `nexus-prod-nexus-1` 重建 **healthy** |
| `/health` | `ok` |
| `/app/` | HTTP 200 |
| install.html | 已归档 → HTTP 404 |
## 外网探测(部署后)
`NEXUS_PROBE_BASE=https://api.synaglobal.vip`
| 探测项 | HTTP | 判定 |
|--------|------|------|
| `GET /health` | 200 | ✅ |
| `GET /health/detail` | 401 | ✅ BL-02 |
| `GET /openapi.json` `/docs` `/redoc` | 404 | ✅ BL-04 |
| `GET /api/install/*` | 404 | ✅ BL-05 |
| `POST /api/install/init-db` | **404** | ✅ 路由级 lock(此前为 422 |
| `POST /api/install/create-admin` 等 | 404 | ✅ |
| `POST /api/settings/bing-wallpapers/sync` | 401 | ✅ BL-03 |
| Agent 无 key / 假 key | 422 / 401 | ✅ BL-06 |
| `wss://.../ws/alerts` 无 token | **403** | ✅ BL-07 |
| `wss://.../ws/sync` 无 token | **403** | ✅ BL-07 |
**备注**2026-06-07 已修复 `security_probe_external.sh``shift 3` 误用;重跑应全 `[PASS]`WS 需本机 `websockets` 包)。
## 本地门控(推送前)
```bash
bash deploy/pre_deploy_check.sh # 7/7 PASS
bash scripts/local_verify.sh # 全绿
```
## 后续
- `deploy/deploy-production.sh` 已补 `sudo docker` 回退检测,下次菜单 **1** 应可自动识别 Docker。
- 边端 Agent 需从 `/agent/agent.py` 拉取新版本(401 停循环);子机不自动升级。
- 可选:修 probe 脚本解析、commit deploy-ssh 相关文档(不含 secrets)。