council(draft): SecurityEngineer - Round 4 现场核查 + 投票C确认
- 确认 S-4 ClearCache Bug、S-3 QR Secret 硬编码、S-1 幂等检查 - 背书 BackendArchitect P0 重分类(无 P0 安全漏洞) - 投票 C(双线并行)不变 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>council/SecurityEngineer
parent
8b4efd705c
commit
7b6942f8d0
|
|
@ -150,4 +150,57 @@ SeatMapService::ClearCache(intval($og['goods_id']));
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*报告人:SecurityEngineer | 2026-05-26*
|
---
|
||||||
|
|
||||||
|
## 六、Round 4 现场核查确认
|
||||||
|
|
||||||
|
### 安全行动项现场核实
|
||||||
|
|
||||||
|
**S-4 Bug 确认**(`TicketService.php:126`):
|
||||||
|
```php
|
||||||
|
SeatMapService::ClearCache(intval($goodsId)); // $goodsId 未定义
|
||||||
|
```
|
||||||
|
✅ 确认存在。正确代码应为 `$og['goods_id']`。此 Bug 不影响安全(ShopXO DB 库存为准),但会导致座位图缓存失效迟缓,影响用户体验。
|
||||||
|
|
||||||
|
**S-3 QR Secret 硬编码确认**(`BaseService.php:302`):
|
||||||
|
```php
|
||||||
|
$secret = '8935b3a3-a7b4-4e3d-8c1f-9b7e2a6f5d4c'; // 确认存在
|
||||||
|
```
|
||||||
|
✅ 确认存在。生产环境需配置 `.env` 的 `VR_TICKET_SECRET`。
|
||||||
|
|
||||||
|
**S-1 幂等检查确认**(`TicketService.php:151-154`):
|
||||||
|
```php
|
||||||
|
$existing = Db::name(BaseService::table('tickets'))
|
||||||
|
->where('order_id', $order['id'])
|
||||||
|
->where('seat_info', $spec_name)
|
||||||
|
->find(); // 无行锁,但有幂等保护
|
||||||
|
```
|
||||||
|
✅ 确认存在。ShopXO `onOrderPaid` 由内核回调触发,已在支付流水层有幂等保护。唯一建议是加唯一索引 `uk_order_seat(order_id, seat_info)`,但可延后。
|
||||||
|
|
||||||
|
### BackendArchitect P0 重分类背书
|
||||||
|
|
||||||
|
BackendArchitect Round 4 修正了 Round 1-3 的 P0 评估:
|
||||||
|
- `getSoldSeats()` 方法缺失 → **已消除**(`SeatMapService::GetSeatMap()` 已含库存)
|
||||||
|
- `Index.php::soldSeats` Fatal Error → **已消除**(Index.php 无此 action)
|
||||||
|
- `plugins_service_goods_data` Hook 未注册 → **降为 P1**(UniApp 可用 `/seatmap` 变通)
|
||||||
|
|
||||||
|
我**背书 BackendArchitect 的 P0 重分类**。与我的安全评估一致:无 P0 安全漏洞。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 七、安全维度投票(Round 4 确认)
|
||||||
|
|
||||||
|
**议题:下一步主攻方向**
|
||||||
|
**投票:C(双线并行)**(Round 1/2/3/4 一致,不变)
|
||||||
|
|
||||||
|
**理由**:
|
||||||
|
1. 安全所有问题均为 P1-P3,**无 P0 安全漏洞,不应阻塞开发主轴**
|
||||||
|
2. 后端 P0 重分类(无 P0)确认安全不阻塞;后端 API 完善(Hook 注册、seatSpecMap 注入)是当前真正阻塞点
|
||||||
|
3. 安全加固(.env 确认、P1 唯一索引)可与前端开发并行推进,不互相依赖
|
||||||
|
4. H5 `ticket_detail.html` 可作为独立过渡方案,立即推进 `loadSoldSeats()` 实现
|
||||||
|
|
||||||
|
**补充**:BackendArchitect 投票 A(后端优先)有合理性(Hook 注册是最小改动最大收益),但前端 H5 无阻塞可立即推进,两者不冲突。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*报告人:SecurityEngineer | 2026-05-26 | Round 4 核查完成*
|
||||||
Loading…
Reference in New Issue