Skip to content

Do not use pip-install; add dependency cooldowns#5146

Open
JelleZijlstra wants to merge 3 commits into
psf:mainfrom
JelleZijlstra:codex/zizmor-low-severity
Open

Do not use pip-install; add dependency cooldowns#5146
JelleZijlstra wants to merge 3 commits into
psf:mainfrom
JelleZijlstra:codex/zizmor-low-severity

Conversation

@JelleZijlstra

Copy link
Copy Markdown
Collaborator

Zizmor recommends against pip-install (https://docs.zizmor.sh/audits/#misfeature).

Also add dependency cooldowns to prevent supply-chain compromises.

@JelleZijlstra JelleZijlstra added the ci: skip news Pull requests that don't need a changelog entry. label May 21, 2026
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

diff-shades results comparing this PR (e9406ab) to main (8049246):

--preview style: no changes

--stable style: no changes


What is this? | Workflow run | diff-shades documentation

@cobaltt7

Copy link
Copy Markdown
Collaborator

Zizmor recommends against pip-install because it installs dependencies to the global scope and makes them vulnerable to dependency conflicts. This change does the same thing, just without being flagged by Zizmor. The correct fix to this would be to create a venv inside the workflow and install dependencies there. IMO that's overkill and unnecessary because there's only one pip-install per job and not much opportunity for conflicts

JelleZijlstra and others added 2 commits July 24, 2026 15:17
Signed-off-by: cobalt <61329810+cobaltt7@users.noreply.github.com>
@cobaltt7
cobaltt7 force-pushed the codex/zizmor-low-severity branch from 8a0b468 to ff03ce8 Compare July 24, 2026 21:18
Signed-off-by: cobalt <61329810+cobaltt7@users.noreply.github.com>
@cobaltt7

Copy link
Copy Markdown
Collaborator

setup-python 7.0.0 has removed the input: actions/setup-python#1336
Note again that this change is effectively the same as using pip-install, and installs into the runner-level environment. Again, I don't think this is an issue because we don't run multiple install commands or mix multiple tools. The proper fix to this would be to use a venv in each workflow, which to me feels like overkill, and IMO GHA should always have a quick-and-dirty way to install packages. It makes most sense to me to keep this until/unless it stops working

Would it be a bad idea to set PIP_UPLOADED_PRIOR_TO=P2D as a repository env value instead? That avoids repetition in workflow files and the possibility of forgetting to include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: skip news Pull requests that don't need a changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants