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

Ai Sdk Skill 安全审计

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

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4

第三方安全检查结论

发现安全风险

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

缺少依赖时会直接安装 npm 包

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

指令要求在 `node_modules/ai/` 不存在时执行项目包管理器的安装命令,而不是先取得用户确认。安装会获取并执行所选版本的包管理流程,并通常改动依赖清单、锁文件和 `node_modules`。

为什么需要注意

在仅询问文档或评估方案时,用户的项目也可能被持久修改;安装过程还会引入 npm 供应链及安装脚本的执行风险。

该行是生效中的安装指令:目录缺失时要求安装,而没有要求先征得用户确认。此操作具有合理目的,但会从包仓库取得代码,且包管理器通常会修改 `node_modules`、依赖清单和锁文件,并可能运行安装生命周期脚本。用户可限制代理仅检查现有依赖,或要求安装前确认包、版本及预期文件变更。

SKILL.md:23来自说明文档打开原文件
1. Ensure `ai` is installed. If `node_modules/ai/` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.2. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.
查看另外 1 个位置
SKILL.md:21来自说明文档打开原文件
The `ai` package ships its full documentation and source code inside `node_modules`. These always match the installed version, so trust them over anything you remember.
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

建议启用会记录模型请求、响应及工具调用的开发工具

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

该 Skill 推荐在开发时使用 DevTools,并明确说明它会捕获请求、响应、工具调用和多步运行。这些内容可能包含用户输入、模型输出、业务数据或工具参数;文本没有规定脱敏、保留期限或访问控制。

为什么需要注意

有权访问本地开发工具、其存储或调试界面的人可能看到被记录的数据。若应用处理凭证、个人信息或内部资料,调试记录会扩大暴露面。

该 Skill 明确建议开发时使用 DevTools,并说明它会捕获请求、响应、工具调用和多步运行;启用后,这些记录可能包含提示词、模型输出和工具参数。文本将其限定为本地开发,但没有说明存储位置、访问控制、脱敏或清理方式。用户可要求在启用前说明这些细节,并禁止对生产数据或秘密信息进行捕获。

SKILL.md:63来自说明文档打开原文件
AI SDK DevTools captures your AI SDK calls - requests, responses, tool calls, token usage, and multi-step runs - so you can inspect exactly what your agents do. Use it while developing to debug generations. It is a separate package and is intended for local development only.For setup instructions, read the bundled DevTools documentation.
查看另外 1 个位置
SKILL.md:65来自说明文档打开原文件
For setup instructions, read the bundled DevTools documentation.
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
低风险

安装命令没有固定依赖版本

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

安装命令没有指定依赖版本。同样的命令以后可能下载不同代码,你实际安装的内容可能与这次检查时不同。

为什么需要注意

即使命令和报告没变,以后安装时也可能下载到另一份代码。

这是用于取得版本匹配文档的正常依赖安装,但命令示例 `pnpm add ai` 未固定版本,因此不同时间可能解析到不同发布版,并改动项目依赖与锁文件。用户可要求作者先报告将安装的确切版本,或限制为项目已锁定/明确批准的版本。

SKILL.md:23来自说明文档打开原文件
1. Ensure `ai` is installed. If `node_modules/ai/` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.2. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

8 个说明模块

该 Skill 面向 Vercel AI SDK 开发,并要求代理优先查阅项目中已安装版本附带的文档和源码,而不是依赖记忆。

查看原文
SKILL.md:17来自说明文档打开原文件
**Never write AI SDK code from memory.** Always verify every API, option, and pattern against the documentation and source code for the version that is actually installed in the project.
SKILL.md:24来自说明文档打开原文件
1. Ensure `ai` is installed. If `node_modules/ai/` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.2. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/`.4. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.

如果本地资料不足,该 Skill 会让代理访问 AI SDK 官方文档、文档搜索接口和 AI Gateway 模型列表。请求会向这些 Vercel 域名披露访问时间、网络元数据以及搜索词。

查看原文
SKILL.md:26来自说明文档打开原文件
3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/`.4. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.5. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.
SKILL.md:43来自说明文档打开原文件
Never use model IDs from memory — models are released and retired frequently. Fetch the current list before writing code that references a model. Do not truncate the list (e.g. with `head`) so you can find the newest models:```bash# All available modelscurl -s https://ai-gateway.vercel.sh/v1/models | jq -r '.data[].id'# Filter by provider (e.g. anthropic, openai, google)curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("anthropic/")) | .id] | reverse | .[]'```

该 Skill 建议通过环境变量提供 AI Gateway 凭证,但没有要求读取、显示或发送该变量的值。

查看原文
SKILL.md:35来自说明文档打开原文件
1. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.2. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.3. Reference models with `provider/model` strings.
从这里开始 · 工作说明SKILL.md
ai-sdk
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

连接外部网站
SKILL.md:10来自说明文档打开原文件
- Repository: https://github.com/vercel/ai- Documentation: https://ai-sdk.dev/docs
SKILL.md:11来自说明文档打开原文件
- Repository: https://github.com/vercel/ai- Documentation: https://ai-sdk.dev/docs
SKILL.md:26来自说明文档打开原文件
3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/`.4. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.5. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.
安装其他软件包
SKILL.md:23来自说明文档打开原文件
1. Ensure `ai` is installed. If `node_modules/ai/` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.2. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.
读取密钥或账号配置
SKILL.md:36来自说明文档打开原文件
1. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.2. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.3. Reference models with `provider/model` strings.
运行命令
SKILL.md:45来自说明文档打开原文件
```bash# All available models
读取了多少行
79
文件校验值(用于核对版本)
d35c4499d1408e62a66e52ee57809dc198169f5e157aa4bcaa318bda810bb685