vr-shopxo-plugin/plan.md

41 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Plan — vr-shopxo-plugin 安全评估 + 票务链路审计
> 版本v3.0 | 日期2026-05-26 | Agentcouncil/SecurityEngineer
---
## 安全评估结论Round 3 最终版)
**核心结论:支付链路安全水位中高,无 P0 漏洞。安全维度不应作为主攻方向阻塞项。**
| # | 问题 | 严重性 | 结论 |
|---|------|--------|------|
| S-1 | issueTicket() 并发竞态 | P0 建议 | 建议加唯一索引,可延后 |
| S-2 | FOR UPDATE SKIP LOCKED 概念澄清 | P2 | 概念混淆防超卖依赖ShopXO原子UPDATE已有效 |
| S-3 | getVrSecret() 硬编码 fallback | P1 | 需确认生产环境 .env 配置 |
| S-4 | $goodsId 未定义导致 ClearCache 失效 | P3 Bug | 不影响票务安全,可延后 |
| S-5 | $goods['content'] XSS管理面可控 | P3 | 管理面可控,可延后 |
---
## 安全行动项(优先级排序)
| 优先级 | 行动 | 说明 |
|--------|------|------|
| P1 | 确认生产环境 `.env` 配置 `VR_TICKET_SECRET` | 防止源码泄露后伪造票 |
| P1 | 添加唯一索引 `uk_order_seat(order_id, seat_info)` | 从根本上防止并发发票竞态 |
| P3 | 修复 `ClearCache($goodsId)` Bug | 使用 `$og['goods_id']` |
| P3 | `$goods['content']` 转义 | 防止富文本XSS |
---
## 投票
**议题:下一步主攻方向**
**投票C双线并行**Round 1/2/3/4 一致,不变)
**Round 4 核查确认**
- S-4 Bug 确认,`ClearCache($goodsId)` 应为 `ClearCache($og['goods_id'])`
- S-3 硬编码确认,生产需配置 `.env`
- S-1 幂等已有 ShopXO 保护,延后加唯一索引
- BackendArchitect P0 重分类背书:无 P0 安全漏洞