forked from RHEcosystemAppEng/agentic-plugins
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitleaks.toml
More file actions
68 lines (57 loc) · 1.75 KB
/
Copy path.gitleaks.toml
File metadata and controls
68 lines (57 loc) · 1.75 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
# Gitleaks configuration agentic-plugins
# Version: 8.18+
# Documentation: https://github.com/gitleaks/gitleaks
title = "agentic-plugins Secret Detection"
[extend]
# Use gitleaks default rules as base
useDefault = true
# Custom rules for project-specific patterns
[[rules]]
id = "mcp-hardcoded-credentials"
description = "Hardcoded credentials in mcps.json files (must use ${ENV_VAR} pattern)"
regex = '''["'](?:LIGHTSPEED_CLIENT_ID|LIGHTSPEED_CLIENT_SECRET|API_KEY|SECRET|TOKEN|PASSWORD)["']\s*:\s*["'][^"']{8,}["']'''
path = '''\.(mcp|mcps)\.json$'''
tags = ["mcp", "credentials"]
[[rules]]
id = "openai-api-key-project"
description = "OpenAI Project API Key"
regex = '''sk-proj-[a-zA-Z0-9_-]{40,}'''
tags = ["api-key", "openai"]
[[rules]]
id = "database-url-with-password"
description = "Database connection string with embedded password"
regex = '''(postgres|mysql|mongodb|redis)://[^:]+:[^@\s]{3,}@'''
tags = ["database", "credentials"]
# Allowlist (paths to exclude from scanning)
[allowlist]
description = "Allowlisted files and patterns"
# Exclude test fixtures and example files
paths = [
'''(^|/)examples/''',
'''(^|/)tests?/fixtures/''',
'''(^|/)docs/examples/''',
'''\.md$''', # Documentation files
]
# Allowlist specific patterns that are false positives
regexes = [
# Environment variable references
'''\$\{[A-Z_]+\}''',
'''\$[A-Z_]+''',
'''process\.env\.[A-Z_]+''',
'''os\.environ\[''',
# Example/dummy markers
'''(example|sample|dummy|placeholder|not.?real|test)''',
# Masked values
'''(\*\*\*|xxx|REDACTED)''',
]
# Stopwords - if these appear near a secret, it's likely a false positive
stopwords = [
"example",
"sample",
"test",
"dummy",
"placeholder",
"fake",
"mock",
"not-real",
]