fix(cindy-github): 白名单新增 pipelines.actions.githubusercontent.com - #95
Closed
Shinku-Chen wants to merge 2 commits into
Closed
fix(cindy-github): 白名单新增 pipelines.actions.githubusercontent.com#95Shinku-Chen wants to merge 2 commits into
Shinku-Chen wants to merge 2 commits into
Conversation
Signed-off-by: Shinku <17696928+Shinku-Chen@users.noreply.github.com>
|
| 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
Collaborator
当前合并门禁未通过(head d116b72)新 PR 已进入巡检,当前状态:
新增网络白名单域名属于敏感变更,请批准并跑绿 Verify workflow,并完成人工 review 后正式 Approve;完成前请勿合并。 |
Signed-off-by: Shinku <17696928+Shinku-Chen@users.noreply.github.com>
11 tasks
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed / 改了什么
cindy-github/ghost.json:network.hosts在api.github.com/objects.githubusercontent.com/*.blob.core.windows.net基础上,新增pipelines.actions.githubusercontent.com;版本号1.2.7→1.2.9.tests/cindy-github.test.mjs: 同步版本断言1.2.7→1.2.9Why / 为什么
download_run_logs操作请求api.github.com/.../actions/runs/{id}/logs时,GitHub 返回 302 重定向到pipelines.actions.githubusercontent.com。该域名不在ghost.json的network.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加入白名单,与既有处理方式(见 #77 对results-receiver.actions.githubusercontent.com的处理)保持一致,仅覆盖已验证的重定向目标,不扩大通配范围。Checklist
node_modules。ghost.jsondeclares only capabilities actually used (network hosts / slots / secrets); any new capability is justified in this PR description。descriptionstill matches actual behavior.(不改工具行为)ghost.jsonversionfor every plugin whose packaged content changed.1.2.7→1.2.9node --test .tests/localization.test.mjs→ 3/3 passnode --test .tests/cindy-github.test.mjs→ 3/3 passnode/worker.cjs— N/A(src/无改动)THIRD-PARTY-LICENSES.txt— N/A(无依赖变更)git commit -s)Tool declaration changes / 工具声明改动
不涉及
Verification / 验证
Sensitive changes / 敏感变更
新增一个 network 白名单域名
pipelines.actions.githubusercontent.com(精确域名,能力最小化)。其余无依赖 / 凭证 / OAuth scope / 二进制 / audience / minCindyVersion 变更。