chore: enforce SHA pin via zizmor#7
Merged
Merged
Conversation
Workflow-level `contents: write` grants the token to every step in
every job, including `actions/checkout`. Narrow it to the two jobs
that actually need it (`update-major-tag` for `git push -f` and
`create-release` for `softprops/action-gh-release`) and default the
workflow to `permissions: {}` (no permissions).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add zizmorcore/zizmor-action to the lint job and run it with `min-severity: high`. This makes the SHA-pin policy established in #5 enforceable in CI (the `unpinned-uses` audit is high severity) and also catches other high-severity Actions security issues such as `excessive-permissions` and `impostor-commit`. `advanced-security: false` skips the SARIF upload step (the repo does not have GitHub Code Scanning enabled) and `annotations: true` surfaces findings as inline workflow annotations instead. Renamed the job from `ShellCheck` to `Lint` to reflect the broader scope. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
mock sync output |
|
mock sync output |
|
mock sync output |
|
mock sync output |
3 tasks
yebis0942
approved these changes
May 27, 2026
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.
Summary
.github/workflows/test.ymlのlintjob にzizmorcore/zizmor-actionを追加し、min-severity: highで CI fail させる。これにより Pin third-party actions to full-length commit SHAs #5 で定めた SHA pin ポリシーを CI で強制(unpinned-usesaudit は high severity)し、ついでにexcessive-permissions/impostor-commitなどの致命的な Actions セキュリティ違反も検出する。excessive-permissions(release.ymlの workflow-levelcontents: write)を解消するため、permissions: {}を workflow デフォルトにして、必要な 2 つの job(update-major-tag/create-release)に個別でcontents: writeを付与する形に変更。zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6。advanced-security: falseで SARIF upload をスキップし(このリポは Code Scanning 未有効)、annotations: trueで違反を GitHub の inline annotation として表示する。ShellCheck→Lintに変更(zizmor と並ぶ実態に合わせて)。他 job からは job IDlintで参照しているため互換。なぜ別 PR か
PR #6 (actionlint 追加) とは目的が異なるため別 PR。actionlint は workflow / inline shell の構文・スキーマ linter で、pin 形式は検出しない。両 PR とも
lintjob を触るため、後にマージされる側で rebase 解消する想定。Verification
zizmor . --min-severity highおよびzizmor . --min-severity high --no-online-auditsの両方で findings 0、exit 0 を確認済み。bats/integration/cli-installjob への影響なし。zizmorステップが pass することを確認する。Test plan
Testworkflow が全 job 成功することLintjob 内で zizmor ステップが追加され pass すること(unpinned-uses違反 0 件)release.ymlの YAML が壊れておらず、tag push 時のReleaseworkflow が将来も動くこと(実 release tag push まではこの PR では検証しない)🤖 Generated with Claude Code