fix(security): pin etils-actions/pypi-auto-publish to commit SHA in publish workflows#3414
Open
XananasX7 wants to merge 1 commit into
Open
fix(security): pin etils-actions/pypi-auto-publish to commit SHA in publish workflows#3414XananasX7 wants to merge 1 commit into
XananasX7 wants to merge 1 commit into
Conversation
The auto-publish workflows use etils-actions/pypi-auto-publish@v1 — a
mutable tag reference on a third-party action. If the tag is silently
moved (compromised maintainer, repo takeover, etc.) the new code runs
in the same job that holds PYPI_API_TOKEN and GH_PUBLISH_TOKEN, enabling
a supply-chain attack on every downstream user of orbax-checkpoint and
orbax-export.
Pin to the exact commit SHA so the workflow is tamper-proof:
etils-actions/pypi-auto-publish@v1
→ @e3c4b4afc3a5b12a44734da938741995538e8223
The v1 comment preserves human readability while SHA ensures integrity.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
auto-publish.ymlandauto-publish-dry-run.ymlworkflows use a mutable tag reference for a third-party action:etils-actions/pypi-auto-publishis a small third-party action (~10 GitHub stars). If thev1tag is silently redirected — via a compromised maintainer account, a tag deletion + recreation, or a GitHub account takeover — the malicious version executes in the same job that holdsPYPI_API_TOKENandGH_PUBLISH_TOKEN.Impact
PYPI_API_TOKEN_OBX_CKPT— publishesorbax-checkpointto PyPI. A compromised token enables injecting backdoored releases into a package installed across the JAX ecosystem.GH_PUBLISH_TOKEN— GitHub PAT; enables creating spurious tags/releases or further repo manipulation.main— no manual approval gate.Fix
Pin to the exact commit SHA of the current
v1tag:etils-actions/pypi-auto-publish@v1etils-actions/pypi-auto-publish@e3c4b4afc3a5b12a44734da938741995538e8223 # v1The SHA pins the action code to a specific immutable commit. The
# v1comment preserves human readability. This is the approach recommended by the GitHub security hardening guide and enforced by tools like OpenSSF Scorecards andratchet.