Feature request: Lock remote reusable workflow calls (jobs.<id>.uses)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- Go
- Stars
- 253
- Forks
- 15
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/gh-actions-lock
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/gh-actions-lock#261 ·
Maintainers usually reply within 1 day
-
Dependabot drops an unchanged transitive dependency when bumping a composite actionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
github/gh-actions-lock#257 · 1 comment ·
Maintainers usually reply within 1 day
-
--migrate-local-actions rewrites action files in nested worktrees and submodulesPossibly taken @aksestok claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
github/gh-actions-lock#253 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
github/gh-actions-lock#252 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
github/gh-actions-lock#247 · 1 comment ·
Maintainers usually reply within 1 day
All issues in github/gh-actions-lock
Similar issues
-
area: frontend priority: normal
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleOpentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nightgauge/nightgauge#2909 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
jasonfen/terminal-space-program#842 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MustacheCase/zanadir#521 ·
Maintainers usually reply within 1 day
-
v3.1.0: spread placement groups fail — label key uses the reserved hetzner.cloud prefixPossibly taken @ScrimReaper claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
stubbi/karpenter-provider-hetzner#120 ·
Maintainers usually reply within 4 days