中风险
工作流会将文档内容和编辑权授予指定邮箱
原文依据:3 处发现了什么
共享步骤直接为邮箱创建 `writer` 权限。若模板副本包含未清除的机密内容,或邮箱被错误替换、拼写错误或由不可信输入提供,外部人员将同时获得内容访问权和修改权。
为什么需要注意
错误收件人可能读取、复制、篡改或删除其可编辑的文档内容;共享范围并非只读。
这段代码的正常用途
该步骤确实会给指定邮箱授予文档编辑权,但这是技能名称、简介和工作流明确声明的核心用途,而不是隐藏的数据披露。源码使用示例地址 `team@company.com` 和占位符文档 ID;没有证据表明邮箱会自动取自不可信输入,也没有证据表明模板含有机密内容。用户授权执行前仍应确认收件地址、模板内容及是否确实需要 `writer` 权限。
这项判断针对展示的代码和适用条件,不表示风险已经实际发生。1. Copy the template: `gws drive files copy --params '{"fileId": "TEMPLATE_DOC_ID"}' --json '{"name": "Project Brief - Q2 Launch"}'`2. Get the new doc ID from the response查看另外 2 个位置
Launch the new feature by end of Q2.'`4. Share with team: `gws drive permissions create --params '{"fileId": "NEW_DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "team@company.com"}'`name: recipe-create-doc-from-templatedescription: "Copy a Google Docs template, fill in content, and share with collaborators."metadata: