-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitleaks.toml
More file actions
63 lines (55 loc) · 1.96 KB
/
.gitleaks.toml
File metadata and controls
63 lines (55 loc) · 1.96 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
# Gitleaks configuration for ScriptHammer
# Scans for secrets and credentials before commits/pushes
[extend]
useDefault = true # Use default secret patterns
# Custom rules for ScriptHammer stack
[[rules]]
id = "supabase-service-role-key"
description = "Supabase Service Role Key"
regex = '''sbp_[a-zA-Z0-9]{40}'''
severity = "high"
[[rules]]
id = "supabase-anon-key"
description = "Supabase Anon Key (JWT format)"
regex = '''eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+'''
severity = "medium"
[[rules]]
id = "github-pat-fine-grained"
description = "GitHub Fine-Grained Personal Access Token"
regex = '''github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}'''
severity = "critical"
[[rules]]
id = "stripe-live-key"
description = "Stripe Live Secret Key"
regex = '''sk_live_[a-zA-Z0-9]{24,}'''
severity = "critical"
[[rules]]
id = "stripe-test-key"
description = "Stripe Test Secret Key"
regex = '''sk_test_[a-zA-Z0-9]{24,}'''
severity = "medium"
# Allowlist false positives
[allowlist]
paths = [
'''\.env\.example''',
'''.*\.test\.ts''',
'''.*\.test\.tsx''',
'''.*\.spec\.ts''',
'''docs/.*\.md''',
'''tests/.*''',
'''docker-compose\.yml''', # Supabase demo JWT defaults (public, not real secrets)
'''supabase/docker/.*''', # Local Supabase stack config with demo defaults
]
# Supabase self-hosting demo keys — published verbatim at
# https://supabase.com/docs/guides/self-hosting/docker. JWT payload is
# `{"iss": "supabase-demo", ...}`, signed with the hardcoded demo secret
# `super-secret-jwt-token-with-at-least-32-characters-long`. These two
# signatures ONLY validate against that secret; a real project key has a
# different signature and still trips the supabase-anon-key rule above.
regexes = [
'''dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE''', # demo anon
'''DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q''', # demo service_role
]
# To allowlist specific commits, add their SHA hashes:
# [allowlist]
# commits = ["abc123...", "def456..."]