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

Aperta
#281 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, go
Ambito
cli, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
317
Fork
24
Merge medio
1g 8h
PR unite (30g)
50

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/gh-actions-lock

Tutte le issue di github/gh-actions-lock

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.