From 8a7bc776d827a876badb0417378f42f2ea18879b Mon Sep 17 00:00:00 2001 From: qinhui <> Date: Fri, 23 May 2025 11:00:42 +0800 Subject: [PATCH] gitleaks uses the local environment --- .pre-commit-config.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b06a5f51f..8cca4020e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,15 @@ repos: - - repo: https://github.com/gitleaks/gitleaks - rev: v8.24.2 - hooks: - - id: gitleaks - args: ["--config=.gitleaks.toml"] - - repo: local hooks: + - id: gitleaks + name: Detect hardcoded secrets + description: Ensures no secrets are committed + entry: gitleaks protect + args: ["--config=.gitleaks.toml", "--staged", "--verbose"] + language: system + pass_filenames: false + stages: [pre-commit] + - id: check-commit-message name: Check commit message for Chinese characters description: Ensures commit messages do not contain Chinese characters