Skip to content

fix(cindy-github): 白名单新增 pipelines.actions.githubusercontent.com - #95

Closed
Shinku-Chen wants to merge 2 commits into
makecindy:mainfrom
Shinku-Chen:add-pipelines-actions-host
Closed

fix(cindy-github): 白名单新增 pipelines.actions.githubusercontent.com#95
Shinku-Chen wants to merge 2 commits into
makecindy:mainfrom
Shinku-Chen:add-pipelines-actions-host

Conversation

@Shinku-Chen

@Shinku-Chen Shinku-Chen commented Aug 24, 2026

Copy link
Copy Markdown

What changed / 改了什么

  • cindy-github/ghost.json: network.hostsapi.github.com / objects.githubusercontent.com / *.blob.core.windows.net 基础上,新增 pipelines.actions.githubusercontent.com;版本号 1.2.71.2.9
  • .tests/cindy-github.test.mjs: 同步版本断言 1.2.71.2.9

Why / 为什么

download_run_logs 操作请求 api.github.com/.../actions/runs/{id}/logs 时,GitHub 返回 302 重定向到 pipelines.actions.githubusercontent.com。该域名不在 ghost.jsonnetwork.hosts 白名单中,于是 Cindy 主机网络层会把重定向拦截为「重定向超出了本 agent 的域名白名单,已阻断」——导致用户只能下载到 Actions 产物、却拿不到 workflow run 的真实日志。

这一个拦截点能阻断完整的排障链路。实际案例:一套固件构建 workflow 在 main 分支正常产出 .bin 产物,但在 feature 分支上出现「Build firmware 步骤标绿、宿主工作区 build/ 里却没有任何 .bin」的假绿现象。要定位为何同一份干净 workflow 在 feature 上编译无产物(feature 用了自定义 4MB partition 与生字大字体数据),必须看到容器内 idf.py build 的真实输出,而唯一可靠来源正是 workflow run 日志。白名单拦截 pipelines.actions.githubusercontent.com 后,这条日志直接拿不到,只能靠反复盲改 workflow 猜根因——这是把日志下载能力补进白名单的直接动机。

本次按能力最小化原则,用精确域名 pipelines.actions.githubusercontent.com 加入白名单,与既有处理方式(见 #77results-receiver.actions.githubusercontent.com 的处理)保持一致,仅覆盖已验证的重定向目标,不扩大通配范围。

Checklist

  • Reviewed the complete diff — no credentials, tokens, authorization codes, real user data, unrelated generated files, or node_modules
  • ghost.json declares only capabilities actually used (network hosts / slots / secrets); any new capability is justified in this PR description。
  • Tools with irreversible external side effects handle every failure path as "not executed / executed / unknown", and never suggest a blind retry on "unknown".(不涉及,本次未改动工具逻辑)
  • Every changed tool description still matches actual behavior.(不改工具行为)
  • Bumped ghost.json version for every plugin whose packaged content changed. 1.2.71.2.9
  • Ran node --test .tests/localization.test.mjs → 3/3 pass
  • Ran node --test .tests/cindy-github.test.mjs → 3/3 pass
  • Rebuilt node/worker.cjs — N/A(src/ 无改动)
  • Updated THIRD-PARTY-LICENSES.txt — N/A(无依赖变更)
  • Every commit is signed off (git commit -s)

Tool declaration changes / 工具声明改动

不涉及

Verification / 验证

# 本地化测试
$ node --test .tests/localization.test.mjs
✔ all official plugins provide complete host-driven locale resources
✔ plugins never infer language from the browser or operating system
✔ comment stripping keeps self-policing comments legal and real reads illegal
ℹ pass 3 / fail 0

# cindy-github 插件测试
$ node --test .tests/cindy-github.test.mjs
✔ manifest pins host GitHub login injection to the GitHub API
✔ connection tests never cache an identity that the plugin cannot attribute atomically
✔ settings show only host availability and fallback-token storage state
ℹ pass 3 / fail 0

Sensitive changes / 敏感变更

新增一个 network 白名单域名 pipelines.actions.githubusercontent.com(精确域名,能力最小化)。其余无依赖 / 凭证 / OAuth scope / 二进制 / audience / minCindyVersion 变更。

Signed-off-by: Shinku <17696928+Shinku-Chen@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

敏感变更,需要维护者人工 review。本 PR 为 Cindy GitHub 插件补充 GitHub Actions 日志下载所需的精确重定向域名,并同步递增发布版本。

  • network.hosts 新增 pipelines.actions.githubusercontent.com
  • 插件版本由 1.2.7 更新为 1.2.9
  • 测试中的版本断言同步更新

Confidence Score: 5/5

未发现阻断性故障,代码层面可安全合并,但新增网络能力仍需按仓库策略由维护者人工 review。

当前变更使用精确域名支持既有日志下载重定向,版本与测试断言保持一致,没有阻断性失败仍然存在。

Important Files Changed

Filename Overview
cindy-github/ghost.json 新增 GitHub Actions 日志重定向的精确白名单域名并将版本递增至 1.2.9,未发现阻断性缺陷。
.tests/cindy-github.test.mjs 将 manifest 版本断言同步更新至 1.2.9,未改变其他测试行为。

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@nanaco666

Copy link
Copy Markdown
Collaborator

当前合并门禁未通过(head d116b72

新 PR 已进入巡检,当前状态:

  • Greptile 已对当前 head 复审为 5/5(Last reviewed commit 即当前 head)并自动 Approve;无未解决 review thread。
  • Verify pull request 对当前 head 为 action_required(run 32744162652):Repository-wide gates、changed-plugin packaging、Cindy Plugin Review 均未产生针对当前 head 的 CI 证据;DCO 通过。
  • approving review 目前仅有 Greptile 自动审批,尚缺维护者人工 approving review。

新增网络白名单域名属于敏感变更,请批准并跑绿 Verify workflow,并完成人工 review 后正式 Approve;完成前请勿合并。

Signed-off-by: Shinku <17696928+Shinku-Chen@users.noreply.github.com>
@Shinku-Chen

Copy link
Copy Markdown
Author

本 PR 的改动已并入 #77pipelines.actions.githubusercontent.com 域名 + 版本号 1.2.9),两个 PR 合并为一个能力最小化的网络白名单修复,避免分别 bump 版本造成冲突。本 PR 关闭,后续在 #77 继续评审与合并。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants