-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitleaks.toml
More file actions
85 lines (77 loc) · 2.09 KB
/
Copy path.gitleaks.toml
File metadata and controls
85 lines (77 loc) · 2.09 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Kriya gitleaks configuration — secret detection for the automation engine codebase.
# Docs: https://github.com/gitleaks/gitleaks#configuration
title = "Kriya Gitleaks Configuration"
# Inherit the default ruleset, then extend with Kriya-specific rules below.
[extend]
useDefault = true
[[rules]]
id = "kriya-api-token"
description = "Kriya project-level API token pattern"
regex = '''kriya[_-]?(?:api[_-]?)?(?:key|token)["'\s]*[=:]["'\s]*[a-zA-Z0-9]{32,64}'''
keywords = ["kriya_api_key", "kriya-api-key", "kriyaApiKey", "kriya_token"]
[[rules]]
id = "custom-bearer-token"
description = "Bearer token assignment"
regex = '''bearer[\s]+[a-zA-Z0-9\-._~+/]{20,}=*'''
keywords = ["bearer"]
[[rules]]
id = "private-key-block"
description = "PEM-encoded private key"
regex = '''-----BEGIN [A-Z ]+ PRIVATE KEY-----[\s\S]*?-----END [A-Z ]+ PRIVATE KEY-----'''
keywords = ["PRIVATE KEY"]
[[rules]]
id = "jwt-token"
description = "JWT in code"
regex = '''eyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}'''
keywords = ["eyJ"]
[[rules]]
id = "form-credential-leak"
description = "Plausible password/credential baked into form fixtures"
regex = '''(?:password|passwd|pwd|secret)\s*:\s*['"][A-Za-z0-9!@#$%^&*_-]{10,}['"]'''
keywords = ["password:", "passwd:", "secret:"]
# Global allowlist for known fixtures and false positives.
[allowlist]
description = "Kriya-wide allowlist"
regexes = [
'''your[-_]api[-_]key[-_]here''',
'''replace[-_]with[-_]your''',
'''example[-_]key''',
'''test[-_]key''',
'''dummy[-_]key''',
'''placeholder''',
'''sample[-_]token''',
'''[Xx]{20,}''',
'''123456789''',
'''abcdefgh''',
'''sk-[Xx]{48}''',
]
paths = [
'''\.gitleaks\.toml''',
'''node_modules/''',
'''dist/''',
'''build/''',
'''coverage/''',
'''\.min\.js$''',
'''\.bundle\.js$''',
'''\.git/''',
'''\.rollup\.cache/''',
'''docs/.*\.md$''',
'''examples/''',
'''tests?/''',
'''CHANGELOG\.md''',
'''package-lock\.json''',
'''pnpm-lock\.yaml''',
]
commits = []
stopwords = [
"example",
"test",
"dummy",
"placeholder",
"sample",
"demo",
"fake",
"mock",
"template",
"fixture",
]