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

Vercel Cli With Tokens Skill 安全审计

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

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

第三方安全检查结论

先别安装或运行

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

Skill 要求全局安装并更新未固定版本的 Vercel CLI

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

它运行 `npm install -g vercel`,没有锁定版本或要求核验包来源。全局安装会更改用户的开发环境,并执行所下载 npm 包允许的安装流程。

为什么需要注意

用户得到的 CLI 行为可能随最新发布版本变化;包来源、依赖或发布账户若出现问题,安装代码会以当前用户权限运行,并可能影响该用户可访问的文件和凭据。

Skill 的设置步骤直接要求执行未固定版本的全局 npm 安装,并称要保持最新。这会修改用户的全局开发环境,且安装内容会随当时发布的包版本变化。来源名称与 Vercel CLI 相符,但文本没有版本锁定、来源核验或安装前批准要求。用户可要求使用固定版本、项目本地或临时隔离安装,并在安装前确认包来源与权限。

SKILL.md:97来自说明文档打开原文件
## CLI SetupEnsure the Vercel CLI is installed and up to date:```bashnpm install -g vercelvercel --version```
查看另外 1 个位置
SKILL.md:349来自说明文档打开原文件
### CLI not installed```bashnpm install -g vercel```
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
高风险

令牌查找命令可能把完整 Vercel 凭据暴露在代理记录中

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

Skill 明确运行 `printenv VERCEL_TOKEN` 和宽泛的 `grep -i 'vercel' .env`。这些命令会把匹配值打印到标准输出;若由代理或自动化终端执行,完整令牌及其他匹配的 Vercel 配置可能进入聊天、工具输出或日志。找不到令牌时,它还要求用户直接提供一个令牌。

为什么需要注意

获得输出或对话记录的人可能用该令牌访问其权限范围内的 Vercel 项目、部署和账户配置。宽泛 grep 还可能显示不止一个相关秘密。

这是实际的凭据查找流程,不只是示例:它先打印 `VERCEL_TOKEN`,再从 `.env` 输出所有含 “vercel” 的行,因此完整令牌和其他配置可能进入代理工具输出或日志。关于不要使用 `--token` 的警告仅防止命令行历史和进程列表泄露,不能防止这些查找命令的标准输出泄露。用户可要求作者改为只检测变量是否存在、屏蔽值,并通过安全的密钥输入机制提供令牌。

SKILL.md:17来自说明文档打开原文件
### A) `VERCEL_TOKEN` is already set in the environment```bashprintenv VERCEL_TOKEN```
查看另外 5 个位置
SKILL.md:37来自说明文档打开原文件
### C) Token is in a `.env` file under a different nameLook for any variable that looks like a Vercel token (Vercel tokens typically start with `vca_`):```bashgrep -i 'vercel' .env 2>/dev/null```Inspect the output to identify which variable holds the token, then export it as `VERCEL_TOKEN`:
SKILL.md:51来自说明文档打开原文件
### D) No token found — ask the userIf none of the above yield a token, ask the user to provide one. They can create a Vercel access token at vercel.com/account/tokens.---**Important:** Once `VERCEL_TOKEN` is exported as an environment variable, the Vercel CLI reads it natively — **do not pass it as a `--token` flag**. Putting secrets in command-line arguments exposes them in shell history and process listings.
SKILL.md:314来自说明文档打开原文件
Check the environment and any `.env` files present:```bashprintenv | grep -i vercelgrep -i vercel .env 2>/dev/null```
SKILL.md:15来自说明文档打开原文件
Before running any Vercel CLI commands, identify where the token is coming from. Work through these scenarios in order:### A) `VERCEL_TOKEN` is already set in the environment```bashprintenv VERCEL_TOKEN```
SKILL.md:39来自说明文档打开原文件
Look for any variable that looks like a Vercel token (Vercel tokens typically start with `vca_`):```bashgrep -i 'vercel' .env 2>/dev/null```Inspect the output to identify which variable holds the token, then export it as `VERCEL_TOKEN`:
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 2 项风险
中风险

拉取远程环境变量会在本地创建含秘密的 `.env.local`

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

`vercel env pull` 被列为普通管理命令,会把项目环境变量下载到当前目录的 `.env.local`。Skill 没有在此操作前要求确认,也没有要求检查该文件是否会被版本控制、备份或共享。

为什么需要注意

生产或预览环境中的密钥可能作为持久本地文件留在磁盘,并随后被提交、同步、备份或被同机其他进程读取。

该命令被列为正常的环境变量管理操作,并明确把远程变量拉取到本地 `.env.local`。这可能在工作目录、备份或文件共享中留下秘密;附近没有要求事前确认或检查忽略规则。是否实际包含秘密取决于目标项目。用户可限制此操作,或要求作者在执行前确认目标目录、文件覆盖及版本控制忽略状态。

SKILL.md:241来自说明文档打开原文件
# List environment variablesvercel env ls --scope <team-slug># Pull env vars to local .env.local filevercel env pull --scope <team-slug>
查看另外 1 个位置
SKILL.md:232来自说明文档打开原文件
## Managing Environment Variables```bash# Set for all environmentsecho "value" | vercel env add VAR_NAME --scope <team-slug># Set for a specific environment (production, preview, development)echo "value" | vercel env add VAR_NAME production --scope <team-slug># List environment variablesvercel env ls --scope <team-slug># Pull env vars to local .env.local filevercel env pull --scope <team-slug>
中风险

部署流程会用 `git add .` 暂存整个工作树

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

获准推送后,Skill 指示运行 `git add .`,而不是只暂存本次部署所需的已审核文件。该命令可能包含无关修改、新生成文件或未被忽略的秘密。

为什么需要注意

后续提交和推送可能把本地配置、凭据或无关工作永久写入仓库并发送到远程。虽然 Skill 要求推送前征得同意,但用户可能并不知道实际暂存范围。

流程确实要求推送前取得用户批准,这降低了未授权推送风险;但批准后仍使用 `git add .` 暂存当前目录下所有未忽略的变更,而不是已审核的部署文件。无关修改或未忽略的凭据可能随后被提交并推送。用户可将批准限定为明确文件清单,并要求提交前查看暂存差异和秘密扫描结果。

SKILL.md:180来自说明文档打开原文件
Git pushes trigger automatic Vercel deployments.1. **Ask the user before pushing.** Never push without explicit approval.2. Commit and push:   ```bash   git add .   git commit -m "deploy: <description of changes>"   git push   ```3. Vercel builds automatically. Non-production branches get preview deployments.
查看另外 1 个位置
SKILL.md:178来自说明文档打开原文件
**A) Git Push Deploy — has git remote (preferred)**Git pushes trigger automatic Vercel deployments.1. **Ask the user before pushing.** Never push without explicit approval.2. Commit and push:   ```bash   git add .   git commit -m "deploy: <description of changes>"   git push   ```3. Vercel builds automatically. Non-production branches get preview deployments.
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
中风险

`-y` 自动确认可能执行未经逐项核对的账户变更

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

Skill 将 `-y` 作为通用规则以跳过交互确认,并在删除环境变量、关联项目和部署命令中使用它。环境变量删除没有单独要求用户批准;项目关联还会在本地创建 Vercel 元数据并决定后续操作的账户目标。

为什么需要注意

如果变量名、团队范围、项目或当前目录判断错误,命令可能删除远程配置、关联错误项目或向错误账户部署,而 CLI 的最后确认不会阻止操作。

这是有效的控制风险,但影响因命令而异。Skill 用 `-y` 自动关联项目并创建本地 Vercel 元数据,也用它无提示删除远程环境变量;工作约定还普遍鼓励用 `-y` 跳过确认。文本只对 Git 推送及付费/破坏性套餐变更要求批准,没有为环境变量删除规定同等确认。用户可要求所有删除和首次关联先展示准确团队、项目及变量并单独批准。

SKILL.md:150来自说明文档打开原文件
#### Link the project**With git remote (preferred):**```bashvercel link --repo --scope <team-slug> -y```Reads the git remote and connects to the matching Vercel project. Creates `.vercel/repo.json`. More reliable than plain `vercel link`, which matches by directory name.**Without git remote:**```bashvercel link --scope <team-slug> -y```Creates `.vercel/project.json`.
查看另外 4 个位置
SKILL.md:247来自说明文档打开原文件
# Remove a variablevercel env rm VAR_NAME --scope <team-slug> -y```
SKILL.md:303来自说明文档打开原文件
- **Check the environment for tokens before asking the user.** Look in the current env and `.env` files first.- **Default to preview deployments.** Only deploy to production when explicitly asked.- **Ask before pushing to git.** Never push commits without the user's approval.- **Do not modify `.vercel/` files directly.** The CLI manages this directory. Reading them (e.g. to verify `orgId`) is fine.- **Do not curl/fetch deployed URLs to verify.** Just return the link to the user.- **Use `--format json`** when structured output will help with follow-up steps.- **Use `-y`** on commands that prompt for confirmation to avoid interactive blocking.
SKILL.md:152来自说明文档打开原文件
**With git remote (preferred):**```bashvercel link --repo --scope <team-slug> -y```Reads the git remote and connects to the matching Vercel project. Creates `.vercel/repo.json`. More reliable than plain `vercel link`, which matches by directory name.
SKILL.md:301来自说明文档打开原文件
- **Never pass `VERCEL_TOKEN` as a `--token` flag.** Export it as an environment variable and let the CLI read it natively.- **Check the environment for tokens before asking the user.** Look in the current env and `.env` files first.- **Default to preview deployments.** Only deploy to production when explicitly asked.- **Ask before pushing to git.** Never push commits without the user's approval.- **Do not modify `.vercel/` files directly.** The CLI manages this directory. Reading them (e.g. to verify `orgId`) is fine.- **Do not curl/fetch deployed URLs to verify.** Just return the link to the user.- **Use `--format json`** when structured output will help with follow-up steps.- **Use `-y`** on commands that prompt for confirmation to avoid interactive blocking.
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

8 个说明模块

该 Skill 使用当前环境或项目的 `.env` 文件寻找 Vercel 令牌、组织 ID 和项目 ID,然后让 Vercel CLI 从环境变量读取这些凭据。

查看原文
SKILL.md:15来自说明文档打开原文件
Before running any Vercel CLI commands, identify where the token is coming from. Work through these scenarios in order:### A) `VERCEL_TOKEN` is already set in the environment```bashprintenv VERCEL_TOKEN```
SKILL.md:70来自说明文档打开原文件
Similarly, check for the project ID and team scope. These let the CLI target the right project without needing `vercel link`.```bash# Check environmentprintenv VERCEL_PROJECT_IDprintenv VERCEL_ORG_ID# Or check .envgrep -i 'vercel' .env 2>/dev/null```

该 Skill 不只部署代码;它还包含项目关联、环境变量、域名以及通过 Stripe Projects 更改付费套餐的操作。生产部署和套餐变更被要求取得明确许可,但部分其他账户变更没有同样的逐项确认要求。

查看原文
SKILL.md:108来自说明文档打开原文件
Always deploy as **preview** unless the user explicitly requests production. Choose a method based on what you have available.
SKILL.md:232来自说明文档打开原文件
## Managing Environment Variables```bash# Set for all environmentsecho "value" | vercel env add VAR_NAME --scope <team-slug># Set for a specific environment (production, preview, development)echo "value" | vercel env add VAR_NAME production --scope <team-slug># List environment variablesvercel env ls --scope <team-slug># Pull env vars to local .env.local filevercel env pull --scope <team-slug># Remove a variablevercel env rm VAR_NAME --scope <team-slug> -y```
SKILL.md:267来自说明文档打开原文件
## Managing Domains```bash# List domainsvercel domains ls --scope <team-slug># Add a domain to the project — linked or env-linked directory (1 arg)vercel domains add <domain> --scope <team-slug># Add a domain — unlinked directory (requires <project> positional)vercel domains add <domain> <project> --scope <team-slug>```
SKILL.md:280来自说明文档打开原文件
## Stripe Projects Plan ChangesIf this project is managed by Stripe Projects. **Ask the user before running any paid or destructive plan change** — upgrades bill a real card, downgrades remove seats.First run `stripe projects status --json` to confirm the Vercel resource's local name. The examples below assume the default (`vercel-plan`); substitute the actual name if it was renamed at `stripe projects add` time.- **Upgrade to Pro:** `stripe projects add vercel/pro` (or `stripe projects upgrade vercel-plan pro`)- **Downgrade to Hobby:** `stripe projects downgrade vercel-plan hobby`
从这里开始 · 工作说明SKILL.md
vercel-cli-with-tokens
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。 另有 2 个章节,可在原文件中查看。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

运行命令
SKILL.md:19来自说明文档打开原文件
```bashprintenv VERCEL_TOKEN
SKILL.md:27来自说明文档打开原文件
```bashgrep '^VERCEL_TOKEN=' .env 2>/dev/null
SKILL.md:33来自说明文档打开原文件
```bashexport VERCEL_TOKEN=$(grep '^VERCEL_TOKEN=' .env | cut -d= -f2-)
读取密钥或账号配置
SKILL.md:25来自说明文档打开原文件
### B) Token is in a `.env` file under `VERCEL_TOKEN`
SKILL.md:28来自说明文档打开原文件
```bashgrep '^VERCEL_TOKEN=' .env 2>/dev/null```
SKILL.md:34来自说明文档打开原文件
```bashexport VERCEL_TOKEN=$(grep '^VERCEL_TOKEN=' .env | cut -d= -f2-)```
连接外部网站
SKILL.md:81来自说明文档打开原文件
**If you have a project URL** (e.g. `https://vercel.com/my-team/my-project`), extract the team slug:
SKILL.md:84来自说明文档打开原文件
```bash# e.g. "my-team" from "https://vercel.com/my-team/my-project"echo "$PROJECT_URL" | sed 's|https://vercel.com/||' | cut -d/ -f1
SKILL.md:85来自说明文档打开原文件
# e.g. "my-team" from "https://vercel.com/my-team/my-project"echo "$PROJECT_URL" | sed 's|https://vercel.com/||' | cut -d/ -f1```
安装其他软件包
SKILL.md:102来自说明文档打开原文件
```bashnpm install -g vercelvercel --version
SKILL.md:352来自说明文档打开原文件
```bashnpm install -g vercel```
读取文件
SKILL.md:147来自说明文档打开原文件
# Is it already linked to a Vercel project?cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null```
修改文件
SKILL.md:248来自说明文档打开原文件
# Remove a variablevercel env rm VAR_NAME --scope <team-slug> -y```
读取了多少行
354
文件校验值(用于核对版本)
332898099808d228eb9ef727239ab0d36133a95bf4fd873f3322f1d713e31c03