跳转到正文
报告库
用途分类 / 文档处理

Extension Object Storage Skill 安全审计

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

General file/object storage, such as for images, videos, files, documents and other bulk data. Perfect fit for image galleries, video galleries, and other file or object management. Supports large files beyond IC limit, with browser-cached HTTP URL access.

第三方安全检查结论

发现安全风险

已检查文件
1
发现的风险
2
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 1 项风险
低风险

采用该 Skill 会把第三方前后端包纳入应用的执行路径

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

说明把安装两个指定包和调用其 mixin/API 设为强制要求。前端包接收待上传文件的完整内容,后端包提供平台保留方法,因此这些依赖不是仅供编译的类型声明。所给材料没有包含这些包的源码,无法从本次证据核实其实际网络目标或其他副作用。

为什么需要注意

这些包及其传递依赖会获得相应构建或运行环境的能力;若包来源、发布者或版本不符合预期,文件数据和应用行为可能受影响。

这段证据能说明什么

文档确实要求安装并执行指定的 npm 与 mops 包:前端 API 接收完整文件字节,后端 mixin 提供存储基础设施,所以它们会进入上传执行路径。这与该 Skill 声明的对象存储用途一致,并非单凭第三方依赖即可认定恶意。不过,材料没有包含依赖包源码,无法核实其网络目的地、权限范围或额外副作用。用户可要求作者提供锁定版本、源码审计结果及实际网关域名,并限制依赖和网络权限。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
SKILL.md:22来自说明文档打开原文件
1. **mops dependency** — add `caffeineai-object-storage` to `mops.toml` under `[dependencies]`.2. **Mixin invocation** — `include MixinObjectStorage()` in `main.mo` (imported from `"mo:caffeineai-object-storage/Mixin"`).3. **Storage.ExternalBlob types** — every data field that represents a file MUST use `Storage.ExternalBlob`, never `Text`.4. **Frontend npm package** — `@caffeineai/object-storage` installed and `ExternalBlob.fromBytes(bytes, file.type, file.name)` used at the call site.
查看另外 4 个位置
SKILL.md:27来自说明文档打开原文件
CRITICAL: The frontend package (`@caffeineai/object-storage`) does NOT work without the backend mops package (`caffeineai-object-storage`). Installing only the npm package and not the mops package causes silent upload failures (403 from the storage gateway). You MUST install both together.
SKILL.md:74来自说明文档打开原文件
NEVER create your own implementation of `_immutableObjectStorageCreateCertificate` or any other `_immutableObjectStorage*` method. These are platform-reserved method names provided exclusively by the `MixinObjectStorage` mixin from the mops package. Hand-written implementations produce wrong return types and cause `403 Forbidden: Invalid payload` at upload time.
SKILL.md:49来自说明文档打开原文件
The only type you use from `mo:caffeineai-object-storage/Storage` is `ExternalBlob` (which is `Blob`). All other functions in `Storage.mo` are internal infrastructure used by `MixinObjectStorage` -- do not call them directly.
SKILL.md:132来自说明文档打开原文件
```typescriptconst handleUpload = async (file: File) => {  const bytes = new Uint8Array(await file.arrayBuffer());  const blob = ExternalBlob.fromBytes(bytes, file.type, file.name).withUploadProgress((pct) => {    setProgress(pct);  });  await actor.uploadFile(file.name, blob);};
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

文件内容和原始文件名会离开应用后端并进入外部存储网关

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

该 Skill 明确采用链下存储,并指示前端把文件全部字节、浏览器提供的 MIME 类型和原始文件名交给存储库。原始文件名还会进入网关的 Content-Disposition,并另存到应用后端。文档没有提供网关运营方、保留期限、访问控制或删除机制的信息。

为什么需要注意

敏感文档内容以及可能包含姓名、客户号或项目名的文件名会进入应用数据库之外的系统。用户仅审查链上或后端记录时,可能低估数据驻留、泄露和合规范围。

采用此 Skill 并上传文件时,前端会读取完整文件字节,并把字节、MIME 类型和原始文件名交给外部存储组件;正文明确称内容存于链下,后端只保存引用。文件名还会由网关通过 Content-Disposition 返回。因此,文件内容和文件名会离开应用后端的数据边界。材料未说明网关运营方、保留期限、访问控制或删除方式,用户应在上传敏感文件前向作者确认这些条件。

SKILL.md:16来自说明文档打开原文件
This skill adds off-chain file/object storage with on-chain references. The `MixinObjectStorage` mixin provides infrastructure for file operations; you track uploaded files in your own data structures using `Storage.ExternalBlob`.
查看另外 3 个位置
SKILL.md:129来自说明文档打开原文件
Pass the browser `File` type and name into `fromBytes` so the gateway blob tree stores `Content-Type` and `Content-Disposition` (original filename). Also pass `file.name` to the backend so app records keep the filename for lists and UI.
SKILL.md:132来自说明文档打开原文件
```typescriptconst handleUpload = async (file: File) => {  const bytes = new Uint8Array(await file.arrayBuffer());  const blob = ExternalBlob.fromBytes(bytes, file.type, file.name).withUploadProgress((pct) => {    setProgress(pct);  });  await actor.uploadFile(file.name, blob);};```
SKILL.md:31来自说明文档打开原文件
File content is stored off-chain. The backend manages references to external files using the `Storage.ExternalBlob` type from `mo:caffeineai-object-storage/Storage`. The frontend handles the actual upload/download; the backend only stores the reference.
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

4 个说明模块

该 Skill 要求应用同时引入后端 mops 包和前端 npm 包;后端混入平台保留的存储方法,前端库负责实际上传和下载。

查看原文
SKILL.md:22来自说明文档打开原文件
1. **mops dependency** — add `caffeineai-object-storage` to `mops.toml` under `[dependencies]`.2. **Mixin invocation** — `include MixinObjectStorage()` in `main.mo` (imported from `"mo:caffeineai-object-storage/Mixin"`).3. **Storage.ExternalBlob types** — every data field that represents a file MUST use `Storage.ExternalBlob`, never `Text`.4. **Frontend npm package** — `@caffeineai/object-storage` installed and `ExternalBlob.fromBytes(bytes, file.type, file.name)` used at the call site.
SKILL.md:31来自说明文档打开原文件
File content is stored off-chain. The backend manages references to external files using the `Storage.ExternalBlob` type from `mo:caffeineai-object-storage/Storage`. The frontend handles the actual upload/download; the backend only stores the reference.

上传流程会读取浏览器 File 的全部字节,并把内容、MIME 类型和原始文件名交给外部存储库;应用后端另外保存文件名。

查看原文
SKILL.md:129来自说明文档打开原文件
Pass the browser `File` type and name into `fromBytes` so the gateway blob tree stores `Content-Type` and `Content-Disposition` (original filename). Also pass `file.name` to the backend so app records keep the filename for lists and UI.
SKILL.md:132来自说明文档打开原文件
```typescriptconst handleUpload = async (file: File) => {  const bytes = new Uint8Array(await file.arrayBuffer());  const blob = ExternalBlob.fromBytes(bytes, file.type, file.name).withUploadProgress((pct) => {    setProgress(pct);  });  await actor.uploadFile(file.name, blob);};```

显示文件时,Skill 使用存储库生成的不透明代理 URL;下载时,它从存储服务取回完整字节并触发浏览器保存。

查看原文
SKILL.md:146来自说明文档打开原文件
Use `getDirectURL()` for inline display (images, videos). This returns an opaque proxy URL -- it has no file extension, so never inspect the URL to determine file type.```typescript<img src={record.blob.getDirectURL()} alt={record.filename} />```
SKILL.md:179来自说明文档打开原文件
```typescriptconst handleDownload = async (record: FileRecord) => {  const bytes = await record.blob.getBytes();  const blob = new Blob([bytes]);  const url = URL.createObjectURL(blob);  const a = document.createElement("a");  a.href = url;  a.download = record.filename;  document.body.appendChild(a);  a.click();  document.body.removeChild(a);  URL.revokeObjectURL(url);};```
从这里开始 · 工作说明SKILL.md
extension-object-storage
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

连接外部网站
SKILL.md:12来自说明文档打开原文件
# Object StorageObject storage extension for [Caffeine AI](https://caffeine.ai?utm_source=caffeine-skill&utm_medium=referral).
安装其他软件包
SKILL.md:220来自说明文档打开原文件
| `403 Forbidden: Invalid payload` on `PUT /v1/blob-tree/` | Backend canister missing `_immutableObjectStorageCreateCertificate` or returning wrong type | Install `caffeineai-object-storage` in mops.toml, add `include MixinObjectStorage()`  | `403 Forbidden: Invalid payload` (all files) | `@caffeineai/object-storage` npm installed but `caffeineai-object-storage` mops NOT installed | Add the mops dependency and rebuild backend || Method exists but still 403 | Hand-written stub returns wrong type (e.g. `Blob` or `()` instead of `record { method; blob_hash }`) | Remove the custom implementation, use the platform mixin instead |
读取了多少行
223
文件校验值(用于核对版本)
3ce7112beafb81678ec6391e151119d650f34c243ec744a0667e08633597f7c7