Repository navigation
Description
Description
When the Require actions to be pinned to a full-length commit SHA policy is enabled, GitHub Actions rejects version-tagged actions executed through a reusable workflow, even when the actions are covered by a valid workflow lockfile.
The same reusable workflow runs successfully when triggered directly via workflow_dispatch.
Disabling the SHA-pinning policy allows both workflows to execute successfully.
Steps to reproduce
Created a minimal repository containing two workflows and a generated lockfile.
1. Foo — Reusable workflow (.github/workflows/foo.yml)
name: Foo - Reusable Checkout and List
on:
workflow_call:
workflow_dispatch:
jobs:
checkout-and-list:
runs-on: github-linux-x64-runner
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: List files
run: ls -la2. Bar — Caller workflow (.github/workflows/bar.yml)
name: Bar - Calls Workflow Foo
on:
workflow_dispatch:
jobs:
call-foo:
uses: ./.github/workflows/foo.yml3. Generate the workflow lockfile
Run gh actions-lock and commit the generated .github/workflows/actions.lock:
version: 'v0.0.3'
workflows:
'.github/workflows/bar.yml': []
'.github/workflows/foo.yml':
- 'actions/[email protected]'
dependencies:
'actions/[email protected]':
ref: 'v4.4.0'
commit: 'sha1-11d5960a326750d5838078e36cf38b85af677262'
owner_id: 44036562
repo_id: 1978146294. Enable SHA-pinning enforcement
Enable the Require actions to be pinned to a full-length commit SHA policy at the organization level.
5. Execute both workflows
Trigger Foo and Bar independently using workflow_dispatch.
Actual behavior
- Foo: Executes successfully.
- Bar: Fails because
actions/[email protected]is not SHA-pinned, despite being covered by the lockfile. - Bar with SHA-pinning enforcement disabled: Executes successfully.
Error:
The action actions/[email protected] is not allowed in My-Org/github-sha-policy-testing because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns: advanced-security/component-detection-dependency-submission-action@*, astral-sh/setup-uv@*, [...] . All actions must also be pinned to a full-length commit SHA.
Expected behavior
Both workflows should execute successfully with SHA-pinning enforcement enabled.
According to GitHub's [documentation on workflow dependency lockfiles](https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles), dependencies covered by a valid lockfile should satisfy the SHA-pinning requirement without requiring full-length commit SHAs in the workflow YAML.
This should apply whether the workflow is executed directly or invoked as a reusable workflow.
Additional context
- Both workflows and the lockfile reside in the same repository.
- The lockfile correctly records
actions/[email protected]underfoo.yml. - The reusable workflow is referenced using the supported local path syntax.
- A similar issue was reproduced in another repository containing a more complex reusable workflow.
- This may be related to v0.1.6: job-level reusable-workflow
uses:refs are invisible — missed desync, falsestale, and fix mode prunes a correct entry #129, although that issue appears to concern reusable-workflow dependency discovery rather than runtime SHA-policy enforcement.
The behavior suggests that the SHA-pinning policy does not consistently recognize lockfile coverage when actions are executed through a reusable workflow.
Activity
nodeselector commentedon Oct 14, 2026
@lefort1 thanks for opening this. I'm working on a fix right now, it'll be on the backend, and won't require any updates to the CLI.
jessehouwing commentedon Oct 14, 2026
@nodeselector will that policy get a better description?
nodeselector commentedon Oct 14, 2026
@jessehouwing I'd be up to talk about the error messages when there are valid policy issues but this one is incoherent because of a bug in how the policy is validated in the backend. For this issue we shouldn't show a better error message, we shouldn't error.
jessehouwing commentedon Oct 14, 2026
I meant more that the policy description "require actions to be pinned to sha". Ideally it mentions that the actions or workflows must be locked/pinned...
And how does the policy compare to the new preview actions policy "require lock files"
nodeselector commentedon Oct 15, 2026
@lefort1 this should be addressed now please let me know if you're still seeing this behavior.
nodeselector commentedon Oct 15, 2026
💯 we're going to update the text for that setting.
You had another issue that actually demonstrates the need for that
require lock filespolicy.fix: pin actions in reusable workflows to full SHAs