Update pypa/gh-action-pypi-publish action to v1.13.0 [SECURITY]#2929
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
Update pypa/gh-action-pypi-publish action to v1.13.0 [SECURITY]#2929renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2929 +/- ##
=======================================
Coverage 90.42% 90.42%
=======================================
Files 231 231
Lines 14939 14939
=======================================
Hits 13509 13509
Misses 1430 1430 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PR contains the following updates:
v1.12.4→v1.13.0GitHub Vulnerability Alerts
GHSA-vxmw-7h4f-hqxh
Summary
gh-action-pypi-publishmakes use of GitHub Actions expression expansions (i.e.${{ ... }}) in contexts that are potentially attacker controllable. Depending on the trigger used to invokegh-action-pypi-publish, this may allow an attacker to execute arbitrary code within the context of a workflow step that invokesgh-action-pypi-publish.Details
gh-action-pypi-publishcontains a composite action step,set-repo-and-ref, that makes use of expression expansions:Permalink: https://github.com/pypa/gh-action-pypi-publish/blob/db8f07d3871a0a180efa06b95d467625c19d5d5f/action.yml#L114-L125
In normal intended operation, these expansions are used to establish a correct priority for outputs like
refandrepo-id.However, these expansions have a side effect: because they're done with
${{ ... }}and not with${...}(i.e. normal shell interpolation), they can bypass normal shell quoting rules. In particular, if bothenv.ACTION_REFandenv.PR_REFevaluate to empty strings, then the expression falls back togithub.ref_name, which can be an attacker controlled string via a branch or tag name.For example, if the attacker is able to set a branch name to something like
innocent;cat${IFS}/etc/passwd, then theREFline may expand as:which would set
REFtoinnocentand then run the attacker's code.Additional information about dangerous expansions can be found in zizmor's
template-injectionrule documentation.Impact
The impact of this vulnerability is very low: the expression in question is unlikely to be evaluated in normal operation, since
env.ACTION_REFshould always take precedence.In particular, the action is not vulnerable in many popular configurations, i.e. those where
pull_requestorreleaseor apush: tagsevent is used to call the action.Release Notes
pypa/gh-action-pypi-publish (pypa/gh-action-pypi-publish)
v1.13.0Compare Source
Take the 2025 Python Packaging Survey if you still haven't!
✨ New Stuff
@woodruffw💰 updated the README to no longer mention the attestations feature being experimental in #347: it's been rather stable for a year already 🎉
He also added more diagnostic output which includes printing out the GitHub Environment claim via #371 and warning about the unsupported reusable workflows configurations #306, when using Trusted Publishing.
In addition to that, @konstin💰 sent #378 to pin
actions/setup-pythonto a SHA hash. This makespypi-publishcompatible with new GitHub policies that allow organizations to mandate hash-pinning actions used in workflows.🛠️ Internal Dependencies
@webknjaz💰 made a bunch of updates to the action runtime which includes bumping it to Python 3.13 in #331 and updating the dependency tree across the board.
pip-with-requires-pythonis no longer being installed (#332). Some related bumps were contributed by @woodruffw💰 (#359) and @kurtmckee💰 sent a contributor-facing PR, bumping the linting configuration via #335.💪 New Contributors
🪞 Full Diff: pypa/gh-action-pypi-publish@v1.12.4...v1.13.0
🧔♂️ Release Manager: @webknjaz 🇺🇦
💬 Discuss on Bluesky 🦋, on Mastodon 🐘 and on GitHub.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.