From 403bf22bb1b4ee993bed07cddd378b43a92a5977 Mon Sep 17 00:00:00 2001 From: Johannes Zorn Date: Fri, 30 Oct 2026 11:22:17 +0100 Subject: [PATCH 1/2] chore(pre-commit): pin hooks to commit shas Pin every hook rev to the commit its tag points to, with the tag in a '# frozen:' comment, the format 'pre-commit autoupdate --freeze' writes. Renovate's pre-commit manager updates SHA and comment together. Co-Authored-By: Claude Opus 5.5 --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d5ddf26..8735a61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: hooks: - id: check-useless-excludes - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 + rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0 hooks: - id: python-check-mock-methods - id: python-no-log-warn @@ -19,7 +19,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0 hooks: - id: check-added-large-files exclude: | @@ -47,13 +47,13 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/Yelp/detect-secrets - rev: v1.5.0 + rev: 01886c8a910c64595c47f186ca1ffc0b77fa5458 # frozen: v1.5.0 hooks: - id: detect-secrets args: ["--baseline", ".secrets.baseline"] additional_dependencies: ["gibberish-detector"] - repo: https://github.com/commitizen-tools/commitizen - rev: v4.16.4 + rev: 205e71c26d6dd6a802ca674c9ae4d12f1103a9bb # frozen: v4.16.4 hooks: - id: commitizen stages: [commit-msg] From cf80701dd8a2a8049b195cb29628e52a632360ec Mon Sep 17 00:00:00 2001 From: Johannes Zorn Date: Fri, 30 Oct 2026 16:46:52 +0100 Subject: [PATCH 2/2] fix(pre-commit): let detect-secrets skip pinned hook revs detect-secrets reports the 40-character commit SHAs in .pre-commit-config.yaml as Hex High Entropy Strings. Add a baseline line filter for rev: lines that hold a bare SHA. Co-Authored-By: Claude Opus 5.5 --- .secrets.baseline | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.secrets.baseline b/.secrets.baseline index 2b79ec8..002c5c3 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -120,6 +120,12 @@ }, { "path": "detect_secrets.filters.heuristic.is_templated_secret" + }, + { + "path": "detect_secrets.filters.regex.should_exclude_line", + "pattern": [ + "^\\s*rev: \"?[0-9a-f]{40}\"?(\\s|$)" + ] } ], "results": {},