chore(security): 添加 gitleaks 配置文件以忽略测试密钥

- 配置 allowlist 忽略 docs 目录下的文件
- 添加对 .*Test.*\.json 文件的忽略规则
- 配置 Development 相关文件的忽略路径
- 添加 FAKE_.*_KEY 正则表达式到忽略列表
- 添加 TEST_.*_TOKEN 正则表达式到忽略列表
- 设置描述信息为 "Ignore test/demo secrets"
This commit is contained in:
GeWuYou 2026-02-02 11:19:46 +08:00
parent 24a129b8f5
commit defcca85f3

12
.gitleaks.toml Normal file
View File

@ -0,0 +1,12 @@
[allowlist]
description = "Ignore test/demo secrets"
paths = [
'''docs/.*''',
'''.*Test.*\.json''',
'''.*Development.*'''
]
regexes = [
'''FAKE_.*_KEY''',
'''TEST_.*_TOKEN'''
]