-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitleaks.toml
More file actions
130 lines (121 loc) · 5.68 KB
/
Copy path.gitleaks.toml
File metadata and controls
130 lines (121 loc) · 5.68 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
title = "exceptd-skills gitleaks config"
# Inherit gitleaks' default ruleset (AWS keys, GCP creds, GitHub tokens,
# npm tokens, generic high-entropy strings, etc.) and add project-
# specific allowlists below. New rules CAN be added here when the
# project gains a new credential shape it wants the scan to catch; for
# now the defaults are the policy.
[extend]
useDefault = true
# gitleaks 8.21+ requires the [[allowlists]] (plural) form; the singular
# [allowlist] is deprecated and rejected when [[allowlists]] is also
# present. Each [[allowlists]] block is independent — a finding is
# suppressed if ANY block matches.
[[allowlists]]
description = "Ed25519 signing public key — tracked, not secret"
# keys/public.pem is the verification half of the skill-signing keypair.
# It is *meant* to be in the repo so downstream verifiers can confirm
# skill integrity without out-of-band key distribution. The private
# half lives at .keys/private.pem and is gitignored. gitleaks' generic
# PEM detector treats every PEM block as suspicious; the public key is
# the documented exception.
paths = [
'''keys/public\.pem''',
]
[[allowlists]]
description = "Ed25519 skill signatures + signed_at timestamps in manifest"
# manifest.json carries an Ed25519 `signature` (base64) and `signed_at`
# timestamp for every skill — AGENTS.md hard rule #13. The signature
# strings are ~88 base64 chars with maximum-entropy content (by design;
# a cryptographic signature with low entropy would be broken). Allowlist
# the manifest by path; the alternative — adding a regex that matches
# 88-char base64 — would defang the generic-high-entropy rule for real
# strings of the same shape elsewhere.
paths = [
'''manifest\.json''',
]
[[allowlists]]
description = "CVE catalog + zero-day lessons — descriptive threat-intel content"
# data/cve-catalog.json and data/zeroday-lessons.json contain CVE
# descriptions that may quote PoC byte counts, exploit fingerprints,
# or technique signatures. These are public threat-intel sourced from
# NVD / CISA KEV / vendor advisories — not credentials. The
# `exploit-availability.json` likewise tracks public PoC URLs (which
# we do NOT redistribute verbatim; we reference the NVD references
# section per AGENTS.md rule on no-direct-exploit-URLs).
paths = [
'''data/cve-catalog\.json''',
'''data/zeroday-lessons\.json''',
'''data/exploit-availability\.json''',
'''data/atlas-ttps\.json''',
]
[[allowlists]]
description = "Playbook JSON files — kebab-case control/signal/indicator IDs"
# data/playbooks/*.json carries dash-separated descriptive identifiers
# like `cloudtrail-monitor-on-old-key-for-residual-use`,
# `gcp-audit-log-monitor-on-old-key`, `rotation-cadence-30d`, signal_ids,
# indicator IDs, remediation_paths. When one of these follows a keyword
# like `credential` it trips gitleaks' generic-api-key entropy heuristic.
#
# Scope this allowlist to that exact shape rather than the whole
# directory: `condition = "AND"` requires BOTH the playbook path AND a
# match against the kebab-ID regex, so a real credential (AWS key,
# GitHub PAT, npm token — none of which are all-lowercase kebab-case)
# committed into a playbook JSON still fires. A path-only allowlist would
# suppress EVERY rule for these contributor-editable files, blinding the
# scan to a genuine leak.
condition = "AND"
paths = [
'''data/playbooks/[^/]+\.json''',
]
# Matches against the captured secret (gitleaks' default regexTarget):
# a lowercase-alphanumeric token of two-or-more dash-joined segments,
# e.g. `rotation-cadence-30d`, `audit-log-monitor-on-credential`.
regexes = [
'''^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$''',
]
[[allowlists]]
description = "Test fixtures and example cache snapshots"
# Tests under tests/ exercise sign/verify round-trips using temporary
# keypairs generated at test time. The literal PEM strings that appear
# in any captured-output assertion are test fixtures, never operational
# keys. sources/feeds/cve-cache.example.json is a clearly-labeled
# example with `_example: true` showing the cached feed shape.
# E2E scenario fixtures under tests/e2e-scenarios/ stage synthetic
# credentials (AWS AKIA keys, OpenAI sk-proj-* tokens) on disk so the
# detectors in secrets / cred-stores / ai-api playbooks have something
# to fire on — these strings are deliberately-planted decoys, never
# operational keys. The scenarios themselves carry the IoC text inline.
paths = [
'''tests/.*\.test\.js''',
'''tests/e2e-scenarios/.*''',
'''sources/feeds/cve-cache\.example\.json''',
]
[[allowlists]]
description = "Evidence-collector regex patterns — matcher source, not credentials"
# lib/collectors/secrets.js declares the regex set the collector
# applies against text files. Patterns like the PRIVATE-KEY-block
# header (`-----BEGIN ... PRIVATE KEY-----`) are matcher source, not
# embedded credentials. Allowlist by path so the collector library
# can carry its own pattern set without tripping the secret scan.
paths = [
'''lib/collectors/.*\.js''',
]
[[allowlists]]
description = "Doc-string placeholder shapes"
# Skill markdown, README, and CHANGELOG legitimately embed CVE IDs,
# ATLAS TTP IDs, framework control IDs, and example RWEP factor lines.
# A small number of these shapes (e.g. exploit-byte-count quotes) trip
# the generic-high-entropy rule.
regexes = [
# CVE IDs themselves.
'''CVE-\d{4}-\d{4,7}''',
# ATLAS / ATT&CK technique IDs.
'''AML\.T\d{4}''',
'''T\d{4}(?:\.\d{3})?''',
# Framework control IDs (NIST 800-53, ISO 27001:2022, SOC 2, etc.).
'''NIST-800-53-[A-Z]{2}-\d{1,3}(?:\.\d+)*''',
'''ISO-27001-2022-A\.\d+\.\d+''',
'''SOC2-CC\d+(?:-[a-z0-9-]+)?''',
# PoC byte-count descriptions used in skill threat-context sections.
'''\b\d{2,4}-byte\s+(?:deterministic\s+)?(?:PoC|exploit|payload)\b''',
]