google-github-actions / google-github-actions/run-gemini-cli
Pin transitive actions auth@v3 and upload-artifact@v6 to commit SHAs
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 285
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 1
Description
Summary
action.yml references two transitive actions by floating tag with explicit # ratchet:exclude markers, which makes the action unusable from any repository whose organization enforces "actions must be pinned to a full-length commit SHA" (e.g. via Settings → Actions → "Allow specified actions and reusable workflows" → "Require actions to be pinned to a full SHA").
Reproduction
Set the org-level Actions policy on a repo to require commit-SHA pinning, then attempt to run google-github-actions/run-gemini-cli@v0.1.22 in any workflow. The workflow fails at action-download time with:
The actions
google-github-actions/auth@v3andactions/upload-artifact@v6are not allowed in<org>/<repo>because all actions must be pinned to a full-length commit SHA.
This happens even when the unpinned actions are conditionally invoked (the policy check resolves all uses: references at workflow setup, before any if: evaluates).
Affected references
uses: 'google-github-actions/auth@v3' # ratchet:exclude
uses: 'actions/upload-artifact@v6' # ratchet:exclude
Suggested fix
Pin both to commit SHAs and keep the floating tag in a trailing comment, matching the convention pnpm/action-setup already uses on line 232:
uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3
uses: 'actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f' # v6
(SHAs above are current v3 and v6 as of today; pin to whatever the maintainers consider stable.)
Workaround
Until upstream pins these, consumers under strict policies have to fork the action (e.g., jaredmixpanel/run-gemini-cli@v0.1.22-pinned-1), which adds maintenance burden and is awkward to keep in sync with upstream releases.
Why pin
The "require pinned SHAs" Actions policy is a common defense against supply-chain attacks where a maliciously-pushed tag could swap action contents. Pinning to a commit SHA defeats that vector. The current # ratchet:exclude markers suggest these were intentionally left unpinned — but they break the action for any repo under that policy and there's no documented way for consumers to work around the constraint other than forking.
Happy to send a PR if helpful.
Contributor 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.
Research direction
Start in action.yml at lines 221 and 435, then compare the SHA-pinning convention on line 232. Pin google-github-actions/auth and actions/upload-artifact to stable full-length commit SHAs while retaining version comments, and verify that both references satisfy repositories requiring SHA-pinned actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100