Skip to content

fix(validators): refuse ./action refs inside workflow_call workflows - #123

Merged
rldyourmnd merged 1 commit into
mainfrom
feat/reusable-local-action-guard
Sep 20, 2026
Merged

rldyourmnd merged 1 commit into
mainfrom
feat/reusable-local-action-guard

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

./ in a called workflow resolves against the caller's workspace, never this repository's. check_pinned_actions.py exempted every ./ ref as "local reusable workflow", which let five uses: ./actions/... ship inside workflow_call workflows across 0.1.21..0.1.23 -- breaking ci-feedback.yml for three releases (its job only fires on a failed conclusion, so the defect stayed silent) and private-security-bundle-free.yml for every cross-repository caller. Two live failures proved it: setup-systems run 35541466805 and github-device-sync run 35541640707.

Change

  • ./.github/workflows/*.yml stays exempt -- a genuine same-repository reusable call.
  • Any other ./ path inside a workflow_call workflow is rejected, with the fix spelled out (name and pin the repository).
  • Non-workflow_call workflows keep the exemption: their ./ resolves against their own checked-out workspace.

Proof

  • check_pinned_actions: OK on the current tree (all five offenders were fixed in 0.1.24).
  • A scratch workflow_call workflow carrying uses: ./actions/tool-cache is rejected at line precision, while ./.github/workflows/actionlint.yml beside it stays legal.

Signed-off-by: rldyourmnd danil@nddev.it.com

`./` in a called workflow resolves against the caller's workspace, never this
repository's, so `uses: ./actions/x` in a `workflow_call` file fails at job
setup for every cross-repository consumer. The existing exemption treated all
`./` refs as local reusable *workflow* calls and let five of them ship across
0.1.21..0.1.23 -- breaking the ci-feedback path for three releases and the
private security bundle for every real caller. Both were only caught by live
failures.

The check now distinguishes `./.github/workflows/*.yml` (a genuine
same-repository reusable call, still exempt) from any other `./` path inside a
reusable workflow, which it rejects with the fix to apply. Non-reusable
workflows keep the exemption: their `./` resolves against their own checked
out workspace.

Signed-off-by: rldyourmnd <danil@nddev.it.com>
@github-actions github-actions Bot added ci and removed ci labels Sep 20, 2026
@rldyourmnd
rldyourmnd merged commit f0694fb into main Sep 20, 2026
28 checks passed
@rldyourmnd
rldyourmnd deleted the feat/reusable-local-action-guard branch September 20, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant