From 09523e0a925f2350ab899a78570b0e58a0da9ab9 Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Tue, 8 Sep 2026 23:57:22 +0800 Subject: [PATCH] ci(hooks): manage gitleaks in Python environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 🔧 CI/CD - Replace the upstream Go hook with a local Python hook that installs nogoo9-gitleaks==8.30.1. - Keep the tracked-file snapshot entry point, always-run behavior, and filename handling. - Move the scanner from Gitleaks 8.24.2 to the packaged 8.30.1 binary. --- .pre-commit-config.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0bd36f4..38cc1364 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,12 +70,11 @@ repos: language: python language_version: python3 files: \.md$ - - # Gitleaks - Secret detection - - repo: https://github.com/gitleaks/gitleaks - rev: v8.24.2 - hooks: - id: gitleaks + name: gitleaks entry: python .pre-commit-hooks/gitleaks_tracked.py + language: python + language_version: python3 + additional_dependencies: ["nogoo9-gitleaks==8.30.1"] always_run: true pass_filenames: false