Repository navigation
feat(hooks): run zizmor offline after workflow edits - #295
Merged
Merged
Conversation
Lint workflow files with zizmor --offline after actionlint so agent edits get security findings without calling the GitHub API. Add actionlint to the dev shell so lefthook works under nix develop. Refs #264 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
3 tasks
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.
概要
agent が
.github/workflows/のワークフローを編集した直後に,actionlint に続けてzizmor --offlineを実行する.あわせて dev shell に actionlint を追加する.背景
編集フックは actionlint しか実行しておらず,zizmor の指摘(権限過多,テンプレートインジェクションなど)はコミット後の CI まで分からなかった.オフラインモードは GitHub API を呼ばず,1 ファイルあたり約 0.03 秒で終わる.また
lefthook.ymlは actionlint を実行するが,dev shell には入っていなかった.変更内容
agents/hooks/lib/formatter_policy.py:actionlint_planをworkflow_planに改名し,ghaキーはそのまま維持.ワークフロー YAML にactionlint -oneline→zizmor --offline --no-progress --format plainの順で 2 ステップを返す.zizmor は指摘があると非ゼロで終了するため,actionlint と同じく失敗として扱われる.ツール未導入時の動作は他のステップと同じflake.nix:dev shell の packages にactionlintを追加確認
uv run --frozen pytest tests/agents:2299 件成功nix flake check:成功Refs #264
🤖 Generated with Claude Code