-
-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy path.gitleaks.toml
More file actions
193 lines (185 loc) · 8.16 KB
/
Copy path.gitleaks.toml
File metadata and controls
193 lines (185 loc) · 8.16 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# gitleaks configuration for claude-code-plugins-plus-skills
#
# Primary secret scanner (replaces the ad-hoc regex scan in validate-plugins.yml
# for the purpose of catching leaked credentials). The repo also runs trufflehog
# on a weekly schedule against the full history as a verified-credentials check.
#
# Extends the upstream default ruleset. Adds repo-specific rules for Anthropic,
# Firebase, and Groq credential shapes.
#
# ALLOWLIST POLICY (blueprint 727 E4.5, 2026-08-19 — enforced by
# scripts/check-gitleaks-config.mjs):
# - NO file-TYPE blankets. The former allowlist excluded ~67% of tracked
# files (every SKILL.md, README.md, CHANGELOG.md, references/*.md,
# 000-docs/*.md, tests/, fixtures/, freshie/) — including the exact
# tests/fixtures/ location other docs recommend for test secrets. All of
# those surfaces are now scanned.
# - Placeholder/teaching examples pass by VALUE (stopwords + regexes below),
# never by excluding the file that holds them.
# - Each surviving path entry is a SPECIFIC surface carrying a
# "reason: ... expiry: YYYY-MM-DD" comment; the shape gate fails a path
# entry without one, and fails any reintroduced type blanket.
[extend]
useDefault = true
[[rules]]
id = "anthropic-api-key"
description = "Anthropic API key"
regex = '''sk-ant-(?:api03|admin01)-[A-Za-z0-9_-]{95,}'''
tags = ["key", "anthropic"]
[[rules]]
id = "firebase-service-account"
description = "Firebase / GCP service-account private key block"
regex = '''-----BEGIN PRIVATE KEY-----[\s\S]+?-----END PRIVATE KEY-----'''
tags = ["key", "gcp", "firebase"]
[[rules]]
id = "groq-api-key"
description = "Groq API key"
regex = '''gsk_[A-Za-z0-9]{40,}'''
tags = ["key", "groq"]
[[rules]]
id = "slack-webhook"
description = "Slack incoming webhook URL"
regex = '''https://hooks\.slack\.com/services/T[A-Z0-9]{8,}/B[A-Z0-9]{8,}/[A-Za-z0-9]{24,}'''
tags = ["url", "slack"]
[allowlist]
description = "Specific documented surfaces + placeholder VALUES. No file-type blankets (E4.5)."
paths = [
# reason: this config file itself holds the detector regexes and example
# values below, which the default rules would re-read as leaks.
# expiry: none (self-referential by construction)
'''^\.gitleaks\.toml$''',
# reason: the canonical validator embeds credential-shape detector
# patterns (its own secret-scanning rule set), not credentials.
# expiry: 2027-06-30 (re-review when the validator consumes the kernel)
'''^scripts/validate-skills-schema\.py$''',
# reason: the hardcoded-secrets scanner ships the canonical detector
# pattern library (BEGIN-PRIVATE-KEY headers, AKIA prefixes, vendor key
# prefixes) as literal strings.
# expiry: 2027-06-30
'''^plugins/security/penetration-tester/skills/scanning-for-hardcoded-secrets/scripts/scan_secrets\.py$''',
# reason: generated mirror of the same detector library promoted by
# freshie/scripts/promote-to-curated.py; the source above is in scope.
# expiry: 2027-06-30
'''^skills/\.curated/scanning-for-hardcoded-secrets/scripts/scan_secrets\.py$''',
# reason: compiled MCP build output; sources under src/ are scanned.
# expiry: 2027-06-30 (re-review if dist/ ever stops being generated)
'''^plugins/mcp/.*/dist/.*\.js$''',
# reason: generated build projections of SKILL.md bodies already scanned
# at their source (skills-catalog/unified-search + the public/ and dist/
# copies build.mjs makes of them); scanning the bundle double-reports
# every source finding on each regen.
# expiry: 2027-06-30
'''^marketplace/src/data/.*\.json$''',
'''^marketplace/public/data/.*\.json$''',
'''^marketplace/dist/.*''',
# reason: generated HuggingFace dataset projection of SKILL.md bodies
# (freshie/scripts export); every embedded example exists in a scanned
# source file.
# expiry: 2027-06-30
'''^freshie/hf-dataset/.*''',
# reason: deleted backups/ tree — absent from HEAD but reachable in the
# weekly fetch-depth:0 history scan, where it re-fired ~60 stale findings
# per run.
# expiry: 2027-06-30 (drop when the weekly scan gains a HEAD-only mode)
'''^backups/.*''',
]
# Placeholder/teaching VALUES. gitleaks skips a finding whose secret matches
# any regex here or contains any stopword below — the file itself stays
# scanned, so a real credential added next to an example still fires.
regexes = [
# AWS public example key — documented by AWS, not a real credential.
'''AKIAIOSFODNN7EXAMPLE''',
# Common placeholder patterns used in plugin bodies.
'''your[-_](api[-_])?key[-_]here''',
'''YOUR_[A-Z_]+''',
'''xxx+''',
'''\*\*\*+''',
'''placeholder''',
'''replace[-_]me''',
'''example\.com''',
# Ellipsis-truncated illustrative value (`sk_live_abc123...`) — a real
# captured credential never contains a literal "...".
'''\.\.\.''',
# Ethereum addresses (USDT/LINK/UNI contract addresses in crypto-pack
# docs) are public identifiers, not secrets.
'''\b0x[0-9a-fA-F]{40}\b''',
# jwt.io canonical demo token family (payload sub "12345…").
'''eyJzdWIiOiIxMjM0NT''',
# Tiered-plan teaching keys in rate-limiter examples.
'''key_(free|pro|ent)_\d+''',
# Environment-labeled fake secrets in multi-env teaching docs.
'''(prod|dev|stag(e|ing))[-_]secret[-_]\d+''',
# Model identifiers matched by the generic rule are not credentials.
'''claude-[0-9a-z.-]+-\d{8}''',
# Prose fragment "GCP/AWS/Vault" captured by the generic rule.
'''GCP/AWS/Vault''',
# Base64 of "tok:abcdefghijklmnopqrstuvwxyz" / "tok:staging_token" /
# "tok:dev_token" — Intercom basic-auth teaching examples. Exact values
# only: real Intercom tokens share the dG9rO prefix, so no prefix rule.
'''dG9rOmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6''',
'''dG9rOnN0YWdpbmdfdG9rZW4=''',
'''dG9rOmRldl90b2tlbg==''',
# Supabase's publicly documented demo JWTs (payload iss "supabase-demo")
# — shipped verbatim in Supabase's own docs for local development.
'''eyJpc3MiOiJzdXBhYmFzZS1kZW1vIi''',
# Base64 placeholders that decode to "api-key-here", "tok:abcdefghi",
# "tok:dev_token_here" (basic-auth teaching examples).
'''YXBpLWtleS1oZXJl''',
'''dG9rOmFiY2RlZmdoaQ==''',
'''dG9rOmRldl90b2tlbl9oZXJl''',
# Documentation UUID examples (sequential/"invalid"-marked shapes).
'''12345678-abcd-1234-efgh-invalid00000''',
'''5f9d6f8e-7c3a-4b2e-9c1d-1e2f3a4b5c6d''',
# Doc text quoting PEM header patterns in backticks (pattern libraries,
# not key material — real PEM bodies never contain a backtick).
'''PRIVATE KEY-----[`'"]''',
# Dead historical npm token from the 2025 v1.3.2 release draft
# (000-docs/143). Redacted from the working tree in the E4.5 PR;
# registry-verified invalid (401) on 2026-08-19. Matched by prefix-anchored
# regex rather than the literal value (GitHub push protection rightly
# refuses commits containing the full token) so the fetch-depth:0 history
# scan doesn't re-fire on a credential that no longer exists.
'''npm_C26t[A-Za-z0-9]{32}''',
# Firebase Web (browser) API key from the retired Firebase-hosted
# BaseLayout.astro (history-only). Firebase Web API keys are public by
# design; the default gcp-api-key rule flags the AIzaSy… shape
# regardless. Exact value, NOT the path, so a real server key ever added
# to an .astro file still surfaces.
'''AIzaSyAUbgBuoMCtcjEdRcYzqu08kuVFVDeiHsM''',
]
stopwords = [
# Sequential/keyboard-walk fillers used across teaching examples.
"abc123",
"123abc",
"abcdef",
"ABCDEF",
"GHIJKL",
"1234567890",
"abcdefghijklmnop",
# Alphabet-walk fillers (uvwxyz9876543210-style example keys).
"uvwxyz",
"hijklm",
# Self-describing placeholder tokens.
"TESTKEY",
"invalid",
"wrong_key",
"WithDecryption",
"your-key",
"your_key",
"api-key-here",
"token-here",
"test-key",
"live-key",
"dev_token",
"USER_TOKEN",
"example",
"EXAMPLE",
"sample",
"dummy",
"changeme",
"change-me",
# Leak-canary fixtures in redaction tests are deliberately fake and
# self-labeled (e.g. xoxb-SECRET-LEAK-CANARY-…).
"CANARY",
"canary",
]