跳转到正文
报告库
用途分类 / 开发辅助

Codex Pet Skill 安全审计

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

>

第三方安全检查结论

先别安装或运行

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

安装步骤会运行并全局安装第三方软件

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

安装命令通过 npx 运行远程包并使用全局选项安装技能和 RunComfy CLI;ImageMagick 安装还会修改系统或 Homebrew 软件环境。文本没有固定包版本或提交。

为什么需要注意

安装时获取的包及其生命周期脚本会以执行安装命令的用户权限运行。若包、发布账户或依赖被篡改,可能读取该用户可访问的数据或修改全局工具。

这些是明确的安装指令:npx 全局添加第三方技能、npm 全局安装 RunComfy CLI,并通过 Homebrew 或 apt 安装 ImageMagick。它们属于实现所需且由用户主动执行的正常前置步骤,但会运行下载的代码并修改全局或系统软件环境,而且示例没有固定版本。用户可在隔离环境中安装,并要求固定版本及包来源校验信息。

SKILL.md:30来自说明文档打开原文件
```bashnpx skills add agentspace-so/runcomfy-agent-skills --skill codex-pet -g```
查看另外 2 个位置
SKILL.md:93来自说明文档打开原文件
1. **RunComfy CLI** — `npm i -g @runcomfy/cli`2. **RunComfy account** — `runcomfy login`. CI alternative: `RUNCOMFY_TOKEN=<token>`.3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
SKILL.md:91来自说明文档打开原文件
## Prerequisites1. **RunComfy CLI** — `npm i -g @runcomfy/cli`2. **RunComfy account** — `runcomfy login`. CI alternative: `RUNCOMFY_TOKEN=<token>`.3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

源图片会交给 RunComfy 服务器获取和处理

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

命令把 SOURCE_URL 放入远程模型请求;安全说明也明确表示图片由 RunComfy 服务器获取。因此,这不是纯本地图片处理。

为什么需要注意

运行后,RunComfy 会获得图片内容及其 URL。若图片包含人脸、客户资料、内部设计或 URL 中的访问令牌,这些数据会离开本机。提供的文本没有说明保存期限、训练用途或其他处理方。

远程模型请求明确包含 SOURCE_URL,且安全说明称 RunComfy 服务器会获取该图片。因此图片内容和可访问 URL 会交给第三方处理;即使要求 URL 本来就是公开可取,也可能包含用户不希望第三方处理的人像或其他敏感内容。用户可只使用获准公开和处理的图片,并向作者询问 RunComfy 的保留、训练和删除政策。

SKILL.md:122来自说明文档打开原文件
    \"prompt\": \"Generate one canonical Codex digital pet sprite based on the input image. EXAGGERATED chibi proportions: the head occupies about 60 percent of the total figure height; body and legs are tiny stubby and short. The whole pet figure must fit within a near-square bounding box (overall aspect close to 1:1). Pixel-art-adjacent low-resolution mascot, chunky whole-body silhouette, thick dark 1-2 px outline, visible stepped pixel edges, limited palette, flat cel shading, simple expressive face, tiny limbs. Centered in the image. No polished illustration, no painterly render, no anime key art, no 3D render, no glossy app-icon polish, no realistic detail. Background: solid flat magenta ${CHROMA} chroma-key fill outside the pet silhouette. The pet itself must not use the chroma-key color or any close-to-magenta highlights. No gradients, no shadows, no halos, no scenery, no text. Identity preserved from the input image.\",    \"images\": [\"${SOURCE_URL}\"],    \"size\": \"1024*1024\"  }" \  --output-dir "${RUN_DIR}/decoded/"
查看另外 3 个位置
SKILL.md:344来自说明文档打开原文件
- **Input boundary**: Codex Pet prompts are passed as JSON via `--input`. The CLI does NOT shell-expand. No shell-injection surface.- **Third-party content**: source image URL is fetched by the RunComfy server. Treat external URLs as untrusted — image-based prompt injection is a known risk for any image-edit model.- **Outbound endpoints**: only `model-api.runcomfy.net` and `*.runcomfy.net` / `*.runcomfy.com`.- **Generated-file size cap**: the CLI aborts any single Codex Pet canonical download > 2 GiB.
SKILL.md:94来自说明文档打开原文件
1. **RunComfy CLI** — `npm i -g @runcomfy/cli`2. **RunComfy account** — `runcomfy login`. CI alternative: `RUNCOMFY_TOKEN=<token>`.3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
SKILL.md:119来自说明文档打开原文件
runcomfy run openai/gpt-image-2/edit \  --input "{    \"prompt\": \"Generate one canonical Codex digital pet sprite based on the input image. EXAGGERATED chibi proportions: the head occupies about 60 percent of the total figure height; body and legs are tiny stubby and short. The whole pet figure must fit within a near-square bounding box (overall aspect close to 1:1). Pixel-art-adjacent low-resolution mascot, chunky whole-body silhouette, thick dark 1-2 px outline, visible stepped pixel edges, limited palette, flat cel shading, simple expressive face, tiny limbs. Centered in the image. No polished illustration, no painterly render, no anime key art, no 3D render, no glossy app-icon polish, no realistic detail. Background: solid flat magenta ${CHROMA} chroma-key fill outside the pet silhouette. The pet itself must not use the chroma-key color or any close-to-magenta highlights. No gradients, no shadows, no halos, no scenery, no text. Identity preserved from the input image.\",    \"images\": [\"${SOURCE_URL}\"],    \"size\": \"1024*1024\"  }" \  --output-dir "${RUN_DIR}/decoded/"
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 2 项风险
高风险

未验证的宠物名称可使文件写到预期目录之外

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

PET_NAME 被直接拼入工作目录和安装目录,没有禁止 ../、斜杠或其他路径成分。随后脚本创建该路径,并无条件复制两个固定名称的文件。引号只能阻止单词拆分,不能阻止目录穿越。

为什么需要注意

如果名称受不可信输入影响,脚本可在当前用户有权限的位置创建目录,并覆盖其中已有的 pet.json 或 spritesheet.webp;目标不再局限于 Codex 的 pets 目录。

PET_NAME 直接成为相对工作路径和 Codex 安装路径的一部分,没有看到只允许安全文件名的校验。若名称包含“../”、斜杠或绝对路径成分,mkdir 和 cp 可能在预期宠物目录之外创建目录,并覆盖目标位置已有的 pet.json 或 spritesheet.webp(以当前用户权限为限)。引号不能阻止这种路径穿越。用户可要求作者限制为简单名称并验证解析后的目标仍在 pets 目录内。

SKILL.md:112来自说明文档打开原文件
```bashPET_NAME="my-pet"PET_DESC="A friendly companion for late-night refactors."SOURCE_URL="https://.../source.png"RUN_DIR="./codex-pet-run/${PET_NAME}"CHROMA="#FF00FF"   # magenta chroma-keymkdir -p "${RUN_DIR}"
查看另外 1 个位置
SKILL.md:242来自说明文档打开原文件
```bashDEST="${CODEX_HOME:-$HOME/.codex}/pets/${PET_NAME}"mkdir -p "${DEST}"cp "${RUN_DIR}/pet.json" "${RUN_DIR}/spritesheet.webp" "${DEST}/"echo "Codex Pet installed at ${DEST}"```
中风险

名称和描述未经 JSON 转义就写入清单

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

PET_NAME 和 PET_DESC 直接插入 heredoc 中的 JSON 字符串,没有使用 JSON 序列化器或转义步骤。变量中的引号、反斜杠或换行可结束字段或注入额外 JSON 内容。

为什么需要注意

特殊字符可能产生无效或被操纵的 pet.json,造成宠物加载失败,或使清单字段与用户看到的名称和描述不同。该文件随后会直接安装到 Codex 配置目录。

PET_NAME 和 PET_DESC 被直接展开到 heredoc 的 JSON 字符串中,没有 JSON 编码。若值含双引号、反斜杠、换行或构造的 JSON 片段,生成的 pet.json 会无效或包含非预期字段,可能改变 Codex 对清单的解释;这不是 shell 注入,因为 heredoc 内容不会作为命令再次执行。用户可要求用 JSON 序列化工具生成清单,并限制名称格式。

SKILL.md:112来自说明文档打开原文件
```bashPET_NAME="my-pet"PET_DESC="A friendly companion for late-night refactors."SOURCE_URL="https://.../source.png"
查看另外 2 个位置
SKILL.md:228来自说明文档打开原文件
```bashcat > "${RUN_DIR}/pet.json" <<EOF{  "id": "${PET_NAME}",  "displayName": "${PET_NAME}",  "description": "${PET_DESC}",  "spritesheetPath": "spritesheet.webp"}EOF```
SKILL.md:242来自说明文档打开原文件
```bashDEST="${CODEX_HOME:-$HOME/.codex}/pets/${PET_NAME}"mkdir -p "${DEST}"cp "${RUN_DIR}/pet.json" "${RUN_DIR}/spritesheet.webp" "${DEST}/"echo "Codex Pet installed at ${DEST}"
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
低风险

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

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

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

为什么需要注意

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

安装示例通过 npx 从仓库安装全局技能,但没有固定版本、标签或提交。用户日后运行同一命令时,取得的可能是仓库当时的新内容,而非本次审计所见内容。用户可要求作者提供固定提交哈希或经过校验的发布版本。

SKILL.md:31来自说明文档打开原文件
```bashnpx skills add agentspace-so/runcomfy-agent-skills --skill codex-pet -g```
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

8 个说明模块

该技能把公开可访问的源图片 URL 交给 RunComfy 的 GPT Image 2 编辑接口,生成一个基础姿势,再用本地 ImageMagick 生成动画图集。

查看原文
SKILL.md:96来自说明文档打开原文件
3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
SKILL.md:100来自说明文档打开原文件
1. **Canonical Codex Pet** — single `runcomfy run openai/gpt-image-2/edit` call producing one 1024x1024 chibi pose on a magenta chroma-key background.2. **Cell normalization** — chroma-key magenta → alpha 0, trim, aspect-fit into 192x208 with transparent padding.3. **9 row strips, programmatic** — for each of 9 animation states, build the row's 8 cells via ImageMagick micro-transforms (translate / mask / mirror) of the canonical cell. Trailing cells filled with transparent 192x208.4. **Atlas** — stack 9 row strips vertically into the 1536x1872 Codex Pet atlas.5. **WebP** — convert atlas PNG to WebP.6. **Manifest + install** — write `pet.json`, copy both files into `${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/`.

它会在当前目录创建中间文件,并把最终的 pet.json 和 spritesheet.webp 复制到用户的 Codex 配置目录。复制操作会替换目标目录中同名文件。

查看原文
SKILL.md:115来自说明文档打开原文件
SOURCE_URL="https://.../source.png"RUN_DIR="./codex-pet-run/${PET_NAME}"CHROMA="#FF00FF"   # magenta chroma-keymkdir -p "${RUN_DIR}"
SKILL.md:242来自说明文档打开原文件
```bashDEST="${CODEX_HOME:-$HOME/.codex}/pets/${PET_NAME}"mkdir -p "${DEST}"cp "${RUN_DIR}/pet.json" "${RUN_DIR}/spritesheet.webp" "${DEST}/"echo "Codex Pet installed at ${DEST}"```

使用前要求安装第三方 CLI 和 ImageMagick;交互登录会把 RunComfy API 令牌以 0600 权限保存在用户配置目录,CI 可改用环境变量。

查看原文
SKILL.md:93来自说明文档打开原文件
1. **RunComfy CLI** — `npm i -g @runcomfy/cli`2. **RunComfy account** — `runcomfy login`. CI alternative: `RUNCOMFY_TOKEN=<token>`.3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
SKILL.md:342来自说明文档打开原文件
- **Token storage**: `runcomfy login` writes the API token to `~/.config/runcomfy/token.json` with mode 0600. Set `RUNCOMFY_TOKEN` env var to bypass the file in CI.- **Input boundary**: Codex Pet prompts are passed as JSON via `--input`. The CLI does NOT shell-expand. No shell-injection surface.
从这里开始 · 工作说明SKILL.md
codex-pet
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。 另有 7 个章节,可在原文件中查看。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

读取密钥或账号配置
SKILL.md:16来自说明文档打开原文件
  ImageMagick micro-transforms — no Codex Pro, no `$imagegen`, no  OPENAI_API_KEY required, only RUNCOMFY_TOKEN. Triggers on "codex pet",  "create codex pet", "make codex pet", "hatch codex pet", "/hatch
SKILL.md:49来自说明文档打开原文件
**This Codex Pet skill is a drop-in alternative that runs via the RunComfy CLI**: a single `RUNCOMFY_TOKEN` plus `runcomfy` and `magick` binaries — no Codex Pro, no `$imagegen`, no OPENAI_API_KEY. The output Codex Pet artifact is identical — same `pet.json` shape, same `spritesheet.webp` 1536x1872 atlas, same 9 animation rows — so Codex treats this Codex Pet exactly like one made by `hatch-pet`.
连接外部网站
SKILL.md:20来自说明文档打开原文件
  explicit ask to build a custom pet for OpenAI Codex.homepage: https://www.runcomfy.comlicense: MIT
SKILL.md:26来自说明文档打开原文件
[runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=codex-pet) · [GPT Image 2 edit endpoint](https://www.runcomfy.com/models/openai/gpt-image-2/edit?utm_source=skills.sh&utm_medium=skill&utm_campaign=codex-pet) · [docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=codex-pet)
SKILL.md:47来自说明文档打开原文件
OpenAI ships an official [`hatch-pet`](https://github.com/openai/skills/blob/main/skills/.curated/hatch-pet/SKILL.md) skill that produces the same Codex Pet artifact via the Codex-internal `$imagegen` system skill (requires Codex Pro + `$imagegen` configured).
运行命令
SKILL.md:30来自说明文档打开原文件
```bashnpx skills add agentspace-so/runcomfy-agent-skills --skill codex-pet -g
SKILL.md:111来自说明文档打开原文件
```bashPET_NAME="my-pet"
SKILL.md:135来自说明文档打开原文件
```bashmagick "${BASE}" \
安装其他软件包
SKILL.md:31来自说明文档打开原文件
```bashnpx skills add agentspace-so/runcomfy-agent-skills --skill codex-pet -g```
SKILL.md:95来自说明文档打开原文件
2. **RunComfy account** — `runcomfy login`. CI alternative: `RUNCOMFY_TOKEN=<token>`.3. **ImageMagick** — `brew install imagemagick` (macOS) or `apt-get install imagemagick` (Linux). Provides the `magick` command for the deterministic atlas assembly.4. **A source image URL** — publicly fetchable HTTPS, JPEG/PNG/WebP, the subject the Codex Pet will be modeled on.
读取文件
SKILL.md:229来自说明文档打开原文件
```bashcat > "${RUN_DIR}/pet.json" <<EOF{
读取了多少行
348
文件校验值(用于核对版本)
0f51adbc6dbec587c86f868d5e0769dd72c52ff16141fef971655a8166f76bc2