-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitleaks.toml
More file actions
60 lines (51 loc) · 1.97 KB
/
Copy path.gitleaks.toml
File metadata and controls
60 lines (51 loc) · 1.97 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
# Nomad Karaoke shared gitleaks config.
# Extends the default ruleset with one custom rule for Discord webhooks
# and an allowlist covering known false-positive paths.
title = "Nomad Karaoke"
[extend]
useDefault = true
# ---------------------------------------------------------------------------
# Custom rules
# ---------------------------------------------------------------------------
[[rules]]
id = "discord-webhook-url"
description = "Discord webhook URL (token embedded in URL)"
regex = '''https://(?:discord|discordapp)\.com/api/webhooks/\d{17,20}/[A-Za-z0-9_-]{60,}'''
tags = ["discord", "webhook", "secret"]
# ---------------------------------------------------------------------------
# Global allowlist
# ---------------------------------------------------------------------------
[allowlist]
description = "Paths and patterns that are known false positives"
paths = [
'''(?i)\.(jpg|jpeg|png|gif|bmp|svg|webp|pdf|ico|mp3|mp4|wav|flac|m4a)$''',
'''(^|/)(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|poetry\.lock|Podfile\.lock|Cargo\.lock|go\.sum|composer\.lock|Gemfile\.lock|uv\.lock)$''',
'''(^|/)node_modules/''',
'''(^|/)vendor/''',
'''(^|/)wp-content/''',
'''(^|/)\.dart_tool/''',
'''(^|/)\.venv/''',
'''(^|/)\.next/''',
'''(^|/)build/''',
'''(^|/)dist/''',
'''(^|/)\.flutter-plugins''',
'''(^|/)test[-_]?fixtures?/''',
'''(^|/)tests?/.*conftest\.py$''',
'''(^|/)tests?/.*test_[^/]+\.py$''',
'''(^|/)tests?/.*_test\.py$''',
'''(^|/).*\.(test|spec)\.(js|mjs|cjs|ts|tsx|jsx)$''',
'''(^|/).*\.test\.local\.(js|mjs|cjs|ts|tsx|jsx|py)$''',
'''(^|/).*\.local\.(js|mjs|cjs|ts|tsx|jsx|py)$''',
]
regexes = [
# Explicit placeholder patterns
'''YOUR_[A-Z_]{2,}''',
'''EXAMPLE_[A-Z_]{2,}''',
'''PLACEHOLDER_[A-Z_]{2,}''',
'''CHANGE[_-]?ME''',
'''<[A-Z_]{2,}>''',
'''\$\{[A-Z_]{2,}\}''',
# Firebase / GCP client API keys — public by design (identify the project,
# access is gated by Firebase Security Rules).
'''AIzaSy[A-Za-z0-9_-]{33}''',
]