Repository navigation
ci: add shared gha-lint, dependency-review and nix-lint workflows - #9
Conversation
Add reusable gha-lint.yml, dependency-review.yml and nix-lint.yml, call them from ci.yml and gate all-green on them. Remove the per-repository gha_lint.yml, dependency_review.yml and its config file. Skip codeql on private repositories and bump its pins. Allow the new names in ls-lint and document the workflows in the README. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryNo blocking findings. What I checked:
Not verified (I had no network access while reviewing): that the pinned SHAs match the tags in their comments, and that zizmor finds workflows under the staged |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2895d625cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fail-on-error: true | ||
| shellcheck: true | ||
| pyflakes: true | ||
| files: ${{ inputs.workflow-template-dir != '' && format('.github/workflows/*.yml,{0}/*.yml', inputs.workflow-template-dir) || '' }} |
There was a problem hiding this comment.
Preserve .yaml workflows in the actionlint file list
When a caller sets workflow-template-dir, this explicit files value replaces actionlint's automatic repository discovery but includes only .github/workflows/*.yml. Consequently, valid .github/workflows/*.yaml files are silently excluded from actionlint, including its shellcheck and pyflakes checks. The action wrapper documents files as replacement glob patterns, while actionlint normally discovers every repository workflow when no paths are supplied; include both supported extensions in the custom list.
Useful? React with 👍 / 👎.
| uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1 | ||
| with: | ||
| advanced-security: false |
There was a problem hiding this comment.
Pass staged templates to zizmor explicitly
When workflow-template-dir is set, the preceding step copies its files beneath .zizmor-templates/.github/workflows, but this invocation leaves zizmor's input at its default .. The action documents that default input, and zizmor's directory-collection rules exclude nested .github/workflows directories when . is a Git repository root because those files are not active repository workflows. Thus the staged templates are never security-audited; pass the staging directory or files through the action's inputs option.
Useful? React with 👍 / 👎.
…s in zizmor Run actionlint and zizmor on the template directory in their own steps so the default discovery of .github/workflows (including .yaml files) is kept and the staged templates are passed to zizmor explicitly. Ignore zizmor's self-repository finding for ci.yml, which calls local reusable workflows with ./ on purpose. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
| with: | ||
| advanced-security: false | ||
|
|
||
| - name: Stage workflow templates for discovery |
There was a problem hiding this comment.
P3: The workflow-template-dir path is never exercised. This repo's ci.yml calls gha-lint.yml without the input, so the second actionlint run, this staging step and the second zizmor run are all skipped in CI here. Any breakage only shows up in a downstream caller, for example zizmor's directory discovery for .zizmor-templates/.github/workflows or cp failing when the directory has no *.yml files. A small fixture directory (for example .github/test-templates/sample.yml) plus a second caller job that sets workflow-template-dir would cover it.
There was a problem hiding this comment.
fixture と専用ジョブは入れないことにしました.workflow-template-dir の経路は,dotfiles への展開時にその repo の CI(実際の templates/*.yml)で確かめます.
Review summaryNo blocking findings (P0: 0, P1: 0). What I checked:
Findings:
Note: removing the old path filters means gha-lint now runs on every PR and push. That looks intended. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Add a sample template and a second gha-lint caller job that sets workflow-template-dir, so the template actionlint, staging and zizmor steps run in this repository's CI. Gate all-green on the new job. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
Review summary: no findings. Checked:
Not verified: I couldn't read the PR's check results from this environment, so confirm the new jobs are green (in particular that zizmor accepts the |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Remove the sample template and the gha-lint-templates job; the workflow-template-dir path is verified when rolling out to dotfiles. Replace .github/zizmor.yml with inline zizmor: ignore[self-repository] comments on the local reusable workflow calls in ci.yml. Add a README section that separates shared workflows from those for this repository. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Use $/.github/workflows/... instead of ./.github/workflows/... in ci.yml and drop the zizmor ignore comments, which are no longer needed. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| gha-lint: | ||
| uses: $/.github/workflows/gha-lint.yml |
There was a problem hiding this comment.
P0 — uses: $/.github/workflows/gha-lint.yml is not a valid reusable-workflow reference. A local reusable workflow has to start with ./. The same $/ prefix appears on all five uses: lines (lines 21, 27, 32, 37, 45), including the claude-review and codex-review lines, which used to be ./. GitHub will reject the whole ci.yml as an invalid workflow, so no job runs and all-green never reports. That blocks every PR, and this PR's own checklist can't pass. It looks like a broken substitution of ./.
| uses: $/.github/workflows/gha-lint.yml | |
| uses: ./.github/workflows/gha-lint.yml |
(Apply the same fix to the dependency-review, nix-lint, claude-review and codex-review lines.)
There was a problem hiding this comment.
ci.yml の 5 行を ./ に戻し,各行に # zizmor: ignore[self-repository] を付けました.$/ は GitHub では有効ですが,actionlint が未対応(rhysd/actionlint#711)のため,対応後に $/ へ切り替えて抑制を外します.
Review summary1 blocking finding (P0)
The new reusable workflows themselves look fine:
No other findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c9b59eeb9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| gha-lint: | ||
| uses: $/.github/workflows/gha-lint.yml |
There was a problem hiding this comment.
Keep self-references compatible with actionlint
Although GitHub accepts the new $/ syntax, the Run actionlint step in gha-lint.yml invokes the Raven wrapper with fail-on-error: true and no version or ignore override. The wrapper therefore downloads the latest actionlint release, while actionlint's open support issue confirms that it does not yet recognize $/ references. Consequently, scanning ci.yml reports this and the other self-references as invalid, causing gha-lint and then all-green to fail on every push and pull request; retain ./ references with the zizmor suppressions or configure actionlint appropriately until support is released.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
ご指摘のとおり,ci.yml の 5 行を ./ に戻し,各行に # zizmor: ignore[self-repository] を付けました.actionlint の
actionlint does not support the $/ self-repository syntax yet (rhysd/actionlint#711), so gha-lint failed on ci.yml. Go back to ./.github/workflows/... and suppress zizmor's self-repository audit on each call until actionlint supports $/. Refs #6 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
Review summary: I found no P0–P3 issues. What I checked:
Things to know:
|
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
概要
gha-lint,dependency-review,nix-lintを reusable workflow として追加し,この repo のci.ymlから呼んでall-greenのneedsに入れる.各 repo の個別ファイルは,この workflow を呼ぶ形へ順次置き換える(#6 のステップ 1).変更内容
gha-lint.yml: actionlint と zizmor.任意の入力workflow-template-dir(既定は空)を指定すると,そのディレクトリの*.ymlも検査するdependency-review.yml: 常に動く判定ジョブで,pull_requestかつ公開 repo のときだけ review する.入力fail-on-severityの既定はhigh.設定ファイルは使わないnix-lint.yml: nixfmt,statix,deadnix(手順は現行と同じ)ci.yml: 3 つを./.github/workflows/...で呼び,all-greenのneedsに block 形式で追加gha_lint.yml,dependency_review.yml,.github/dependency_review_config.ymlを削除codeql.yml: analyze ジョブにif: ${{ !github.event.repository.private }}を追加し,pin を更新.ls-lint.yml: 新しいハイフン名を許可README.md: 3 workflow の節と呼び出し例を追加固定した版
checkout v7.0.1,actionlint v2.2.0,zizmor v0.8.1,dependency-review-action v5.0.0,install-nix-action v31.11.3,codeql-action v4.39.2(すべて full SHA)
確認すること
all-greenが successRefs #6
🤖 Generated with Claude Code