Files
project-template/.gitleaks.toml
T
ilia ed6edab998
CI / secret-scan (push) Successful in 18s
CI / python-ci (push) Failing after 1m0s
Project template: honest CI, gitleaks config, protection bootstrap
2026-07-26 15:35:32 -04:00

37 lines
1.1 KiB
TOML

# Repo gitleaks config — same rules as the global fallback
# (~/.config/git/gitleaks.toml) so local hook and CI agree.
title = "repo gitleaks"
[extend]
useDefault = true
[[rules]]
id = "env-file-committed"
description = "Raw .env file (or backup/variant) staged for commit"
path = '''(^|/)\.env(\.(backup|bak|old|orig|save|local|prod|production|dev|development|staging))?$'''
[[rules]]
id = "password-or-credential-file"
description = "File name indicates stored password/credential material"
path = '''(?i)(^|/)[^/]*(password|passwd|credential)[^/]*\.(txt|json|ya?ml|env|cfg|ini)$'''
[[rules]]
id = "private-key-file"
description = "Private key or keystore file staged for commit"
path = '''(^|/)(id_rsa|id_ed25519|id_ecdsa)[^/]*$|\.(pem|p12|pfx|key)$'''
[[rules]]
id = "dotfile-secret-token"
description = "Hidden standalone secret/token file"
path = '''(^|/)\.[^/]*(secret|token)[^/]*$'''
[allowlist]
description = "Legitimate non-secret files matching the patterns above"
paths = [
'''(?i)\.(example|sample|template|dist)$''',
'''(^|/)\.env\.example[^/]*$''',
'''(^|/)[^/]*\.pub$''',
'''(^|/)package(-lock)?\.json$''',
]