--verify passes when a local composite action's SHA pins are missing from the lockfile

オープン
#281 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, go
領域
cli, devtools

調査の方向性

Start by reading the --verify implementation and the code that scans local composite actions and compares their pins with the lockfile. Reproduce the case with the SHA-pinned composite step and tag-keyed lockfile entry described here, then run the relevant verification tests. Done means --verify reports the missing SHA-keyed entry as an error instead of declaring all workflows valid.

索引モデルが issue の本文から書いたものです。

説明

gh actions-lock --verify (v0.4.1) reports every workflow valid when a local composite action pins its steps by commit SHA but the lockfile records those dependencies by tag. The runner rejects the same repository at job setup, so the frozen check in CI passes while the jobs never start.

A workflow calls a local composite action (uses: ./.github/actions/setup) whose step pins actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0. The lockfile lists that dependency as actions-rust-lang/[email protected], with commit sha1-ecabd13d1c56bd1345c230e542e9144811ad706f. Locally:

$ gh actions-lock --verify
Scanning 13 workflows
3 actions are pinned to a bare SHA without a tag ref
↳ run `gh actions-lock` to pin to tagged releases
All 13 workflows valid

The runner fails the job before any step runs (tox-dev/peryx run 42858830831):

##[error]lockfile missing pin for actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f

I expected --verify to report the missing entry, since its help text says it "fails if the lockfile is incomplete or the runner would reject a pin". Keying the entry by the SHA ('actions-rust-lang/setup-rust-toolchain@ecabd13…':) satisfies the runner, which is what tox-dev/peryx#2417 ended up doing. Related: #183, on how composite actions should lock their own dependencies.

主要言語
Go
スター
317
フォーク
24
平均マージ
1日 8時間
マージ済み PR(30日)
50

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-actions-lock のほかの issue

github/gh-actions-lock の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。