Skip to content

Pin pre-commit hooks to commit hashes - #21920

Merged
JelleZijlstra merged 1 commit into
python:masterfrom
AlexWaygood:alex/pin-pre-commit-hooks
Sep 1, 2026
Merged

Pin pre-commit hooks to commit hashes#21920
JelleZijlstra merged 1 commit into
python:masterfrom
AlexWaygood:alex/pin-pre-commit-hooks

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Pin all remote pre-commit hook repositories to full commit hashes to improve security: moving an upstream tag can no longer silently change which repository revision is fetched.

Preserve the existing hook versions in # frozen: comments. pre-commit.ci will continue updating the hooks while preserving hash pinning and refreshing the version comments.

@AlexWaygood
AlexWaygood marked this pull request as ready for review September 1, 2026 11:35
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JelleZijlstra
JelleZijlstra merged commit 4b6ec9d into python:master Sep 1, 2026
25 checks passed
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.

2 participants