From defcca85f3ce8a1564d44dbbafd60d3ebbbadac4 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:19:46 +0800 Subject: [PATCH] =?UTF-8?q?chore(security):=20=E6=B7=BB=E5=8A=A0=20gitleak?= =?UTF-8?q?s=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=BB=A5=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E6=B5=8B=E8=AF=95=E5=AF=86=E9=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置 allowlist 忽略 docs 目录下的文件 - 添加对 .*Test.*\.json 文件的忽略规则 - 配置 Development 相关文件的忽略路径 - 添加 FAKE_.*_KEY 正则表达式到忽略列表 - 添加 TEST_.*_TOKEN 正则表达式到忽略列表 - 设置描述信息为 "Ignore test/demo secrets" --- .gitleaks.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .gitleaks.toml diff --git a/.gitleaks.toml b/.gitleaks.toml new file mode 100644 index 0000000..27db994 --- /dev/null +++ b/.gitleaks.toml @@ -0,0 +1,12 @@ +[allowlist] +description = "Ignore test/demo secrets" +paths = [ + '''docs/.*''', + '''.*Test.*\.json''', + '''.*Development.*''' +] + +regexes = [ + '''FAKE_.*_KEY''', + '''TEST_.*_TOKEN''' +]