Files
Nexus/docs/reports/2026-06-06-external-hardening-deploy-verification.md
T
Nexus Agent 72d82d737b fix(security): BL-07 WS 403 澄清与 code-review 跟进加固
外网无 token WebSocket 的 HTTP 403 为应用层拒绝而非反代故障;边端 agent
在中心 401 时停止心跳重试;install 锁定路由级 404 且归档失败 fail-closed。
同步安全规范与 BL-06 一致,门控 7/7 PASS。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 12:12:49 +08:00

2.2 KiB
Raw Blame History

外网加固部署与生产验证(2026-06-06)

Git 推送

状态
Commit e5e2582fix(security): 外网攻击面加固 BL-0105
远程 http://66.154.115.8:3000/admin/Nexus.git main
Push 722917b..e5e2582

生产部署

状态
方式 ssh -i nz-admin.pem azureuser@20.24.218.235sudo nx update
版本 e5e2582 fix(security): 外网攻击面加固 BL-0105
容器 nexus-prod-nexus-1 重建 healthy
/health ok

生产探测(部署后 — 2026-06-06

https://api.synaglobal.vip

探测项 结果 判定
GET /health/detail 401 BL-02
GET /openapi.json /docs /redoc 404 BL-04
GET /api/install/status 404
GET /api/install/env-check 404 BL-05
POST /api/install/lock 404 BL-05
POST /api/settings/bing-wallpapers/sync 401 BL-03
GET/POST /api/servers/ 401
Agent 假 Key 401

备注POST /api/install/init-db 等若 body 不满足 PydanticFastAPI 在 handler 前返回 422(非 403 指纹);带合法 body 的锁定请求为 404。可接受,后续可用 router 级 Depends 提前 404。

WebSocketBL-07 已澄清)

场景 结果 说明
外网无 token / 假 token HTTP 403 Starlette 在 accept()close(4001/4401) 时,黑盒常见 HTTP 403非反代故障
直连 ws://127.0.0.1:8600/ws/alerts 无 token HTTP 403 与经 HTTPS 一致,排除仅反代问题
1Panel root.conf Upgrade / Connection 全站反代至 8600,配置正常
登录后 wss://.../ws/alerts?token=<JWT> 连接成功 2026-06-06 生产验证
登录后 wss://.../ws/sync?token=<JWT> 连接成功 同上

结论BL-07 标为接受(与 risk-acceptance ADR-011 一致);外网探测脚本以「无 token 拒绝连接」为 PASS,不要求 HTTP 层可见 4001/4401。

本地测试(推送前已通过)

pytest tests/test_install_locked_404.py tests/test_external_attack_surface_hardening.py -q
# 12 passed