Skip to content

Add zizmor security linter#134

Merged
StanFromIreland merged 8 commits intopython:masterfrom
hugovk:zizmor
Apr 24, 2026
Merged

Add zizmor security linter#134
StanFromIreland merged 8 commits intopython:masterfrom
hugovk:zizmor

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 24, 2026

And fix findings. Also update pre-commit and add some other useful hooks.

Will fail until #133 is merged.

@hugovk hugovk marked this pull request as ready for review April 24, 2026 14:20
@StanFromIreland StanFromIreland self-assigned this Apr 24, 2026
run: |
python -m pip install --upgrade pip
pip install -U tox
- name: Create tox environments
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of building the package and then running the tests in the same job can we have multiple stages? One where the package is built, one where the test suite is executed, and then one where it's published?

This avoids needing to install all the dev/test dependencies into the more critical build/publish jobs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to a different PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we go! #137

pip install -U tox
- name: Create tox environments
run: |
tox -p -e py,build --notest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid needing to install tox at all by installing build and twine via a lock file? It seems like the tox script may be a hold-over from when the package was built and published on a developer computer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and I don't think we need to run tests at all in this workflow, everything should be green in regular test CI before starting a release.

Or tests should be run in a separate job, isolated from release artifacts.

Again, good for a followup.

Comment thread .github/workflows/auto-tag.yml Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread .github/workflows/auto-tag.yml Outdated
Comment thread .github/workflows/check-for-updates.yml Outdated
Comment thread .github/workflows/check-for-updates.yml Outdated
Co-authored-by: Stan Ulbrych <stan@python.org>
@StanFromIreland StanFromIreland merged commit 410c62b into python:master Apr 24, 2026
30 checks passed
@StanFromIreland
Copy link
Copy Markdown
Member

Thanks!

@hugovk hugovk deleted the zizmor branch April 24, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants