title, date, module, problem_type, severity, symptoms, root_cause, resolution_type, status, confidence, tags, related_patterns
| title |
date |
module |
problem_type |
severity |
symptoms |
root_cause |
resolution_type |
status |
confidence |
tags |
related_patterns |
| 协作者列表默认暴露邮箱,需最小化返回字段 |
2026-02-15 |
product-collaborator |
security_issue |
high |
| 协作者 GET 对有查看权限用户默认返回创建者与协作者邮箱 |
| 造成组织敏感信息过度暴露 |
|
数据最小化策略缺失,读取权限与敏感字段权限未分离 |
code_fix |
active |
high |
| security |
| privacy |
| collaborators |
| pii |
|
|
现象与影响
即使用户仅具备产品可见权限,也能读取所有协作者邮箱,扩大了员工账号信息暴露面。
修复动作
- 保留
canViewProduct 作为协作者列表读取前置条件。
- 新增
canManage 判定,仅当通过 canManageCollaborators 时返回邮箱字段。
- 默认返回中将创建者与协作者
email 置为 null,满足“最小必要信息”原则。
验证
npm run type-check -- --pretty false 通过
npm test -- tests/lib/cad-panel-linking.test.ts --runInBand 通过
npm test -- tests/api/auth-me.test.ts --runInBand 通过
预防策略
- API 设计区分“可查看资源”与“可查看敏感字段”两层权限。
- 新增返回字段时默认走最小化策略,敏感字段须显式授权后释放。