fix(ci): use triple-quoted strings in gitleaks.toml to avoid quote parsing errors
CI/CD Pipeline / Unit Tests (pull_request) Failing after 15s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 14s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 17s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 8s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1558h33m24s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1558h33m24s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1558h33m24s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1558h33m25s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1558h33m25s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1559h4m59s

This commit is contained in:
代码审计
2026-07-13 16:56:40 +08:00
parent a141cd56ff
commit b4890da58c
+11 -15
View File
@@ -56,20 +56,16 @@ paths = [
]
# 允许的密钥值/占位符正则
# 使用三引号字符串避免引号转义问题
regexes = [
# 占位符模式
'(?i)(your[_-]?password|your[_-]?secret|your[_-]?key|your[_-]?token|changeme|change[_-]?me|placeholder|example[_-]?key|test[_-]?key|dummy|fake|mock|xxx|none|not[_-]?set|TODO|FIXME)',
# 数据库连接字符串中的通用密码(PostgreSQL示例配置)
'postgresql://[^:]+:changeme@',
'postgresql://[^:]+:your-password@',
'postgresql://[^:]+:password@localhost',
# Redis示例配置
'redis://:changeme@',
'redis://:your-redis-password@',
# JWT示例密钥
'(?i)jwt[_-]?secret\s*[:=]\s*["\']?(your[_-]?jwt|change|placeholder|secret|example)',
# 本地开发默认值
'postgresql://postgres:postgres@',
'redis://localhost',
'mysql://root:root@',
'''(?i)(your[_-]?password|your[_-]?secret|your[_-]?key|your[_-]?token|changeme|change[_-]?me|placeholder|example[_-]?key|test[_-]?key|dummy|fake|mock|xxx|none|not[_-]?set|TODO|FIXME)''',
'''postgresql://[^:]+:changeme@''',
'''postgresql://[^:]+:your-password@''',
'''postgresql://[^:]+:password@localhost''',
'''redis://:changeme@''',
'''redis://:your-redis-password@''',
'''(?i)jwt[_-]?secret\s*[:=]\s*["']?(your[_-]?jwt|change|placeholder|secret|example)''',
'''postgresql://postgres:postgres@''',
'''redis://localhost''',
'''mysql://root:root@''',
]