Feature request: Lock remote reusable workflow calls (jobs.<id>.uses)
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
- 25/100
Direzione di ricerca
Start in ExtractActionRefs, where job-level uses: values go to parserlock.ParseActionRef, which returns nil for .github/workflows/ paths and drops them silently. Check whether ParseReusableWorkflowRef in the actions-lockfile dependency can supply the owner, repo, path and ref. Done means either the reusable call is resolved and locked, or --verify reports it as unlocked. The maintainer closed #129 against this, so confirm the approach with them first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
gh actions-lock does not lock remote reusable workflow calls (jobs.<id>.uses: owner/repo/.github/workflows/<file>.yml@ref). It skips them without a finding, so a workflow whose only external ref is a reusable workflow is recorded as [] and --verify passes.
The lockfile docs say a lockfile pins "every action (including transitive dependencies) and reusable workflow your workflows depend on". The CLI does not do this at the moment.
Based on this comment https://github.com/github/gh-actions-lock/issues/129#issuecomment-6195549413 there seems to be no immediate plan to support this, but I think it is still valuable to track this. As the activity stream of that PR shows quite an interest of the community for such a feature.
This part is generated by Opus 5.5 based on the debugging session I had with it:
Reproduction
gh actions-lock v0.2.0, with this workflow:
# .github/workflows/osv.yml
on: pull_request
jobs:
scan-pr:
uses: google/osv-scanner-action/.github/workflows/[email protected]
$ gh actions-lock --no-interactive
$ gh actions-lock --verify
All N workflows valid
# .github/workflows/actions.lock
workflows:
.github/workflows/osv.yml: []
Expected: the call is resolved and locked like a step-level action, e.g. google/[email protected] with its commit SHA. Alternatively, --verify reports it as unlocked.
Actual: the ref is dropped and the tag stays unpinned with no warning.
Cause
ExtractActionRefs passes job-level uses: values to parserlock.ParseActionRef, which returns nil for any path under .github/workflows/. The nil result is discarded. actions-lockfile already provides ParseReusableWorkflowRef, but gh-actions-lock does not call it.
Why it matters
- Teams moving to the lockfile change step refs to tags and let the lockfile hold the SHAs. Reusable workflow calls cannot follow that pattern, so they must stay SHA-pinned in YAML. Workflows then mix two pinning styles, and tools such as Renovate, Dependabot and zizmor need different rules for each.
- If someone converts a reusable workflow call to a tag, assuming the lockfile covers it, nothing pins it.
--verifystill passes, so the gap is not visible, even though it is documented.
Request
Please lock remote reusable workflow refs at job level, resolved to the commit of the repository that defines them. Their own action dependencies would stay covered by that repository's lockfile, as the docs describe. If this is out of scope, --verify and --no-fix should at least emit a finding for unlocked job-level refs, and the README Limitations section should mention it.
Related
- #129: closed with "we don't plan to pin job-level uses at this time"
- #161: open community PR, "Track reusable workflow calls in lock coverage"
- #169: SHA-pinning policy and reusable workflows (fixed on the backend)
- Lingua principale
- Go
- Stelle
- 253
- Fork
- 15
- Merge medio
- 19h 30m
- PR unite (30g)
- 60
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/gh-actions-lock
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/gh-actions-lock#261 ·
I maintainer di solito rispondono entro 1 giorno
-
Dependabot drops an unchanged transitive dependency when bumping a composite actionForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
github/gh-actions-lock#257 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
--migrate-local-actions rewrites action files in nested worktrees and submodulesForse già presa @aksestok l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
github/gh-actions-lock#253 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
github/gh-actions-lock#252 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
github/gh-actions-lock#247 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di github/gh-actions-lock
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Schema validation is skipped when a transaction is invoked with a lowercase first letterForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
cmd/ebitenmobile: multi-language bindings run the complete generator twiceForse già presa @kumagi l’ha presa oggi. Apertaos:macos performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hajimehoshi/ebiten#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
jordansmall/spindrift#6318 ·
I maintainer di solito rispondono entro 1 giorno