-
Notifications
You must be signed in to change notification settings - Fork 31
/
gitleaks-custom-config.toml
71 lines (59 loc) · 1.94 KB
/
gitleaks-custom-config.toml
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
title = "gitleaks custom config"
[allowlist]
description = "Skip test content"
paths = ['''leaks.*''', '''test''', '''.*/test/.*''', '''.*\/test\/.*''']
[[rules]]
id = "private-key"
description = "Detect private keys"
regex = '''-----BEGIN (:?[A-Z\-\s]*)PRIVATE KEY-----'''
tags = ["key"]
[[rules]]
id = "generic-secret"
description = "Detect generic password/secret/apikey"
regex = '''(?i)(?:password|pass|pwd|passwd|secret|apikey)\s*(?:=|:)\s*.+'''
tags = ["secret"]
[[rules]]
id = "generic-token-or-key"
description = "Detect generic token/key"
regex = '''(?i)(?:-|_)(?:token|key)\s*(?:=|:)\s*.+'''
tags = ["secret"]
[[rules]]
id = "generic-secret-in-xml-node"
description = "Detect generic password/secret/apikey in a XML node"
regex = '''(?i)<(?:password|pass|pwd|passwd|secret|api\-key|apikey)>.+<\/'''
tags = ["secret"]
[[rules]]
id = "password-in-sql-instruction"
description = "Detect passwords in a SQL instruction"
regex = '''(?i)\s+identified\s+by\s+.+;'''
tags = ["secret"]
[[rules]]
id = "password-as-dash-param"
description = "Detect passwords passed as parameter with a dash prefix"
regex = '''(?i)-+pass[a-z]*\s+['"]?[a-z0-9-_]+['"]?.+'''
tags = ["secret"]
[[rules]]
id = "hash-with-identifier"
description = "Detect password hash"
regex = '''\$[a-zA-Z0-9]+\$[a-zA-Z0-9/\.\$=]{5,}'''
tags = ["hash"]
[[rules]]
id = "token-jwt"
description = "Detect JWT token"
regex = '''ey[A-Za-z0-9]{15,}\.[A-Za-z0-9]{15,}\.[A-Za-z0-9_-]*'''
tags = ["secret"]
[[rules]]
id = "private-ipv4-range10"
description = "Detect private IPv4 range 10"
regex = '''[\s"']{1}10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'''
tags = ["private-ipv4"]
[[rules]]
id = "private-ipv4-range172"
description = "Detect private IPv4 range 172.16"
regex = '''[\s"']{1}172\.16\.[0-9]{1,3}\.[0-9]{1,3}'''
tags = ["private-ipv4"]
[[rules]]
id = "private-ipv4-range192"
description = "Detect private IPv4 range 192.168"
regex = '''[\s"']{1}192\.168\.[0-9]{1,3}\.[0-9]{1,3}'''
tags = ["private-ipv4"]