-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitleaks.toml
More file actions
58 lines (50 loc) · 1.63 KB
/
Copy path.gitleaks.toml
File metadata and controls
58 lines (50 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Gitleaks Configuration for AIxGo
# This configuration reduces false positives from example secrets in documentation and tests
title = "AIxGo Secret Scanning Configuration"
[allowlist]
description = "Allowlist for example/test secrets and documentation"
# Paths that commonly contain example/test secrets
paths = [
'''.*_test\.go$''',
'''.*testutil\.go$''',
'''web/content/examples/.*''',
'''docs/.*\.md$''',
'''examples/.*''',
'''config/.*\.yaml$''',
'''\.github/.*''',
]
# Regex patterns for obviously fake/example secrets
regexes = [
'''<.*?>''', # Placeholder patterns like <your-api-key>
'''test-fixture-.*''', # Test fixture markers
'''EXAMPLE''', # EXAMPLE markers
'''REPLACE.*''', # REPLACE_WITH patterns
'''your-.*-key''', # your-xxx-key patterns
'''your-.*-here''', # your-xxx-here patterns
'''example-.*''', # example-xxx patterns
]
# Specific commits to ignore (if needed)
commits = []
# Stop words - if these appear in a secret, it's likely a false positive
stopwords = [
"example",
"test",
"fixture",
"placeholder",
"replace",
"your-",
"fake",
"dummy",
"sample",
]
# Custom rules to override defaults
[[rules]]
id = "example-api-keys"
description = "Ignore obviously example API keys"
regex = '''(?i)(example|test|fixture|placeholder|your[-_]|fake|dummy|sample)'''
allowlist = { regexes = ['''.*'''] }
[[rules]]
id = "placeholder-secrets"
description = "Ignore placeholder patterns in angle brackets"
regex = '''<[^>]+>'''
allowlist = { regexes = ['''.*'''] }