Skip to content

Commit 9aa7be5

Browse files
authored
chore(security): Pin pre-commit hooks by SHA, as it is immutable (#902)
Pinned by `pre-commit autoupdate --freeze` as `pre-commit` in Renovate currently [does not support](renovatebot/renovate#22488) freezing style used by `pre-commit`
1 parent 7f976b5 commit 9aa7be5

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/renovate.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
commitMessageLowerCase: "never",
1616
// Disable auto-rebase on every commit to avoid reaching Github limits on macos runners
1717
rebaseWhen: "conflicted",
18+
"pre-commit": {
19+
enabled: false, // Use pre-commit.ci freeze instead
20+
},
1821
}

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ci:
77

88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v5.0.0
10+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
1111
hooks:
1212
# Git style
1313
- id: check-added-large-files
@@ -43,25 +43,25 @@ repos:
4343

4444
# Detect hardcoded secrets
4545
- repo: https://github.com/gitleaks/gitleaks
46-
rev: v8.26.0
46+
rev: a248f9279b38aeff5bbd4c85cc6f15b64d27e794 # frozen: v8.27.0
4747
hooks:
4848
- id: gitleaks
4949

5050
# Github Action static analysis tool
5151
- repo: https://github.com/woodruffw/zizmor-pre-commit
52-
rev: v1.9.0
52+
rev: d2c1833a059c66713cd52c032617766134679a0f # frozen: v1.9.0
5353
hooks:
5454
- id: zizmor
5555

5656
# Dockerfile
5757
- repo: https://github.com/hadolint/hadolint
58-
rev: v2.13.1-beta
58+
rev: c3dc18df7a501f02a560a2cc7ba3c69a85ca01d3 # frozen: v2.13.1-beta
5959
hooks:
6060
- id: hadolint
6161

6262
# YAML
6363
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
64-
rev: 0.2.3
64+
rev: 8d1b9cadaf854cb25bb0b0f5870e1cc66a083d6b # frozen: 0.2.3
6565
hooks:
6666
- id: yamlfmt
6767
args:
@@ -72,7 +72,7 @@ repos:
7272
- --implicit_start
7373

7474
- repo: https://github.com/adrienverge/yamllint.git
75-
rev: v1.37.1
75+
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # frozen: v1.37.1
7676
hooks:
7777
- id: yamllint
7878
types:
@@ -83,15 +83,15 @@ repos:
8383

8484
# JSON5
8585
- repo: https://github.com/pre-commit/mirrors-prettier
86-
rev: v4.0.0-alpha.8
86+
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
8787
hooks:
8888
- id: prettier
8989
# https://prettier.io/docs/en/options.html#parser
9090
files: .json5$
9191

9292
# Bash
9393
- repo: https://github.com/jumanjihouse/pre-commit-hooks
94-
rev: 3.0.0
94+
rev: 38980559e3a605691d6579f96222c30778e5a69e # frozen: 3.0.0
9595
hooks:
9696
- id: shfmt
9797
args:
@@ -105,15 +105,15 @@ repos:
105105

106106
# Python
107107
- repo: https://github.com/astral-sh/ruff-pre-commit
108-
rev: v0.11.11
108+
rev: 9aeda5d1f4bbd212c557da1ea78eca9e8c829e19 # frozen: v0.11.13
109109
hooks:
110110
- id: ruff
111111
args:
112112
- --fix
113113
- id: ruff-format
114114

115115
- repo: https://github.com/pre-commit/mirrors-mypy.git
116-
rev: v1.15.0
116+
rev: 7010b10a09f65cd60a23c207349b539aa36dbec1 # frozen: v1.16.0
117117
hooks:
118118
- id: mypy
119119
alias: mypy-py313

0 commit comments

Comments
 (0)