ci: ワークフロー静的解析(actionlint / zizmor)を追加(#23)#68
Merged
Conversation
📝 WalkthroughWalkthroughTODO.md で、未対応・進行中の Issue 一覧を差し替え、解決済み Issue の備考一覧に Issue ChangesTODO.md更新
Estimated code review effort: 1 (Trivial) | ~2 minutes 関連Issue: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ 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 |
caae954 to
9135319
Compare
- .github/workflows/lint-workflows.yml(新規): workflow 変更時に actionlint
(構文/式 + run: の shellcheck)と zizmor(injection/過剰権限/artipacked 等の
セキュリティ監査、リポ全体 `.`)を実行。両ツールとも SHA/バージョンピンした
バイナリを run: で回し 3rd-party action を増やさない
- actionlint: download-actionlint.bash(script SHA=v1.7.12)+ binary 1.7.12。
dist/ はリリース時ビルドで未コミットのため `main` 不在の false positive を -ignore
- zizmor: pipx run zizmor==1.26.1(runner プリインストール)
- ci.yml: zizmor の excessive-permissions(High)を解消。workflow レベルの
id-token/pull-requests write を check(Codecov)/ changes(paths-filter)へ
job-scoped 化(least-privilege)
- dependabot.yml: cooldown(default-days: 7)を追加(zizmor dependabot-cooldown、
pnpm minimumReleaseAge と同じ供給網 cooldown 思想)
- TODO.md: #23 を解決済み(#68)へ
ローカルで actionlint(dist 不在再現)/ zizmor(`.` + GH_TOKEN、CI 一致)とも clean 確認。
Closes #23
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AECzAv2vcdATecuvLjBSa6
9135319 to
d8835ea
Compare
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.
概要
ワークフローのセキュリティ/構文が手動監査のみだったため、継続的な自動検出を追加する(#23)。core は actionlint(構文/式 +
run:の shellcheck)+ zizmor(injection / 過剰権限 / artipacked 等のセキュリティ監査)。変更内容
.github/workflows/lint-workflows.yml(新規): workflow 変更時(paths: .github/workflows/**)に actionlint と zizmor を実行。両ツールとも SHA/バージョンをピンしたバイナリをrun:で回し、3rd-party action を増やさない(SHA ピン規約に完全準拠)download-actionlint.bash(script を SHA=v1.7.12 でピン)+ binary1.7.12pipx run zizmor==1.26.1(pipx は runner プリインストール、findings で非0 exit)ci.yml: zizmor の excessive-permissions(High)を解消。workflow レベルのid-token: write/pull-requests: writeを、実際に使うcheck(Codecov OIDC/PR コメント)とchanges(paths-filter)ジョブへ job-scoped に移動(least-privilege — 実際にセキュリティ向上)TODO.md: [ci] ワークフロー静的解析(actionlint / zizmor)を CI に追加 #23 を解決済みへ設計判断(actver エージェントで canonical 確認)
actions/checkoutのみに保つ検証
参照
🤖 Generated with Claude Code
Summary by cubic
GitHub Actions にワークフロー静的解析を追加し、CI の権限を最小化しました。
actionlintとzizmorを導入し、ci.ymlのpermissionsをジョブ単位に移して過剰権限を解消。Closes #23New Features
.github/workflows/lint-workflows.yml: ワークフロー変更時のみ実行。actionlint(構文/式 +run:の shellcheck)とzizmor(注入/過剰権限など)を実行。run:で固定バージョン実行し 3rd-party Action を追加しない。actionlint1.7.12(installer script は SHA 固定)、zizmor1.26.1。Refactors
ci.ymlのpermissionsをジョブスコープへ移動して最小化。changesはpull-requests: read、checkはid-token: write/pull-requests: write。.github/dependabot.ymlにcooldown.default-days: 7を追加し、供給網のクールダウンを設定(pnpmのminimumReleaseAgeに揃える)。Written for commit d8835ea. Summary will update on new commits.