Skip to content

Commit 4b6ec9d

Browse files
authored
Pin pre-commit hooks to commit hashes (#21920)
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.
1 parent 8c1880f commit 4b6ec9d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
exclude: '^(mypyc/external/)|(mypy/typeshed/)|misc/typeshed_patches' # Exclude all vendored code from lints
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v5.0.0
4+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 26.1.0
9+
rev: ea488cebbfd88a5f50b8bd95d5c829d0bb76feb8 # frozen: 26.1.0
1010
hooks:
1111
- id: black
1212
exclude: '^(test-data/)'
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.14.3
14+
rev: aad66557af3b56ba6d4d69cd1b6cba87cef50cbb # frozen: v0.14.3
1515
hooks:
1616
- id: ruff-check
1717
args: [--exit-non-zero-on-fix]
1818
- repo: https://github.com/python-jsonschema/check-jsonschema
19-
rev: 0.32.1
19+
rev: b6230f5861248507c2f7d7fc002ce66bd8dfa742 # frozen: 0.32.1
2020
hooks:
2121
- id: check-github-workflows
2222
- id: check-github-actions
2323
- id: check-readthedocs
2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.4.1
25+
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
2626
hooks:
2727
- id: codespell
2828
args:
2929
- --ignore-words-list=HAX,Nam,ccompiler,keep-alives,ot,statics,whet,zar
3030
exclude: ^(mypy/test/|mypy/typeshed/|mypyc/test-data/|test-data/).+$
3131
- repo: https://github.com/rhysd/actionlint
32-
rev: v1.7.7
32+
rev: 03d0035246f3e81f36aed592ffb4bebf33a03106 # frozen: v1.7.7
3333
hooks:
3434
- id: actionlint
3535
args: [
@@ -43,7 +43,7 @@ repos:
4343
# but the integration only works if shellcheck is installed
4444
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1"
4545
- repo: https://github.com/woodruffw/zizmor-pre-commit
46-
rev: v1.5.2
46+
rev: eceb361ada9e95f78db843bf214d5691568f5c36 # frozen: v1.5.2
4747
hooks:
4848
- id: zizmor
4949
- repo: local

0 commit comments

Comments
 (0)