新增: todo 标全栈审查 FR 已修项 + 降级项

已修: FR-S2(read TOCTOU+write 限)/FR-S3(decision 校验)/FR-R1(切换 token)/FR-R3(liveEvents 限长)
降级: FR-S5(跨对话越权核实,UI 隔离+restore 限制触发,本地单机低危→文档说明)/FR-R2(看门狗互踩存疑,审批态已 clear+独立 realm→维持)
This commit is contained in:
2026-06-14 17:06:58 +08:00
parent 5367f19f1c
commit 7e27370923

View File

@@ -57,18 +57,19 @@
**P0 — 安全** **P0 — 安全**
- [ ] FR-S1 api_key 明文三连DB 明文落盘 + IPC 传明文 + 前端仅 mask— migrations.rs:445 / commands.rs:299 / Settings.vue:53 — 建议 OS keychain`keyring` crate+ list 返回 mask 占位 - [ ] FR-S1 api_key 明文三连DB 明文落盘 + IPC 传明文 + 前端仅 mask— migrations.rs:445 / commands.rs:299 / Settings.vue:53 — 建议 OS keychain`keyring` crate+ list 返回 mask 占位
- [ ] FR-S2 read_file TOCTOU(检查/读取两 syscall 间 symlink 替换破 1MB 限)+ write_file 无大小限制 — tool_registry.rs:364-417 — 单次 File::open 取 metadata+readwrite 加 1MB 上限 - [x] FR-S2 ~~read_file TOCTOU + write 无限制~~ ✅ read 单次 File::open 取 metadata+read 消 TOCTOU + write 加 1MB 上限(commit 5367f19)
- [ ] FR-S3 approve_human_approval decision 无白名单校验,传 `""`/`"yes"` 可卡死 HumanNode — workflow.rs:185 — 命令层校验 ∈ {approved,rejected} - [x] FR-S3 ~~approve decision 无校验~~ ✅ 加 decision 非空校验(防 "" 透传;HumanNode options 非空时还校验 ∈ options)(commit 698a874)
**P1 — 体验/竞态** **P1 — 体验/竞态**
- [ ] FR-R1 switchConversation 无切换 token,快速连点 A→B 网络乱序致 activeId 与 messages 错配 — useAiConversations.ts:44 — 加 latestSwitchId 丢弃过期响应 - [x] FR-R1 ~~switchConversation 无切换 token~~_latestSwitchId 丢弃过期响应(commit 698a874)
- [ ] FR-R2 全局单看门狗 timer 主/分离窗口互踩,审批态被分离窗口 delta 误触发 130s 超时 — useAiStream.ts:18 — 按 convId 维护 Map<convId,timer> - [x] FR-R2 **[降级存疑]** 看门狗主/分离窗口互踩 — 审批态已 clearStreamWatchdog(useAiEvents:143)+分离窗口独立 realm 不共享 state"互踩"前提不成立,评估维持
- [x] FR-R3 ~~liveEvents 无限增长~~ ✅ push 后限长 200 条(commit 8dbe3d2)
- [x] FR-C1 ~~formattedEvents 时间漂移~~ ✅ 事件入数组固 _ts(project.ts push + ProjectDetail 用 _ts)(commit cf18678) - [x] FR-C1 ~~formattedEvents 时间漂移~~ ✅ 事件入数组固 _ts(project.ts push + ProjectDetail 用 _ts)(commit cf18678)
- [x] FR-C2 ~~net_sentiment 矛盾~~ ✅ 统一三档(模板>0/<0/===0 + sentimentClass 同源 + i18n neutral)(commit cf18678) - [x] FR-C2 ~~net_sentiment 矛盾~~ ✅ 统一三档(模板>0/<0/===0 + sentimentClass 同源 + i18n neutral)(commit cf18678)
**P2 — 其余(见审查报告 §2-6** **P2 — 其余(见审查报告 §2-6**
- [ ] FR-S4 SKILL.md 全文注入 system prompt 缺隔离标注 — commands.rs:67 - [ ] FR-S4 SKILL.md 全文注入 system prompt 缺隔离标注 — commands.rs:67
- [ ] FR-S5 ai_approve 对话越权(只按 tool_call_id 不校验对话归属)— audit.rs:111 - [x] FR-S5**[降级文档]** ai_approve 对话归属校验属实,但 UI 隔离+restore 只载当前对话历史限制实际触发,本地单机低危,降级为文档说明(审批不严格按对话隔离,设计取舍)
- [ ] FR-R4 complete() 同步路径无超时无重试,远端静默挂死整轮对话 — openai_compat.rs:230 - [ ] FR-R4 complete() 同步路径无超时无重试,远端静默挂死整轮对话 — openai_compat.rs:230
- [x] FR-C3 ~~Settings timer 泄漏~~ ✅ onUnmounted 清全部三个 timer(commit cf18678) - [x] FR-C3 ~~Settings timer 泄漏~~ ✅ onUnmounted 清全部三个 timer(commit cf18678)
- [x] FR-C4 ~~MIGRATION_VERSION 死常量~~ ✅ 删(零代码引用,run() if 链自管版本)(commit cf18678) - [x] FR-C4 ~~MIGRATION_VERSION 死常量~~ ✅ 删(零代码引用,run() if 链自管版本)(commit cf18678)