ci: GitHub Actions のアクションを SHA 固定 + go-lint へ整理(CIサプライチェーン保護)#388
Open
taminororo wants to merge 3 commits into
Open
ci: GitHub Actions のアクションを SHA 固定 + go-lint へ整理(CIサプライチェーン保護)#388taminororo wants to merge 3 commits into
taminororo wants to merge 3 commits into
Conversation
- go-lint.yml / flutter-lint.yml の uses を SHA化 - go-lint.yml checkout に persist-credentials 追加
- lint.yml → go-lint.yml、name: lint → go-lint
📝 WalkthroughWalkthroughGitHub Actions の lint ワークフローで、Flutter と Go の action 参照がコミット SHA 固定に置き換わりました。Go ワークフローは name が ChangesCI ワークフロー更新
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Close #387
やったこと
CI のサプライチェーン保護として、(1) 両ワークフローのアクションをコミット SHA に固定し、(2)
go-lintの checkout で資格情報の永続化を無効化、(3) 固定 SHA が塩漬けになる逆リスクを Dependabot の自動更新で解消する。あわせてワークフロー名をgo-lintに整理した。コミットは関心事ごとに分割している。
SHA 固定の内訳(タグ → コミットSHA)
gh api repos/<repo>/commits/<tag>でタグが指すコミットを解決して固定。各行にバージョンコメントを併記した。加えて
go-lint.ymlの checkout にpersist-credentials: falseを追加(flutter-lint 側は #386 で対応済み)。Dependabot(固定の塩漬け対策)
SHA 固定は「タグ乗っ取りの自動実行」を防ぐ一方、固定 SHA が古いまま脆弱性修正を取りこぼす逆リスクがある。これを自動更新で解消する。Renovate は未インストール(GitHub Apps 一覧に無し)のため、GitHub ネイティブで追加インストール不要な Dependabot を採用した。
検証
この PR は
.github/のみの変更でapi/**もmobile/**も触らないため、両ワークフローは本 PR 上では発火しない(self-trigger しない)。実 CI での発火確認は、マージ後に api / mobile を変更する次の PR で行われる。Dependabot の初回稼働もマージ後。