+13
-14
@@ -1,17 +1,26 @@
|
||||
title = "Gitleaks Docker Compose CI/CD Config"
|
||||
|
||||
[allowlist]
|
||||
description = "Ignore sample/example files and placeholders"
|
||||
paths = ['''.*\.env\.sample$''', '''.*\.env\.example$''', '''.*example.*''']
|
||||
|
||||
regexes = [
|
||||
'''\$\{[A-Za-z0-9_]+\}''',
|
||||
'''(?i)(my-password|my-super-secret-auth-token|super_secret_password|very_sensitive_secret)''',
|
||||
]
|
||||
|
||||
[[rules]]
|
||||
id = "docker-env-password"
|
||||
description = "Hardcoded password in docker-compose environment"
|
||||
regex = '''(?i)([A-Z0-9_]*(PASSWORD|PASS|PWD))\s*[:=]\s*['"]?([^$'{"][^\s'"]{5,})['"]?'''
|
||||
secretGroup = 3
|
||||
regex = '''(?i)(PASSWORD|PASS|PWD)\s*[:=]\s*['"]?([^$'{"][^\s'"]{5,})['"]?'''
|
||||
secretGroup = 2
|
||||
tags = ["docker", "compose", "password", "env"]
|
||||
|
||||
[[rules]]
|
||||
id = "docker-env-secret"
|
||||
description = "Hardcoded secret, token, or API key in docker-compose environment"
|
||||
regex = '''(?i)([A-Z0-9_]*(SECRET|TOKEN|API[_-]?KEY))\s*[:=]\s*['"]?([^$'{"][A-Za-z0-9_\-]{15,})['"]?'''
|
||||
secretGroup = 3
|
||||
regex = '''(?i)(SECRET|TOKEN|API[_-]?KEY)\s*[:=]\s*['"]?([^$'{"][A-Za-z0-9_\-]{15,})['"]?'''
|
||||
secretGroup = 2
|
||||
tags = ["docker", "compose", "secret", "env"]
|
||||
|
||||
[[rules]]
|
||||
@@ -25,13 +34,3 @@ id = "private-key"
|
||||
description = "Private key detected"
|
||||
regex = '''-----BEGIN( RSA| EC| DSA| OPENSSH)? PRIVATE KEY-----'''
|
||||
tags = ["key", "pem", "compose"]
|
||||
|
||||
[[allowlists]]
|
||||
description = "Ignore env templates, examples, comments, and variable substitutions"
|
||||
paths = ['''.*\.env\.sample$''', '''.*\.env\.example$''', '''.*example.*''']
|
||||
|
||||
regexes = [
|
||||
'''^\s*#''',
|
||||
'''\$\{[A-Za-z0-9_]+\}''',
|
||||
'''(?i)(my-password|my-super-secret-auth-token|super_secret_password|very_sensitive_secret)''',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user