ci: tune gitleaks scan
Gitleaks / gitleaks (push) Failing after 4s

This commit is contained in:
2026-06-01 20:49:24 -04:00
parent 6fa52e13da
commit 74da06c583
2 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -20,4 +20,4 @@ jobs:
chmod +x gitleaks chmod +x gitleaks
- name: Run Gitleaks - name: Run Gitleaks
run: ./gitleaks detect --source . --config .gitleaks.toml --verbose run: ./gitleaks dir . --config .gitleaks.toml --verbose
+13 -14
View File
@@ -1,17 +1,26 @@
title = "Gitleaks Docker Compose CI/CD Config" 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]] [[rules]]
id = "docker-env-password" id = "docker-env-password"
description = "Hardcoded password in docker-compose environment" description = "Hardcoded password in docker-compose environment"
regex = '''(?i)([A-Z0-9_]*(PASSWORD|PASS|PWD))\s*[:=]\s*['"]?([^$'{"][^\s'"]{5,})['"]?''' regex = '''(?i)(PASSWORD|PASS|PWD)\s*[:=]\s*['"]?([^$'{"][^\s'"]{5,})['"]?'''
secretGroup = 3 secretGroup = 2
tags = ["docker", "compose", "password", "env"] tags = ["docker", "compose", "password", "env"]
[[rules]] [[rules]]
id = "docker-env-secret" id = "docker-env-secret"
description = "Hardcoded secret, token, or API key in docker-compose environment" 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,})['"]?''' regex = '''(?i)(SECRET|TOKEN|API[_-]?KEY)\s*[:=]\s*['"]?([^$'{"][A-Za-z0-9_\-]{15,})['"]?'''
secretGroup = 3 secretGroup = 2
tags = ["docker", "compose", "secret", "env"] tags = ["docker", "compose", "secret", "env"]
[[rules]] [[rules]]
@@ -25,13 +34,3 @@ id = "private-key"
description = "Private key detected" description = "Private key detected"
regex = '''-----BEGIN( RSA| EC| DSA| OPENSSH)? PRIVATE KEY-----''' regex = '''-----BEGIN( RSA| EC| DSA| OPENSSH)? PRIVATE KEY-----'''
tags = ["key", "pem", "compose"] 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)''',
]