-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitleaks.toml
More file actions
72 lines (60 loc) · 1.74 KB
/
.gitleaks.toml
File metadata and controls
72 lines (60 loc) · 1.74 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
title = "Gitleaks Configuration for Showcase Project"
[extend]
useDefault = true
# カスタムルール
[[rules]]
id = "supabase-anon-key"
description = "Supabase Anon Key detected"
regex = '''eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+'''
tags = ["key", "supabase"]
[[rules]]
id = "stripe-api-key"
description = "Stripe API Key detected"
regex = '''(sk|pk)_(test|live)_[0-9a-zA-Z]{24,}'''
tags = ["key", "stripe"]
[[rules]]
id = "vercel-token"
description = "Vercel Token detected"
regex = '''vercel_[a-zA-Z0-9]{24,}'''
tags = ["key", "vercel"]
[[rules]]
id = "openai-api-key"
description = "OpenAI API Key detected"
regex = '''sk-[a-zA-Z0-9]{32,}'''
tags = ["key", "openai"]
[[rules]]
id = "aws-access-key"
description = "AWS Access Key detected"
regex = '''AKIA[0-9A-Z]{16}'''
tags = ["key", "aws"]
[[rules]]
id = "github-token"
description = "GitHub Token detected"
regex = '''gh[pousr]_[A-Za-z0-9_]{36,255}'''
tags = ["key", "github"]
[[rules]]
id = "notion-api-key"
description = "Notion API Key detected"
regex = '''secret_[a-zA-Z0-9]{43}'''
tags = ["key", "notion"]
# ホワイトリスト(誤検知を防ぐ)
[allowlist]
description = "Allowlisted files and patterns"
# 特定のファイルパスを除外
paths = [
'''\.env\.example$''',
'''\.env\.template$''',
'''README\.md$''',
'''docs/.*\.md$''',
'''/dist/.*''',
'''/node_modules/.*''',
'''\.git/.*''',
]
# 特定のパターンを除外(例:ダミーキーやテストキー)
regexes = [
'''(dummy|example|test|your-.*-here|your-anon-key|REPLACE_ME|pk_test_dummy|sk_test_dummy)''',
'''(process\.env\.|import\.meta\.env\.|Deno\.env\.get)''',
'''(/\*.*\*/|//.*|#.*)''',
]
# 特定のコミットを除外する場合はここに追加
commits = []