From 021be26249bd2bfc103dad1a6936c9e42aa685f2 Mon Sep 17 00:00:00 2001 From: Ryuuji Yoshimoto Date: Sat, 1 Aug 2026 23:03:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(ci):=20=E3=82=BB=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=81=8C=E8=B5=B7=E5=8B=95=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E7=9B=B4=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解説文の中にテンプレート式の記法をリテラルで書いていたため、 Actions がそれを式として評価しようとして構文エラーになり、 ワークフロー全体が起動できていなかった(ジョブが1つも作られず failure)。 リテラル表記をやめ、日本語の説明に置き換える。 Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/actions-security-check.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions-security-check.yml b/.github/workflows/actions-security-check.yml index 4ddd608..74d3f16 100644 --- a/.github/workflows/actions-security-check.yml +++ b/.github/workflows/actions-security-check.yml @@ -9,13 +9,17 @@ name: Actionsのセキュリティチェック # artipacked actions/checkout に persist-credentials: false を足してください # (checkout は既定で書き込み権限つきトークンを .git に残すため) # excessive-permissions permissions: を必要最小限に絞ってください -# template-injection ${{ }} を run: に直接書かず、env: 経由で渡してください +# template-injection テンプレート式を run: に直接書かず、env: 経由で渡してください # # 個別に許容したい指摘がある場合は、その行に次のコメントを付けられます: # # zizmor: ignore[ルール名] # # 詳細な説明: https://docs.zizmor.sh/audits/ +# 注意: このファイルの中に、テンプレート式の記法をリテラルで書かないこと。 +# 解説目的でも Actions がそれを式として評価しようとし、ワークフロー全体が +# 起動できなくなる(ジョブが1つも作られず failure になる)。 + on: push: branches: [main] @@ -65,7 +69,7 @@ jobs: echo "| \`unpinned-uses\` | サードパーティの \`uses:\` をコミットSHAで指定する(例: \`foo/bar@ # v1\`)|" echo "| \`artipacked\` | \`actions/checkout\` に \`persist-credentials: false\` を足す |" echo "| \`excessive-permissions\` | \`permissions:\` を必要な範囲まで絞る |" - echo "| \`template-injection\` | \`\${{ }}\` を \`run:\` に直書きせず \`env:\` 経由にする |" + echo "| \`template-injection\` | テンプレート式を \`run:\` に直書きせず \`env:\` 経由で渡す |" echo "" echo "意図的にその書き方をしている場合は、該当行に \`# zizmor: ignore[ルール名]\` を付けると除外できます。" echo "" From 4ad3587f190e5aae11ceb9a74e1c1391512cdf4a Mon Sep 17 00:00:00 2001 From: Ryuuji Yoshimoto Date: Sat, 1 Aug 2026 23:12:22 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore(ci):=20=E3=82=BB=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=81=AE=E6=96=B9=E9=87=9D=E3=82=92=E8=A8=AD=E5=AE=9A=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=A7=E6=98=8E=E7=A4=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub 公式(actions/*)と自社(CALIL/*)はタグ指定を許容し、 第三者のアクションはコミットSHA固定を必須とする方針を .github/zizmor.yml に書き下す。 これまでは zizmor の既定に任せており、zizmor 側の既定が変わると 各リポジトリのチェックが一斉に落ちる状態だった。 Co-Authored-By: Claude Opus 5 (1M context) --- .github/zizmor.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/zizmor.yml diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000..3c8e2f5 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,28 @@ +# Actionsのセキュリティチェック(zizmor)の設定 +# +# unpinned-uses: uses: の書き方をどこまで厳しくするか +# +# GitHub 公式(actions/*)と自社(CALIL/*)は、タグやブランチでの指定を許容します。 +# これらの参照先を差し替えられるのは GitHub 自身か自社だけで、 +# 第三者が公開するアクションとはリスクの質が違うためです。 +# +# それ以外はすべてコミットSHAでの固定を必須にします。第三者のアクションは +# タグを後から別のコミットに付け替えられるため、タグ指定だと +# 「レビューしたコードとは違うものが動く」ことが起こりえます。 +# +# 第三者のアクションを追加するときの書き方: +# - uses: foo/bar@0123456789abcdef0123456789abcdef01234567 # v1.2.3 +# SHA はタグのページか `gh api repos/foo/bar/commits/v1.2.3 --jq .sha` で取れます。 +# Dependabot はこの形式を認識し、更新時に SHA とコメントの両方を書き換えます。 +# +# 個別に許容したい指摘は、ワークフロー側の該当行に次のコメントを付けて除外します: +# # zizmor: ignore[ルール名] +# +# 設定の詳細: https://docs.zizmor.sh/configuration/ +rules: + unpinned-uses: + config: + policies: + "actions/*": ref-pin + "CALIL/*": ref-pin + "*": hash-pin