Repository navigation
ci: fix template injections and harden the shared workflows - #248
Merged
Merged
Conversation
Caller inputs expanded directly into run blocks (zizmor: 8 high template-injection findings): composer-args and test-command in ci-php, glob in ci-markdown, and config-file in apply-org-config. Inputs now reach the shell through env; test-command keeps its run-anything contract via eval. apply-org-config had a single consumer (ci-markdown) and needed a remote SHA self-pin that could never include its own latest fix, so its fetch is inlined there and the action removed. README documents the remaining setup-toolchain action instead.
No workflow pushes with checkout-persisted credentials: publish-node releases via the API token and repo-sync uses its own PAT.
min-severity defaults to medium so adopting repos are not blocked by their existing low-severity findings; this repo runs it at low. The self-repository audit is ignored with reason: actionlint (<= 1.7.12) rejects the suggested $/ syntax for the local workflow calls.
This was referenced Dec 1, 2026
Merged
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.
renovate-config に導入した zizmor で共有ワークフロー側も監査したところ、template-injection(HIGH)8 件を検出したため修正する。
コミット構成(各単体で green):
fix:caller inputs の run ブロック直接展開を env 経由に変更 — ci-php のcomposer-args(env + 意図的 word splitting)とtest-command(env +eval、「任意コマンド実行」の契約は維持)、ci-markdown のglob、apply-org-config のconfig-file。apply-org-config は利用箇所が ci-markdown の 1 箇所のみで、リモート SHA 自己ピンでは自身の修正を取り込めない構造だったため、ci-markdown にインライン化して action を削除(README の表は未記載だった setup-toolchain に差し替え)ci:全 12 checkout にpersist-credentials: false(push 系は API トークン / PAT 認証で、checkout credential は未使用と確認済み)ci:再利用可能な ci-zizmor.yml を追加(min-severity入力、デフォルト medium — 採用リポジトリが既存の low findings で即赤にならないように)。このリポジトリ自身は low で自己監査。self-repository 監査は actionlint が$/構文未対応のため理由付き ignore(renovate-config#72 と同件)検証: actionlint green、zizmor 0 findings(45 → 0、ignore は self-repository の 2 箇所のみ)。
備考
actions/setup-toolchain(未使用・未文書だった)は renovate-config の.github/actions/setupと同型。統合は別途ci.ymlが mutable な@v1タグ(古いコミット 8472a07 を指す)参照なのは別 PR で対応予定