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

Diagnose Ci Failures Skill 安全审计

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

Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.

第三方安全检查结论

发现安全风险

已检查文件
1
发现的风险
2
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

失败日志中的秘密可能被复制进计划文档

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

工作流要求提取完整错误消息、堆栈跟踪和构建根因,并把发现写入计划,却没有要求识别或遮盖令牌、凭据、私有 URL、环境变量值或其他敏感日志内容。

为什么需要注意

如果 CI 已把秘密写进失败日志,生成的计划可能进一步保存或展示这些值,扩大可见范围并延长敏感数据的留存时间。该风险不表示日志中一定存在秘密。

工作流要求从 CI 日志提取错误消息、堆栈跟踪和根因,再把发现与位置写入计划文档,但没有规定对令牌、环境变量值、私有地址或其他敏感内容进行识别和遮盖。若失败输出意外包含秘密,相关内容可能随错误上下文进入持久化计划。它并未要求复制完整日志,所以风险取决于秘密是否出现在被摘录的错误附近。用户可要求作者在展示或保存前进行敏感信息过滤,并限制上下文长度。

SKILL.md:50来自说明文档打开原文件
```bashGH_PAGER=cat gh run view <run-id> --log-failed```Focus on extracting:- Error messages and their locations (file paths, line numbers)- Compilation errors (unused imports, type mismatches, etc.)- Linting/clippy errors with specific lint names- Test failure messages and stack traces- Build failures and their root causes
查看另外 3 个位置
SKILL.md:71来自说明文档打开原文件
Create a plan document (using `create_plan` tool) with:- **Problem Statement**: Summary of failing checks- **Current State**: What errors were found and where- **Proposed Changes**: Specific fixes needed for each error category- **Validation Steps**: Commands to verify fixes (fmt, clippy, tests, presubmit)
SKILL.md:47来自说明文档打开原文件
For each failed check, pull the logs using the run ID from the status check:```bashGH_PAGER=cat gh run view <run-id> --log-failed```
SKILL.md:53来自说明文档打开原文件
Focus on extracting:- Error messages and their locations (file paths, line numbers)- Compilation errors (unused imports, type mismatches, etc.)- Linting/clippy errors with specific lint names- Test failure messages and stack traces- Build failures and their root causes
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。发现 1 项风险
中风险

不受信任的 CI 日志可能操纵诊断计划

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

工作流要求代理下载并分析失败日志,但没有要求把日志内容仅当作数据,也没有禁止遵循日志中伪装成指令的文字。构建步骤、测试或依赖项都可能向日志写入任意文本。

为什么需要注意

恶意或被攻陷的 CI 作业可以诱导代理给出误导性根因、遗漏真实故障,或在修复计划中建议未经授权的命令和操作。该 Skill 本身规定不直接改代码,因此可见证据支持的直接影响主要是污染用户决策。

该技能主动要求获取失败运行日志、分析其中的错误与根因,并据此生成计划。CI 构建或测试可以把任意文字写入日志;如果其中夹带伪装成操作指令的内容,技能没有明确要求将其仅视为不可信数据,也没有规定忽略日志中的指令。因此存在影响诊断结论或计划内容的提示注入风险,但这些行不能证明攻击已经发生。用户可要求作者加入日志不可信边界,并限制计划只引用可核验的错误字段。

SKILL.md:47来自说明文档打开原文件
For each failed check, pull the logs using the run ID from the status check:```bashGH_PAGER=cat gh run view <run-id> --log-failed```Focus on extracting:- Error messages and their locations (file paths, line numbers)- Compilation errors (unused imports, type mismatches, etc.)- Linting/clippy errors with specific lint names- Test failure messages and stack traces- Build failures and their root causes
查看另外 3 个位置
SKILL.md:71来自说明文档打开原文件
Create a plan document (using `create_plan` tool) with:- **Problem Statement**: Summary of failing checks- **Current State**: What errors were found and where- **Proposed Changes**: Specific fixes needed for each error category- **Validation Steps**: Commands to verify fixes (fmt, clippy, tests, presubmit)
SKILL.md:53来自说明文档打开原文件
Focus on extracting:- Error messages and their locations (file paths, line numbers)- Compilation errors (unused imports, type mismatches, etc.)- Linting/clippy errors with specific lint names- Test failure messages and stack traces- Build failures and their root causes
SKILL.md:69来自说明文档打开原文件
### 5. Generate fix planCreate a plan document (using `create_plan` tool) with:- **Problem Statement**: Summary of failing checks- **Current State**: What errors were found and where- **Proposed Changes**: Specific fixes needed for each error category- **Validation Steps**: Commands to verify fixes (fmt, clippy, tests, presubmit)
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

5 个说明模块

该 Skill 使用当前环境中的 GitHub CLI 身份,先读取当前分支对应的 PR 和 CI 检查状态,再按运行 ID 下载失败日志。这里展示的命令均为读取操作,没有推送、合并或修改 GitHub 状态。

查看原文
SKILL.md:22来自说明文档打开原文件
# Get current branchgit branch --show-current# Check for PRGH_PAGER=cat gh pr view <branch-name> --json number,title,url,state```
SKILL.md:34来自说明文档打开原文件
```bashGH_PAGER=cat gh pr view <branch-name> --json statusCheckRollup```
SKILL.md:47来自说明文档打开原文件
For each failed check, pull the logs using the run ID from the status check:```bashGH_PAGER=cat gh run view <run-id> --log-failed```

该 Skill 的预期输出是供用户审阅的修复计划,而不是直接改代码;计划会总结失败检查、错误位置、建议修改和验证命令。

查看原文
SKILL.md:69来自说明文档打开原文件
### 5. Generate fix planCreate a plan document (using `create_plan` tool) with:- **Problem Statement**: Summary of failing checks- **Current State**: What errors were found and where- **Proposed Changes**: Specific fixes needed for each error category- **Validation Steps**: Commands to verify fixes (fmt, clippy, tests, presubmit)
SKILL.md:81来自说明文档打开原文件
- **GitHub CLI paging**: Set `GH_PAGER=cat` on every `gh` invocation. The GitHub CLI does not support `--no-pager` as a global option; `GH_PAGER` and `PAGER` are its documented paging controls- **Always create a plan first**: Never make code changes directly. Generate a plan for user review- **Check test status in CI**: Even if tests fail locally, verify they passed in CI before flagging as issues
从这里开始 · 工作说明SKILL.md
diagnose-ci-failures
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文

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

  • SKILL.md工作说明

代码和说明中提到的操作

运行命令
SKILL.md:20来自说明文档打开原文件
```bash# Get current branch
SKILL.md:34来自说明文档打开原文件
```bashGH_PAGER=cat gh pr view <branch-name> --json statusCheckRollup
SKILL.md:49来自说明文档打开原文件
```bashGH_PAGER=cat gh run view <run-id> --log-failed
读取文件
SKILL.md:25来自说明文档打开原文件
# Check for PRGH_PAGER=cat gh pr view <branch-name> --json number,title,url,state```
SKILL.md:35来自说明文档打开原文件
```bashGH_PAGER=cat gh pr view <branch-name> --json statusCheckRollup```
SKILL.md:50来自说明文档打开原文件
```bashGH_PAGER=cat gh run view <run-id> --log-failed```
读取了多少行
114
文件校验值(用于核对版本)
2304f59632a77c02e638124069696f562a4a9e1c4b8a73cbb503fd939c2bfb98