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
[]
= "keyhog"
= "keyhog: detects leaked credentials in source trees, git history, and cloud storage"
= true
= true
= true
= ["Santh Project <security@santh.dev>"]
= true
= "https://github.com/santhsecurity/keyhog"
= "https://github.com/santhsecurity/keyhog"
= "https://docs.rs/keyhog"
= true
= true
= "README.md"
[]
= "alpha"
[]
= "src/lib.rs"
[[]]
= "keyhog"
= "src/main.rs"
[]
# Default = full experience. Only gpu, simd, and binary (Ghidra) are opt-in
# because they require heavy compile-time deps or system libraries.
# cargo install keyhog gives you EVERYTHING else.
= [
"keyhog-scanner/default", # ML, entropy, decode-through, multiline
"git", # Git source backends
"web", # URL scanning (JS/sourcemap/WASM)
"github", # GitHub org scanning
"s3", # S3 bucket scanning
"docker", # Docker image scanning
"verify", # Live credential verification
"tui", # `keyhog tui` live-scan dashboard
"mimalloc", # thread-caching global allocator (scan parallelism)
]
# Thread-caching global allocator for the CLI binary. The scan hot path runs
# one Rayon worker per core, each allocating regex DFA-cache scratch and
# per-match Strings; glibc's arena lock serialises those allocations (visible
# as kernel `osq_lock` contention in `perf`, and as sub-linear thread scaling).
# mimalloc gives every thread its own heap, removing the arena lock. The binary
# chooses this; the libraries stay allocator-agnostic. Disable with
# `--no-default-features` (the `ci`/`portable` profiles that omit it still build).
= ["dep:mimalloc"]
# Lean CI aggregator build: the full default surface minus the GPU dispatch
# stack (`keyhog-scanner/ci-lean`). Used by ci.yml's integration-tests job on
# GPU-less runners; runners-nightly keeps `gpu` on real GPU hosts.
= [
"keyhog-scanner/ci-lean",
"git",
"web",
"github",
"s3",
"docker",
"verify",
"tui",
]
# Unused Cargo flag — use `keyhog scan --fast` at runtime for pre-commit speed.
= []
# macOS release builds: every keyhog-scanner data feature, no system-lib deps
# (no Hyperscan / Ghidra / CUDA). Workflows pass just `--features portable`
# instead of having to enumerate `keyhog-scanner/...` per release.
= [
"keyhog-scanner/ml",
"keyhog-scanner/entropy",
"keyhog-scanner/decode",
"keyhog-scanner/multiline",
"git",
"web",
"github",
"s3",
"docker",
"verify",
"mimalloc",
]
= [
"keyhog-scanner/ml",
"keyhog-scanner/entropy",
"keyhog-scanner/decode",
"keyhog-scanner/multiline",
"git", "web", "github", "s3", "docker",
"verify",
"binary",
"mimalloc",
]
# Maximally-light CI / embeddable profile. Use as:
# cargo install --no-default-features --features ci
# Drops every heavy axis a CI run never needs: NO Hyperscan (`simd` - kills the
# ~1.7s cold-start; the AC+regex path is faster for keyhog's <2K patterns anyway),
# NO GPU/vyre drivers, NO live verification, NO TUI, NO Ghidra, and NO git/web/
# cloud source backends (the always-on filesystem + stdin path covers
# `keyhog scan .` / `keyhog scan --stdin`, which is how CI scans a checked-out
# tree). Keeps the full embedded detector corpus + ML + entropy + decode-through +
# multiline + token efficiency. Instant start, smallest binary - the profile CI
# integrations should use. Git-history / cloud scanning is opt-in on top
# (`--features ci,git`) or via the fuller `portable` profile.
= [
"keyhog-scanner/ml",
"keyhog-scanner/entropy",
"keyhog-scanner/decode",
"keyhog-scanner/multiline",
]
= ["keyhog-sources/git"]
= ["keyhog-sources/github"]
= ["keyhog-sources/s3"]
= ["keyhog-sources/docker"]
= ["keyhog-sources/binary"] # Ghidra decompiler (requires Ghidra installed)
= ["keyhog-sources/web"]
= ["keyhog-verifier/live"]
= ["keyhog-scanner/gpu"] # wgpu compute shader inference (heavy)
= ["keyhog-scanner/simd"] # Vectorscan/Hyperscan SIMD regex (system lib required)
= ["keyhog-scanner/cuda"] # no-op alias: CUDA is the primary GPU backend on Linux, always compiled + runtime-loaded
# Interactive TUI scan dashboard. Pulled in by default; can be turned
# off in size-constrained builds via `--no-default-features`. Adds
# ratatui + crossterm to the dependency closure.
= ["dep:ratatui", "dep:crossterm"]
[]
= { = true }
= { = true, = false }
= { = true, = true }
= { = true, = false }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
# Used by `baseline.rs::save` for atomic-rename writes via
# `NamedTempFile::persist()` — same pattern used by merkle and
# calibration. A mid-write crash on `--update-baseline` would
# otherwise leave a corrupt JSON the next run can't parse.
= { = true }
# `keyhog update` self-updater: GitHub releases API + raw-binary download.
# reqwest is already in the dep tree via the (default-on) verifier; listing
# it here lets the updater issue its own GET without routing through the
# verification client. The atomic running-binary swap uses a same-dir
# rename (Unix lets you replace a running exe's file) - no extra crate.
= { = true }
# Thread-caching allocator (see the `mimalloc` feature above). Optional so
# `--no-default-features` builds (and any platform where the C build is
# undesirable) drop it cleanly and fall back to the system allocator.
= { = "0.1", = true, = false }
# Verify-only minisign: `keyhog update` checks the release binary's
# signature against the embedded public key before self-replacing.
= { = true }
# Pulled in by the `keyhog tui` subcommand for the live-scan demo.
# Both gated behind the `tui` feature so portable builds (Windows,
# macOS via `--no-default-features --features portable`) still build
# without paying the dep cost.
= { = true, = true }
= { = true, = true }
[]
# Used only by `reset_sigpipe()` in main.rs to restore the default
# SIGPIPE handler. Without this, `keyhog scan | head` produces a
# spurious BrokenPipe error instead of exiting cleanly when the
# downstream consumer closes its end of the pipe.
= { = true }
[]
= { = true }
= { = true, = false }
= { = true, = false }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
# Property-based suite (tests/property.rs). These proptests reference `proptest`
# but the dep was missing — the whole property/ dir was orphaned (empty mod.rs)
# so it never compiled and the gap stayed hidden. Pinned via the workspace.
= { = true }
# Mock GitHub releases API for the installer/update lifecycle suite: drive the
# real binary's release-resolution path against deliberately hostile responses
# (malformed JSON, 500s, missing assets) with zero network.
= { = true }