ci: enforce immutable GitHub Action references#4
Merged
Conversation
lzm0x219
marked this pull request as ready for review
July 11, 2026 00:43
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.
变更摘要
将 GitHub Actions 的完整 Commit SHA 固定从人工约定升级为可执行的 CI 规则,并同步修复 GitHub App 标签同步文档。
主要修改
actions/create-github-app-token@v3固定为bcd2ba49218906704ab6c1aa796996da409d3eb1(v3.2.0);owner;.github/scripts/validate-action-pins.rb:.github/workflows/*.{yml,yaml};.github/actions/**/action.{yml,yaml};./引用和docker://引用;Validate repository references and governance scriptsJob;LABEL_SYNC_WRITE_TOKEN说明;APP_CLIENT_ID与APP_PRIVATE_KEY的 Environment 配置;根因
PR #3 已将现有第三方 Action 固定到完整 SHA,但随后切换 GitHub App Token 时重新引入了
actions/create-github-app-token@v3。这说明固定 SHA 仍只是人工约定,缺少自动化约束;同时 README 仍引用已经不再使用的静态写令牌,形成文档漂移。安全影响
@v3、@main、语义版本或其他非完整 SHA 引用,CI 将直接失败;验证
v3标签解析到bcd2ba49218906704ab6c1aa796996da409d3eb1(v3.2.0);owner/action@v3被准确拒绝并输出 GitHub Annotation;main提交20c8ea9,无落后提交。审查重点
APP_CLIENT_ID与APP_PRIVATE_KEY的 Environment 层级是否与当前仓库设置一致;