Pin PyPI release actions to immutable commits - #10
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dc8bc089c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| - name: Upload built distributions | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
There was a problem hiding this comment.
Pin the current action majors instead of downgrading them
This SHA is upload-artifact v4.6.2 rather than an immutable pin for the previously selected v7; the same change downgrades download-artifact from v7 to v4.3.0, checkout from v5 to v4.2.2, and setup-python from v6 to v5.6.0. Consequently, the next release silently runs older action generations and loses the compatibility and security fixes for which the workflow had selected the newer majors, rather than merely making its existing dependencies immutable. Resolve each original major tag to its reviewed commit SHA and pin that commit.
Useful? React with 👍 / 👎.
Motivation
id-token: write, creating a supply-chain risk that a compromised upstream action could publish arbitrary packages to PyPI.Description
uses:reference in.github/workflows/publish.ymlwith a 40-hex commit SHA pointing at the reviewed action commit while preserving a human-readable version comment for future updates.actions/checkout,actions/setup-python,actions/upload-artifact,actions/download-artifact, andpypa/gh-action-pypi-publishin both TestPyPI and PyPI jobs.Testing
uses:references in.github/workflows/publish.ymlare full 40-character commit SHAs and it succeeded.git diff --checkand confirmed no whitespace/check errors, andgit status --shortto confirm the working tree is clean after committing the change.pre-commit run --files .github/workflows/publish.yml, butpre-commitwas not installed in the environment (noted as informational, not a failure).Codex Task