T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/transfer_owner.py:76- Finding
Ownership transfers do not consistently prevent reassignment of human-owned documents
- Content
View full analysis
{args.target}") ``` Wiki transfer mode in `scripts/transfer_wiki.py:142-155`: ```python # 跳过已是目标所有者的 if current_owner == args.target: print(f"{indent} ✅ 已是目标所有者,跳过") skipped += 1 print() continue if args.list: print(f"{indent} [DRY-RUN] 将转移 -> {args.target}") transferred += 1 else: resp = transfer_owner(ftype, docs_token, args.target, args.member_type) if resp.get("code") == 0: print(f"{indent} ✅ 转移成功") transferred += 1 ``` ### Technical Analysis The Skill declares that it transfers documents created by an AI agent and automatically skips files already owned by humans. Root-directory batch mode implements a heuristic for this behavior by treating owner IDs beginning with `ou_` as human owners. That protection is not applied consistently: 1. In single-token mode, the script retrieves and displays the current owner but transfers the document without checking whether that owner is an AI identity, a permitted source owner, or a human. 2. In Wiki mode, the only ownership restriction is that a document already owned by the destination user is skipped. Any other accessible document is s ...[truncated 2959 chars]- Remediation
View remediation
