跳转到正文
报告库
用途分类 / 其他用途

Gws Drive Skill 安全审计

作者说它能做什么(原文)

Google Drive: Manage files, folders, and shared drives.

第三方安全检查结论

发现安全风险

已检查文件
1
发现的风险
3
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 2 项风险
中风险

缺少共享前置文件时会要求运行可写入本地文件的生成命令

原文依据:2 处
发现了什么

实时前置指令要求读取包外的 `../gws-shared/SKILL.md`;若不存在,就运行 `gws generate-skills`。所提供材料未说明该命令会创建或覆盖哪些文件,因此用户无法从本次审计确认写入范围或生成内容。

为什么需要注意

如果共享文件缺失且代理照做,本地 Skill 文件可能被创建或更新;若已安装的 `gws` 二进制或其生成内容不可信,还会把未审计指令引入后续 Drive 操作。

这段证据能说明什么

这是实时前置指令:共享文件缺失时会运行生成命令,可能写入本地文件。但材料没有给出 `gws generate-skills` 的实现、目标目录或覆盖规则,因此无法确认具体写入范围及是否会覆盖用户文件。用户可要求作者说明生成清单,并限制该命令只能写入隔离目录。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
SKILL.md:8来自说明文档打开原文件
    category: "productivity"    requires:      bins:        - gws    cliHelp: "gws drive --help"---
查看另外 1 个位置
SKILL.md:16来自说明文档打开原文件
> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.
中风险

修订版本删除方法会永久移除部分文件历史

原文依据:2 处
发现了什么

该 Skill 列出 `revisions.delete`,并明确说明它会永久删除二进制文件的版本。虽然不能删除最后一个版本,但被删的历史版本无法通过普通 Drive 恢复流程取回。

为什么需要注意

如果代理选择了错误的文件或修订 ID,图片、视频等二进制文件的历史版本可能永久丢失,削弱恢复误改或取证的能力。

文档明确提供永久删除修订版本的方法;它不会自动运行,且仅适用于 Drive 中图片、视频等二进制文件,也不能删除最后一个版本。若代理在已授权账户中调用并选错文件或版本,用户会永久失去相应历史内容。用户可禁止该方法,或要求执行前明确列出文件与修订 ID 并再次确认。

SKILL.md:111来自说明文档打开原文件
### revisions  - `delete` — Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. For more information, see [Manage file revisions](https://developers.google.com/drive/api/guides/manage-revisions).  - `get` — Gets a revision's metadata or content by ID. For more information, see [Manage file revisions](https://developers.google.com/workspace/drive/api/guides/manage-revisions).  - `list` — Lists a file's revisions. For more information, see [Manage file revisions](https://developers.google.com/workspace/drive/api/guides/manage-revisions). **Important:** The list of revisions returned by this method might be incomplete for files with a large revision history, including frequently edited Google Docs, Sheets, and Slides. Older revisions might be omitted from the response, meaning the first revision returned may not be the oldest existing revision.
查看另外 1 个位置
SKILL.md:113来自说明文档打开原文件
  - `delete` — Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. For more information, see [Manage file revisions](https://developers.google.com/drive/api/guides/manage-revisions).  - `get` — Gets a revision's metadata or content by ID. For more information, see [Manage file revisions](https://developers.google.com/workspace/drive/api/guides/manage-revisions).
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
中风险

权限命令可授予、修改或撤销 Drive 访问权

原文依据:3 处
发现了什么

该 Skill 暴露创建、更新和删除文件或共享云端硬盘权限的方法。创建或扩大权限会把内容开放给其他主体;删除权限会使现有协作者失去访问权。源码未在这些方法旁要求确认目标身份、角色或资源。

为什么需要注意

在代理误解模糊的“分享”或“整理权限”请求时,文件可能被分享给错误对象、被授予过高权限,或合法协作者被移除。并发操作还可能仅保留最后一次更新。

这些是可调用的 Drive 权限管理方法,并非自动执行;只有代理实际调用相应方法且账户获授权时才会改变访问权。创建或更新权限可能扩大访问范围,删除权限会撤销访问。当前文件仅要求调用前检查方法参数,没有在权限操作旁要求核对资源、收件人、角色或取得确认,因此误调用会影响用户的云端数据共享。用户可限制为只读权限范围,并要求每次变更前展示目标和角色。

SKILL.md:95来自说明文档打开原文件
### permissions  - `create` — Creates a permission for a file or shared drive. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.  - `delete` — Deletes a permission. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.  - `get` — Gets a permission by ID. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing).  - `list` — Lists a file's or shared drive's permissions. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing).  - `update` — Updates a permission with patch semantics. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.
查看另外 2 个位置
SKILL.md:97来自说明文档打开原文件
  - `create` — Creates a permission for a file or shared drive. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.  - `delete` — Deletes a permission. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.  - `get` — Gets a permission by ID. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing).  - `list` — Lists a file's or shared drive's permissions. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing).  - `update` — Updates a permission with patch semantics. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing). **Warning:** Concurrent permissions operations on the same file aren't supported; only the last update is applied.
SKILL.md:127来自说明文档打开原文件
Before calling any API method, inspect it:
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

3 个说明模块

该 Skill 是 Google Drive CLI 的命令目录,覆盖文件、共享云端硬盘、评论、权限、修订版本和变更通知等资源;实际操作通过 `gws drive` 执行。

查看原文
SKILL.md:2来自说明文档打开原文件
---name: gws-drivedescription: "Google Drive: Manage files, folders, and shared drives."metadata:
SKILL.md:18来自说明文档打开原文件
```bashgws drive <resource> <method> [flags]```

它要求在每次调用 API 前先查看方法架构,再据此构造参数和 JSON 请求体。这有助于发现必填参数,但不构成对具体修改的用户授权。

查看原文
SKILL.md:127来自说明文档打开原文件
Before calling any API method, inspect it:```bash# Browse resources and methodsgws drive --help# Inspect a method's required params, types, and defaultsgws schema drive.<resource>.<method>```Use `gws schema` output to build your `--params` and `--json` flags.

所提供源码只包含命令说明,没有直接执行 API 调用、发送数据或植入固定收件人的脚本。风险主要来自代理在后续任务中选择并执行这里列出的高影响方法。

查看原文
SKILL.md:28来自说明文档打开原文件
## API Resources### about  - `get` — Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/workspace/drive/api/guides/fields-parameter).
从这里开始 · 工作说明SKILL.md
gws-drive
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明

代码和说明中提到的操作

运行命令
SKILL.md:18来自说明文档打开原文件
```bashgws drive <resource> <method> [flags]
SKILL.md:129来自说明文档打开原文件
```bash# Browse resources and methods
连接外部网站
SKILL.md:32来自说明文档打开原文件
  - `get` — Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/workspace/drive/api/guides/fields-parameter).
SKILL.md:36来自说明文档打开原文件
  - `get` — Retrieves an access proposal by ID. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending-access).  - `list` — List the access proposals on a file. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending-access). Note: Only approvers are able to list access proposals o 
SKILL.md:37来自说明文档打开原文件
  - `get` — Retrieves an access proposal by ID. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending-access).  - `list` — List the access proposals on a file. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending-access). Note: Only approvers are able to list access proposals on a file. If the user isn't an approver, a 403 error is returned.  - `resolve` — Approves or denies an access proposal. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending-access).
读取了多少行
139
文件校验值(用于核对版本)
e1ab0c1c3591824bb2adfe9c3e01abd8a447e747fa1af43f1603350fbfd95625