docs(security): 修正安全审计文档与代码不一致

- core: MQ kill/exec 实际未禁用,修正错误声明;HttpTask.cpp 行号 L53→L58
- gateway: 更新 20+ 处行号偏移(_KEYGEN/handleProxy/is_safe_target 等)
- aibox: shell=True 4处→3处,handle_connection/WebSocket 行号更新
- DEPS: WebSocketServer.cpp 已删除,fuzz 需求转移至 HttpServer_WsSession
- 加固计划: Phase 1.1 (127.0.0.1 绑定) 标记为已完成
- captcha/libhttp: 修正轻微行号偏移
This commit is contained in:
qing committed 2026-08-06 15:25:07 +00:00
1 parent 7ff73b7d07
commit 7f288f1c09
7 files changed
+61 -59

No files matched your search

@@ -78,7 +78,7 @@
### NEW-1: 验证码答案使用 random 模块生成(P2)
- **位置**: `captcha_service.py` L134-135
- **位置**: `captcha_service.py` L146
- **问题**: `generate_text()` 使用 `random.choices` 而非 `secrets` 模块生成验证码答案。`random` 模块是确定性伪随机,若攻击者能推测随机种子状态,可预测验证码答案
- **影响**: 低(Token 使用 `secrets.token_hex` 保护,攻击者需先获取有效 Token)
- **建议**: 将 `random.choices` 替换为 `secrets.SystemRandom().choices` 或逐个调用 `secrets.choice`