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

Stitch Loop Skill 安全审计

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

Teaches agents to iteratively build websites using Stitch with an autonomous baton-passing loop pattern

第三方安全检查结论

先别安装或运行

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

未固定版本的全局 npx 安装会执行安装时获取的远程代码

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

README 要求运行 `npx skills add ... --global`,但没有固定 `skills` CLI 或远程仓库的不可变版本。`npx` 通常会获取并执行当时解析到的包,而全局选项会产生用户范围的持久安装。

为什么需要注意

若 npm 包、仓库或其当前版本被篡改,安装命令可能以运行者权限执行恶意安装逻辑,并持久修改全局 Skill 配置;即使没有攻击,未来版本也可能与已审计内容不同。

README 的安装指令通过 `npx` 调用未固定版本的 `skills` CLI,并从未固定提交或版本的仓库标识安装,同时使用 `--global`。运行时可能获取并执行当时解析到的代码,并把 Skill 持久安装到用户范围;这不证明代码恶意,但会削弱本次审计与以后实际安装内容之间的一致性。用户可要求固定 CLI 版本和不可变提交并先审查安装内容。

README.md:5来自说明文档打开原文件
## Install```bashnpx skills add google-labs-code/stitch-skills --skill stitch-loop --global```
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
高风险

远程生成的活动 HTML 未经安全检查即进入公开站点并在浏览器中执行

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

Skill 要求下载 Stitch 返回的 HTML,直接移入 `site/public`,可选验证还会启动服务器并打开该页面。流程只要求视觉对比,没有要求检查脚本、外部请求、表单目标、嵌入内容或危险 URL。

为什么需要注意

若生成结果、上游服务或输入提示被操纵,页面中的 JavaScript、追踪器或表单可能在预览或部署时向外部服务发送访问者输入和浏览器可访问的数据,或展示欺骗性内容。

Skill 要求从 Stitch 返回的 URL 下载 HTML、移入公开目录,并可通过本地服务器在浏览器中打开。可见流程只规定修正资源路径和视觉对比,没有规定检查脚本、外部请求、表单或嵌入内容。因此,若远程生成结果含活动内容,浏览器验证或后续部署可能执行或发布它。用户可要求在打开和发布前进行静态审查,并限制网络和浏览器权限。

SKILL.md:90来自说明文档打开原文件
   - After generating each screen, call `[prefix]:get_project` again and update the `screens` map in `.stitch/metadata.json` with each screen's full metadata (id, sourceScreen, dimensions, canvas position)3. **Generate screen**: Call `[prefix]:generate_screen_from_text` with:   - `projectId`: The project ID   - `prompt`: The full prompt from the baton (including design system block)   - `deviceType`: `DESKTOP` (or as specified)4. **Retrieve assets**: Before downloading, check if `.stitch/designs/{page}.html` and `.stitch/designs/{page}.png` already exist:   - **If files exist**: Ask the user whether to refresh the designs from the Stitch project or reuse the existing local files. Only re-download if the user confirms.   - **If files do not exist**: Proceed with download:     - `htmlCode.downloadUrl` — Download and save as `.stitch/designs/{page}.html`      - `screenshot.downloadUrl` — Append `=w{width}` to the URL before downloading, where `{width}` is the `width` value from the screen metadata (Google CDN serves low-res thumbnails by default). Save as `.stitch/designs/{page}.png`
查看另外 2 个位置
SKILL.md:102来自说明文档打开原文件
1. Move generated HTML from `.stitch/designs/{page}.html` to `site/public/{page}.html`2. Fix any asset paths to be relative to the public folder3. Update navigation:   - Find existing placeholder links (e.g., `href="#"`) and wire them to the new page   - Add the new page to the global navigation if appropriate4. Ensure consistent headers/footers across all pages
SKILL.md:114来自说明文档打开原文件
1. **Check availability**: Run `list_tools` to see if `chrome*` tools are present2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`4. **Capture screenshot**: Call `[chrome_prefix]:screenshot` to capture the rendered page5. **Visual comparison**: Compare against the Stitch screenshot (`.stitch/designs/{page}.png`) for fidelity6. **Stop server**: Terminate the dev server process
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 2 项风险
高风险

baton 控制的页面名可越出预期目录或覆盖站点文件

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

协议直接从 YAML 的 `page` 字段取得名称,并将其插入下载和移动路径。主执行协议没有要求拒绝 `/`、`..`、绝对路径或已有的公开目标文件;确认步骤只检查暂存区中的 HTML/PNG 是否已存在。

为什么需要注意

恶意或误写的 baton 页面名可能把生成内容写到 `.stitch/designs` 或 `site/public` 之外,或在没有明确确认的情况下替换已有公开页面。受影响范围取决于代理可写权限。

流程把 baton 中的 `page` 值直接用于下载目标和公开站点目标。另一个文档虽要求它是“valid filename”,但没有给出拒绝绝对路径、`..`、目录分隔符或覆盖现有公开文件的具体规则。若 baton 可被不可信内容修改,构造的名称可能把写入或移动操作导向预期目录之外。用户可要求严格限定为简单文件名并在覆盖前确认。

SKILL.md:63来自说明文档打开原文件
Parse `.stitch/next-prompt.md` to extract:- **Page name** from the `page` frontmatter field- **Prompt content** from the markdown body
查看另外 3 个位置
SKILL.md:94来自说明文档打开原文件
   - `deviceType`: `DESKTOP` (or as specified)4. **Retrieve assets**: Before downloading, check if `.stitch/designs/{page}.html` and `.stitch/designs/{page}.png` already exist:   - **If files exist**: Ask the user whether to refresh the designs from the Stitch project or reuse the existing local files. Only re-download if the user confirms.   - **If files do not exist**: Proceed with download:     - `htmlCode.downloadUrl` — Download and save as `.stitch/designs/{page}.html`      - `screenshot.downloadUrl` — Append `=w{width}` to the URL before downloading, where `{width}` is the `width` value from the screen metadata (Google CDN serves low-res thumbnails by default). Save as `.stitch/designs/{page}.png`
SKILL.md:102来自说明文档打开原文件
1. Move generated HTML from `.stitch/designs/{page}.html` to `site/public/{page}.html`2. Fix any asset paths to be relative to the public folder3. Update navigation:
resources/baton-schema.md:56来自说明文档打开原文件
Before completing an iteration, validate your baton:- [ ] `page` frontmatter field exists and is a valid filename- [ ] Prompt includes the design system block- [ ] Prompt describes a page NOT already in `SITE.md` sitemap- [ ] Prompt includes specific page structure details
中风险

强制续写 baton 会扩大后续修改范围并支持无人审核的持续变更

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

每轮必须创建下一任务;路线图为空时代理可以自行发明页面。后续集成还可修改全局导航、所有页面的页眉页脚和站点文档。CI/CD 模式可由 baton 变更继续触发,而人工审核只是多个可选编排方式之一。

为什么需要注意

一次建页授权可能演变成多轮未单独批准的页面、导航和文档改动,造成范围漂移、覆盖人工修改或持续消耗 Stitch/CI 资源。

每轮都被要求续写下一任务,且待办为空时可自行发明页面;集成范围还包括全局导航、所有页面的页眉页脚及站点文档。文档列出由 baton 变更触发 CI/CD,而人工审核只是可选编排方式之一。若用户启用了自动触发,这可能在没有逐轮批准时持续扩大文件修改范围。用户可限制单轮运行、要求每轮审批,并把可修改路径列入白名单。

SKILL.md:104来自说明文档打开原文件
2. Fix any asset paths to be relative to the public folder3. Update navigation:   - Find existing placeholder links (e.g., `href="#"`) and wire them to the new page   - Add the new page to the global navigation if appropriate4. Ensure consistent headers/footers across all pages
查看另外 3 个位置
SKILL.md:124来自说明文档打开原文件
Modify `.stitch/SITE.md`:- Add the new page to Section 4 (Sitemap) with `[x]`- Remove any idea you consumed from Section 6 (Creative Freedom)- Update Section 5 (Roadmap) if you completed a backlog item### Step 6: Prepare the Next Baton (Critical)**You MUST update `.stitch/next-prompt.md` before completing.** This keeps the loop alive.1. **Decide the next page**:    - Check `.stitch/SITE.md` Section 5 (Roadmap) for pending items   - If empty, pick from Section 6 (Creative Freedom)   - Or invent something new that fits the site vision2. **Write the baton** with proper YAML frontmatter:
SKILL.md:231来自说明文档打开原文件
| Method | How it works ||--------|--------------|| **CI/CD** | GitHub Actions triggers on `.stitch/next-prompt.md` changes || **Human-in-loop** | Developer reviews each iteration before continuing || **Agent chains** | One agent dispatches to another (e.g., Jules API) || **Manual** | Developer runs the agent repeatedly with the same repo |
SKILL.md:129来自说明文档打开原文件
### Step 6: Prepare the Next Baton (Critical)**You MUST update `.stitch/next-prompt.md` before completing.** This keeps the loop alive.1. **Decide the next page**:    - Check `.stitch/SITE.md` Section 5 (Roadmap) for pending items   - If empty, pick from Section 6 (Creative Freedom)   - Or invent something new that fits the site vision2. **Write the baton** with proper YAML frontmatter:
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
低风险

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

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

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

为什么需要注意

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

可选的视觉验证步骤会运行未固定版本的 `npx serve`。如果本机没有该包,npx 可能下载并执行当时解析到的版本,因此不同时间运行可能得到不同代码。该行为仅在启用可选浏览器验证时发生;用户可要求固定包版本或使用已审核的本地服务器。

SKILL.md:114来自说明文档打开原文件
1. **Check availability**: Run `list_tools` to see if `chrome*` tools are present2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。发现 1 项风险
中风险

项目中的 Markdown 被当作代理指令和下一步授权来源

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

Skill 指示代理读取仓库内的 baton、SITE 和 DESIGN 文件,并依据其中内容选择工作。提供的 SITE 示例甚至包含明确的“AGENT INSTRUCTION”。这些文件没有被界定为不可信数据,也没有规定忽略其中与建站无关的工具指令。

为什么需要注意

打开来源不可信或多人协作的仓库时,隐藏在这些文件中的提示注入可能改变任务、诱导额外工具操作,或让代理生成并集成用户没有批准的页面内容。

读取这些项目 Markdown 是该 Skill 的预期机制,但它们确实被用作生成提示、任务选择和下一步决策来源;示例还把 SITE.md 明确标为代理指令。可见文本没有限定只接受建站字段,也没有说明忽略文件中的额外工具指令。若仓库或 baton 来自不可信来源,这会形成提示注入和越权决策风险。用户可要求把这些文件当数据解析,并对工具调用及范围变化另行确认。

SKILL.md:63来自说明文档打开原文件
Parse `.stitch/next-prompt.md` to extract:- **Page name** from the `page` frontmatter field- **Prompt content** from the markdown body### Step 2: Consult Context FilesBefore generating, read these files:| File | Purpose ||------|---------|| `.stitch/SITE.md` | Site vision, **Stitch Project ID**, existing pages (sitemap), roadmap || `.stitch/DESIGN.md` | Required visual style for Stitch prompts |
查看另外 5 个位置
examples/SITE.md:4来自说明文档打开原文件
---# Project Vision & Constitution> **AGENT INSTRUCTION:** Read this file before every iteration. It serves as the project's "Long-Term Memory." If `next-prompt.md` is empty, pick the highest priority item from Section 5 OR invent a new page that fits the project vision.
SKILL.md:4来自说明文档打开原文件
description: Teaches agents to iteratively build websites using Stitch with an autonomous baton-passing loop patternallowed-tools:  - "stitch*:*"  - "chrome*:*"  - "Read"  - "Write"  - "Bash"---
SKILL.md:90来自说明文档打开原文件
   - After generating each screen, call `[prefix]:get_project` again and update the `screens` map in `.stitch/metadata.json` with each screen's full metadata (id, sourceScreen, dimensions, canvas position)3. **Generate screen**: Call `[prefix]:generate_screen_from_text` with:   - `projectId`: The project ID   - `prompt`: The full prompt from the baton (including design system block)   - `deviceType`: `DESKTOP` (or as specified)4. **Retrieve assets**: Before downloading, check if `.stitch/designs/{page}.html` and `.stitch/designs/{page}.png` already exist:
SKILL.md:133来自说明文档打开原文件
1. **Decide the next page**:    - Check `.stitch/SITE.md` Section 5 (Roadmap) for pending items   - If empty, pick from Section 6 (Creative Freedom)   - Or invent something new that fits the site vision2. **Write the baton** with proper YAML frontmatter:
examples/SITE.md:6来自说明文档打开原文件
> **AGENT INSTRUCTION:** Read this file before every iteration. It serves as the project's "Long-Term Memory." If `next-prompt.md` is empty, pick the highest priority item from Section 5 OR invent a new page that fits the project vision.
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

8 个说明模块

该 Skill 读取 baton、站点规划和设计文件,把完整 baton 内容发送给 Stitch 生成页面,并下载生成的 HTML 与截图。

查看原文
SKILL.md:63来自说明文档打开原文件
Parse `.stitch/next-prompt.md` to extract:- **Page name** from the `page` frontmatter field- **Prompt content** from the markdown body
SKILL.md:90来自说明文档打开原文件
   - After generating each screen, call `[prefix]:get_project` again and update the `screens` map in `.stitch/metadata.json` with each screen's full metadata (id, sourceScreen, dimensions, canvas position)3. **Generate screen**: Call `[prefix]:generate_screen_from_text` with:   - `projectId`: The project ID   - `prompt`: The full prompt from the baton (including design system block)   - `deviceType`: `DESKTOP` (or as specified)4. **Retrieve assets**: Before downloading, check if `.stitch/designs/{page}.html` and `.stitch/designs/{page}.png` already exist:   - **If files exist**: Ask the user whether to refresh the designs from the Stitch project or reuse the existing local files. Only re-download if the user confirms.   - **If files do not exist**: Proceed with download:     - `htmlCode.downloadUrl` — Download and save as `.stitch/designs/{page}.html`      - `screenshot.downloadUrl` — Append `=w{width}` to the URL before downloading, where `{width}` is the `width` value from the screen metadata (Google CDN serves low-res thumbnails by default). Save as `.stitch/designs/{page}.png`

生成的 HTML 会被移入公开站点,导航及所有页面的页眉、页脚也可能被修改;可选流程还会在本地浏览器中渲染该 HTML。

查看原文
SKILL.md:102来自说明文档打开原文件
1. Move generated HTML from `.stitch/designs/{page}.html` to `site/public/{page}.html`2. Fix any asset paths to be relative to the public folder3. Update navigation:   - Find existing placeholder links (e.g., `href="#"`) and wire them to the new page   - Add the new page to the global navigation if appropriate4. Ensure consistent headers/footers across all pages
SKILL.md:114来自说明文档打开原文件
1. **Check availability**: Run `list_tools` to see if `chrome*` tools are present2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`4. **Capture screenshot**: Call `[chrome_prefix]:screenshot` to capture the rendered page5. **Visual comparison**: Compare against the Stitch screenshot (`.stitch/designs/{page}.png`) for fidelity6. **Stop server**: Terminate the dev server process

该流程被设计为持续运行:每轮都必须写入下一项任务;若路线图为空,代理可自行选择或发明页面。它也可由 baton 文件变更触发 CI/CD。

查看原文
SKILL.md:129来自说明文档打开原文件
### Step 6: Prepare the Next Baton (Critical)**You MUST update `.stitch/next-prompt.md` before completing.** This keeps the loop alive.1. **Decide the next page**:    - Check `.stitch/SITE.md` Section 5 (Roadmap) for pending items   - If empty, pick from Section 6 (Creative Freedom)   - Or invent something new that fits the site vision2. **Write the baton** with proper YAML frontmatter:
SKILL.md:231来自说明文档打开原文件
| Method | How it works ||--------|--------------|| **CI/CD** | GitHub Actions triggers on `.stitch/next-prompt.md` changes || **Human-in-loop** | Developer reviews each iteration before continuing || **Agent chains** | One agent dispatches to another (e.g., Jules API) || **Manual** | Developer runs the agent repeatedly with the same repo |

安装说明使用未固定版本的 `npx` 命令,并要求全局安装来自远程仓库的 Skill。

查看原文
README.md:5来自说明文档打开原文件
## Install```bashnpx skills add google-labs-code/stitch-skills --skill stitch-loop --global```
从这里开始 · 工作说明SKILL.md
stitch-loop
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。 另有 1 个章节,可在原文件中查看。

文件引用关系图

1 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录6 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文
  • examples/next-prompt.md已纳入全文
  • examples/SITE.md已纳入全文
  • README.md已纳入全文
  • resources/baton-schema.md已纳入全文
  • resources/site-template.md已纳入全文

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

  • README.md配套文件
  • SKILL.md工作说明
  • examples/SITE.md配套文件
  • examples/next-prompt.md配套文件
  • resources/baton-schema.md配套文件
  • resources/site-template.md配套文件

代码和说明中提到的操作

运行命令
README.md:7来自说明文档打开原文件
```bashnpx skills add google-labs-code/stitch-skills --skill stitch-loop --global
SKILL.md:9来自说明文档打开原文件
  - "Write"  - "Bash"---
SKILL.md:114来自说明文档打开原文件
1. **Check availability**: Run `list_tools` to see if `chrome*` tools are present2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`
安装其他软件包
README.md:8来自说明文档打开原文件
```bashnpx skills add google-labs-code/stitch-skills --skill stitch-loop --global```
SKILL.md:114来自说明文档打开原文件
1. **Check availability**: Run `list_tools` to see if `chrome*` tools are present2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`
读取文件
SKILL.md:69来自说明文档打开原文件
Before generating, read these files:
examples/SITE.md:6来自说明文档打开原文件
> **AGENT INSTRUCTION:** Read this file before every iteration. It serves as the project's "Long-Term Memory." If `next-prompt.md` is empty, pick the highest priority item from Section 5 OR invent a new page that fits the project vision.
resources/site-template.md:10来自说明文档打开原文件
> **AGENT INSTRUCTION:** Read this file before every iteration. It serves as the project's "Long-Term Memory."
连接外部网站
SKILL.md:115来自说明文档打开原文件
2. **Start dev server**: Use Bash to start a local server (e.g., `npx serve site/public`)3. **Navigate to page**: Call `[chrome_prefix]:navigate` to open `http://localhost:3000/{page}.html`4. **Capture screenshot**: Call `[chrome_prefix]:screenshot` to capture the rendered page
读取了多少行
586
文件校验值(用于核对版本)
c5e03f731e6de2f0a206f749b054430a7dbb63ab989712449a5e3d75eff01199