-
Notifications
You must be signed in to change notification settings - Fork 647
Expand file tree
/
Copy path.gitleaks.toml
More file actions
121 lines (111 loc) · 5.44 KB
/
Copy path.gitleaks.toml
File metadata and controls
121 lines (111 loc) · 5.44 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
title = "Agenta Gitleaks Configuration"
version = 2
[extend]
useDefault = true
[allowlist]
paths = [
# ------------------------------------------------------- QA RUN RECORDS
# Gate-run and benchmark result files carry deliberate high-entropy MARKER
# strings (QA-CWD-*, QA-APPROVE-*) that the release-gate cells write and read
# back to prove storage round trips. They are test artifacts, not credentials.
'''^\.agents/skills/agent-release-gate/resources/qa-gate-runs/.*''',
'''^benchmarks/agent-config-editing/results/.*''',
# ---------------------------------------------------------------- PUBLIC DOCS
'''^website/docs/reference/api/.*\.mdx''',
'''^core/docs/docs/reference/api/.*\.mdx''',
'''^docs/docs/reference/api/.*\.mdx''',
'''^docs/.docusaurus/.*''',
'''^docs/build/.*''',
# -------------------------------------------------------------- WEB ARTIFACTS
'''^.*/\.pnpm-store/.*''',
'''^.*/public/__env\.js$''',
'''^.*/\.next/.*''',
# -------------------------------------------------------------- ALL ENV FILES
'''^.*\.env.*$''',
# -------------------------------------------------- LOCAL-DEV STORE FALLBACK KEY
# webidentity.py ships a hardcoded RSA key used ONLY as the local-dev fallback for
# signing the object-store's web-identity token (production setups must set
# AGENTA_STORE_JWT_PRIVATE_KEY or must not use it).
# IT IS NOT A REAL SECRET — it only signs throwaway dev store creds.
# See the comment there.
'''^api/oss/src/core/store/webidentity\.py$''',
# ----------------------------------------------------------------------------
]
regexes = [
# ------------------------------------------------------------ FALSE POSITIVES
'''is_completion=True''',
'''is_valid=true''',
'''YOUR_API_KEY''',
'''_SECRET_KEY''',
# Fake token in the runner's redaction test — the test asserts this marker never
# reaches the transcript. Named to be obviously synthetic; not a credential.
'''marker-live-secret-42bd''',
# Two dead fixture strings from the write-only vault work. The fixtures themselves were
# rewritten to digit-free names, but these spellings survive in commits whose amend
# could not be replayed, and both scans read history rather than the tree. Exempted by
# VALUE, not by path, and deliberately not by fingerprint: a fingerprint names the
# commit it was seen in, so it goes stale every time a lane below is rebased.
'''sk-live-1234567890abc''',
'''sk-mine-9876543210xyz''',
# ------------------------------------------------------------ PUBLIC KEYS
'''phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7''', # POSTHOG
'''phc_3urGRy5TL1HhaHnRYL0JSHxJxigRVackhphHtozUmdp''', # POSTHOG
'''phc_CwyyDlHGNnRFptVWhTe0HOeKnq1jeOZNk9hduYiOClp''', # POSTHOG
'''phc_qH8GezjMAeToR9ygdsnTH0C9c2njhO7CFqf66pTUX7H''', # POSTHOG
'''18ab633e81d706cbda7c78d25d0fe763''', # ALGOLIA
# ------------------------------------------------- LOCAL-DEV STORE SIGNING KEY
# Dummy SeaweedFS STS signing key shown (commented) as a format hint in the dev
# env examples. Decodes to "this-is-a-signing-key-for-mounts" — not a real secret.
'''dGhpcy1pcy1hLXNpZ25pbmcta2V5LWZvci1tb3VudHM=''',
# ------------------------------------------- INTERACTION-ROW JOIN KEYS (uuids)
# The replayed-transcript fixtures under AgentChatSlice carry a recorded session's
# interaction rows, whose `token` is the uuid joining a row to its tool call — a
# durable interaction id, not a credential. generic-api-key reads each one as a
# secret. Exempts the VALUE only, never a path: a `paths` entry makes gitleaks skip
# the whole file before scanning it, so a real key added to a fixture would go
# unseen. Anchored, so only an exact lowercase uuid is exempt.
# Scoping this further to a `"token": "<uuid>"` LINE needs a second `[[allowlists]]`
# block with regexTarget = "line"; gitleaks 8.24.3 (pinned by 17-secret-scan.yml)
# silently ignores the plural form and drops every allowlist above with it. Tighten
# this when that pin moves past 8.26.
'''^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$''',
# ----------------------------------------------------------------------------
]
[[rules]]
id = "agenta-api-key"
description = "Detected Agenta API Key"
regex = '''[a-zA-Z0-9]{8}\.[a-f0-9]{64}'''
keywords = ["AGENTA_API_KEY", "ApiKey"]
[[rules]]
id = "google-api-key"
description = "Detected Google API Key"
regex = '''AIza[0-9A-Za-z\-_]{35}'''
keywords = ["GOOGLE_API_KEY", "AIza"]
[[rules]]
id = "openai-api-key"
description = "Detected OpenAI API Key"
regex = '''sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20}'''
keywords = ["OPENAI_API_KEY", "sk-"]
[[rules]]
id = "openai-api-key-new"
description = "Detected OpenAI API Key (new format)"
regex = '''sk-proj-[a-zA-Z0-9_-]{43,}'''
keywords = ["OPENAI_API_KEY", "sk-proj-"]
[[rules]]
id = "anthropic-api-key"
description = "Detected Anthropic API Key"
regex = '''sk-ant-[a-zA-Z0-9\-_]{95,}'''
keywords = ["ANTHROPIC_API_KEY", "sk-ant-"]
[[rules]]
id = "cohere-api-key"
description = "Detected Cohere API Key"
regex = '''(?i)(cohere[_-]?api[_-]?key|COHERE[_-]?API[_-]?KEY)['"]?\s*[:=]\s*['"]?([a-zA-Z0-9]{40})'''
keywords = ["COHERE_API_KEY"]
[[rules]]
id = "huggingface-token"
description = "Detected Hugging Face Token"
regex = '''hf_[a-zA-Z0-9]{34}'''
keywords = ["HUGGINGFACE_TOKEN", "HF_TOKEN", "hf_"]
# USEFUL GITLEAKS COMMANDS
# gitleaks --config .gitleaks.toml --exit-code 1 --verbose git
# gitleaks --config .gitleaks.toml --exit-code 1 --verbose detect --no-git