Title: Forced pip update raises supply chain safety concerns (and is often useless) · Issue #1346 · actions/setup-python · GitHub
Open Graph Title: Forced pip update raises supply chain safety concerns (and is often useless) · Issue #1346 · actions/setup-python
X Title: Forced pip update raises supply chain safety concerns (and is often useless) · Issue #1346 · actions/setup-python
Description: Description: As of v6.3.0, setup-python appears to unconditionally auto-update pip, without a dependency cooldown. Even when a pip-version input is specified, setup-python seemingly updates pip to the latest version first, then installs ...
Open Graph Description: Description: As of v6.3.0, setup-python appears to unconditionally auto-update pip, without a dependency cooldown. Even when a pip-version input is specified, setup-python seemingly updates pip to ...
X Description: Description: As of v6.3.0, setup-python appears to unconditionally auto-update pip, without a dependency cooldown. Even when a pip-version input is specified, setup-python seemingly updates pip to ...
Opengraph URL: https://github.com/actions/setup-python/issues/1346
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Forced pip update raises supply chain safety concerns (and is often useless)","articleBody":"\u003c!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 --->\n\u003c!--- Before opening up a new feature request, please make sure to check for similar existing issues and pull requests -->\n\n**Description:**\n\nAs of v6.3.0, `setup-python` appears to unconditionally auto-update pip, without a dependency cooldown.\nEven when a `pip-version` input is specified, `setup-python` seemingly updates pip to the latest version first, then installs the specified version.\n\nThis behavior raises supply chain safety concerns: If pip itself were subject to a supply chain attack,[^1] any callers of setup-python would be immediately affected during the attack window of opportunity.\n\nAlso, updating pip on user level seems pointless when virtual environments are used (which you should), because (AFAIK) venvs are initialized with python's bootstrap copy of pip, not site-packages pip.\nHowever, note that merely not calling setup-python's updated pip does not resolve these concerns, because an attacker might upload only an sdist of pip, which would allow for install-time execution of the hypothetical attack.\n\nTo be clear, we all hope that this scenario stays entirely hypothetical, but the point is that `setup-python` is not following safety best practices here, rsp. does not even allow the caller to do so.\n\nProposed remediation:\n- Add an option to let the caller opt out of pip auto-updating entirely (given that it is pointless when a venv is used).\n- Subject the default behavior of auto-updating pip to a dependency cooldown, ideally configurable through an input.\n Suggested default: 3 days, like dependabot, or anything non-zero really.\n- When a `pip-version` is specified, install the given version right away without first updating to latest.\n\nNote that updating pip itself with a cooldown is complicated by the fact that pip versions before 26 do not support `--uploaded-prior-to`, `PIP_UPLOADED_PRIOR_TO` etc.\nThis can basically be worked around by updating to a pinned and hash-checked version first, then updating with cooldown.\nThe following script shows how to do this: https://github.com/pypdfium2-team/pypdfium2/blob/811faae77f8fc90bc57832bc6400c65fd9f4fbee/utils/update_pip.py\n\n**Justification:**\nSupply chain safety, see the description above.\n\n**Are you ~~willing~~ able to submit a PR?**\n\nNo, I am not a typescript programmer and not familiar with setup-python's internals.\n\n*Edit: Submitted https://github.com/actions/python-versions/pull/406 after all, a simple patch to avoid possible setup-time code execution when updating pip. This should stuff a key loophole and allow an aware caller to be unaffected, but otherwise the issue still stands.*\n\n[^1]: Hypothetical and hopefully highly unlikely, but no project is per se immune to it, and you have to acknowledge that pip would be a *very* lucrative target for a supply chain attack, so downstream precautions seem important.","author":{"url":"https://github.com/mara004","@type":"Person","name":"mara004"},"datePublished":"2026-07-27T16:21:24Z","url":"https://github.com/actions/setup-python/issues/1346"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:19f8d9b4-30f6-fd4b-57fe-4c9a427afdc2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D48:1F927B:27B14B1:33FA9AB:6B02619B |
| html-safe-nonce | a780686e21387f1321534655567f2aa0e1b1d88df9841eff5f692f3c34758ffc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDQ4OjFGOTI3QjoyN0IxNEIxOjMzRkE5QUI6NkIwMjYxOUIiLCJ2aXNpdG9yX2lkIjoiNjcwNzUzMDg0NTkwNDE2MjgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d47b0dd98fe1ef2b965e0755876c3d337af5f237d5d54492d0cf210c188bbe0d |
| hovercard-subject-tag | issue:4990047941 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-python/1346/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e216ca600d4b5a77407286f5c181211d62bfd9167689b7e9e481d8ceb301e62a/actions/setup-python/issues/1346 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e216ca600d4b5a77407286f5c181211d62bfd9167689b7e9e481d8ceb301e62a/actions/setup-python/issues/1346 |
| og:image:alt | Description: As of v6.3.0, setup-python appears to unconditionally auto-update pip, without a dependency cooldown. Even when a pip-version input is specified, setup-python seemingly updates pip to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mara004 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-python git https://github.com/actions/setup-python.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 192625525 |
| octolytics-dimension-repository_nwo | actions/setup-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 192625525 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width