Secret managers don't stop leaks
Vaulting and exposure are different problems: a perfectly managed key pasted into a client bundle is still leaked.
Secret managers don't stop leaks
A flawlessly operated vault and a leaked key coexist more comfortably than the category's marketing suggests. This separates what secrets managers genuinely solve from where the exposure problem actually lives — and explains why the two so rarely meet.
The title is deliberately blunt because the confusion it names has real costs: teams adopt secret managers partly expecting leak protection, then under-invest in everything that actually observes leaks, discovering the gap during incidents. Secret managers are excellent infrastructure — for a different problem. Conflating the two problems means buying the wrong coverage while feeling covered.
The precise claim, defended throughout this article: secret managers solve the storage-and-distribution problem; leaks happen at the consumption-and-exposure boundary, which no storage technology observes. A credential fetched flawlessly from Vault, injected cleanly into a build, and inlined into a served JavaScript bundle is simultaneously a vaulting success story and a public disclosure. Both facts are true at once. Everything below elaborates that sentence into architecture, worked failure, and reframed decision criteria. Companion pieces: the maturity model places vaults among stages honestly; scanning versus monitoring covers the observation gap's mechanics.
What secret managers actually solve
Credit where due, precisely. Mature secret management delivers real capabilities:
- Encrypted storage at rest, removing plaintext credentials from laptops, dotfile repos, and shared drives.
- Authenticated, authorized access — per-consumer policies so each service reads only its values, with revocation that outclasses dashboard toggles.
- Audit trails answering "who read what, when" — an evidentiary surface flat files never had.
- Distribution discipline eliminating chat-message and clipboard handoffs (lifecycle stage one).
- Rotation tooling and, where backends permit, dynamic generation of short-lived credentials.
- Central inventory replacing spreadsheet archaeology.
Against the storage-era threat model — credentials scattered across machines and inboxes — these capabilities are transformative, and the maturity staging recommends adoption exactly when coordination pain makes them pay off. Nothing here argues against vaults. It argues against a specific inference: from "our keys are vaulted" to "our keys don't leak."
The consumption gap
A stored secret has value only once it reaches code that uses it. Trace the journey:
vault ──fetch──▶ process environment / build input ──use──▶ running application ──?──▶ outside world
Every arrow after the vault door is unobserved by the vault. The fetch succeeds, the audit log records a legitimate read by a legitimate service, and control ends there. What happens downstream — where the value gets copied, logged, embedded, or transmitted — belongs to entirely different systems with entirely different observers.
The exit points are enumerable because they recur across every stack:
| Exit point | Mechanism | Observer |
|---|---|---|
| Client bundles | Framework prefix conventions inline build-time values into served JS (mechanics) | Artifact scanning |
| Build logs & CI artifacts | Echoed variables, derived-value masking gaps, retained artifacts (catalogue) | Log hygiene + retention policy |
| Error reporters & APM | Config objects serialized into exception payloads | Data-scrubbing configuration |
| Git history | Values pasted before vaulting, or fetched-then-committed | Repo-side scanners |
| Mobile binaries | Keys compiled into distributed packages | Binary audits |
Note what every row shares: the vault's own telemetry shows nothing anomalous. The read was authorized. The distribution was designed. Storage did its job perfectly right up until its output became public.
A worked failure: best practices all the way down
Watch it assemble from components nobody calls mistakes. Synthetic values throughout (FAKE… convention).
- The team adopts proper secret management. The OpenAI project key lives in the platform vault —
sk-proj-FAKE000000000000000000000— referenced nowhere in source. Stage 3 achieved, audited, celebrated.
- A feature needs AI summarization. An assistant wires the call into a component; the build fails resolving the server-only variable in client context; the fastest repair renames the variable into the framework's publication convention (the full migration loop). The vault reference becomes a prefixed reference.
- The platform injects at build time, as designed. The variable resolves through documented substitution into a string literal inside the served chunk.
- The bundle ships. Every visitor downloads
sk-proj-FAKE…. Collector scripts indexing published assets harvest it within whatever window applies.
- The vault dashboard remains green. Reads authorized, consumers registered, rotation scheduled. No signal exists anywhere in the storage layer, because the storage layer observed nothing unusual — the entire failure occurred downstream of every sensor it operates.
Post-incident review finds zero policy violations and one public credential. The tools all worked; the composition leaked. That sentence describes most modern exposures more accurately than any carelessness narrative.
It also explains why vault dashboards feel so reassuring during exactly the incidents they can't see: every metric shown — reads authorized, policies enforced, rotations completed — measures the storage axis, while the incident lived entirely on the other one. Dashboards are honest; their silence about downstream state is structural, not negligent. The corrective is adding an exposure-axis instrument beside them (what that instrument watches), so the next review shows both halves of the system's actual state.
Why tooling conversations conflate the axes
Two forces push storage and exposure together in buyers' minds despite their independence:
Vendor framing: secrets platforms market security outcomes broadly; "leak prevention" appears adjacent to "centralized management" in positioning even where product capability covers only the latter. Procurement inherits the adjacency.
Ladder thinking: the maturity model itself implies progression toward safety, and vaults sit high on visible rungs. But the stages measure storage sophistication, while exposure outcomes depend on the orthogonal axis — observation of what leaves storage. High-maturity-storage/low-exposure-visibility is a stable, common, dangerous configuration.
The clean decomposition:
| Axis | Question | Tools |
|---|---|---|
| Storage & distribution | Are credentials controlled at rest and in transit? | Vaults, platform stores, federation |
| Exposure & consumption | Do we observe what deployed systems actually reveal? | Artifact scanning, monitoring, response playbooks |
Neither axis substitutes for the other. Scores on one predict nothing about scores on the other — which is testable: audit any team's vault posture and artifact posture separately, and watch correlation fail.
Applying the map to familiar setups makes the independence concrete:
| Setup | Storage axis | Exposure axis | Gap |
|---|---|---|---|
| Vault + CI scans of source only | Strong | None | Bundles unwatched |
| Platform variables + artifact monitoring | Moderate | Strong | Dashboard sprawl, weak audit |
| Vault + artifact monitoring + rotation cadence | Strong | Strong | The target state |
.env files + nothing | Weak | None | The starting point this series exists to move |
Every row is stable and commonly found; none is hypothetical. The rows also explain why security investments disappoint their sponsors: row-one teams bought axis-one coverage while their incidents arrived through axis two, and concluded — wrongly — that the product failed. Products don't fail at covering axes they never claimed; purchasing that confuses axes guarantees disappointment regardless of vendor quality.
What exposure monitoring adds that storage cannot
Positioned at the consumption boundary, artifact-level observation covers what vaults structurally cannot:
- Ground truth over intent: reads served URLs directly rather than trusting configuration claims about what should ship.
- Drift detection: consecutive scans diff into created/resolved/regressed transitions, catching reintroductions that one-time checks miss (the drift argument).
- Tier awareness: distinguishing expected-public credentials (publishable keys, anon keys under working RLS) from elevated ones — the recognition layer defined in the rules reference.
- Incident evidence: masked findings with fingerprints and chunk locations feed straight into the rotation playbook.
And the relationship composes rather than competes: vaults shrink the population of exposed values by centralizing storage; monitoring bounds the duration of whatever escapes anyway. Teams running both get the intersection that matters — fewer leaks, faster caught.
Reframing the tooling decision
Questions worth asking, split by which axis they interrogate:
Storage-axis diligence (keep doing): per-consumer authorization? Rotation automation? Dynamic generation where supported? Audit retention? Break-glass procedures rehearsed?
Exposure-axis diligence (add if absent): what watches built artifacts before promotion (pipeline placement)? What re-checks deployed surfaces on deploys and schedules? Who gets alerted on regressions, and how fast do they rotate (first-hour runbook)? Can you state today, with evidence, what your production bundle serves?
That last question is the whole article compressed: storage answers where keys live, exposure monitoring answers what keys ship, and users experience only the second answer. If your secrets strategy has one axis funded and the other assumed, the assumption is the risk. KeyDrift occupies the second axis explicitly — verifying what deployed artifacts actually serve, continuous under monitoring — and complements whatever storage stack you run rather than competing with it.
The exit-point audit: mapping where values leave
The consumption gap becomes manageable the moment it's enumerated, so run this exercise once per service that consumes vaulted secrets:
- List every consumer. From the vault's own audit log or access policies: which identities read which secrets, how often, from where? Dormant readers — last touched months ago by a decommissioned job — are the first cleanup wins.
- Trace each consumer's journey downstream. For one representative service, follow the fetched value: into which environment variables? Read by which modules? Do any client-included files reference those names (the substitution question)? Does any logging path serialize configuration?
- Inspect the build boundary. What does the platform inject at build time, and under which names? Names carrying public-by-prefix conventions deserve immediate verification against their values' tiers.
- Check the served artifact. Fetch production JavaScript and search for credential formats — the terminal ground truth every upstream step either feeds cleanly or fails into.
Record results in a two-column inventory: value → furthest observed exit point. Most services terminate safely at "process environment"; the exceptions become your risk register. The audit also ages well — rerun quarterly, it converts drift from surprise into diff, mirroring the transitions logic monitoring applies to artifacts (scanning versus monitoring).
Teams performing this audit once typically discover three patterns worth naming: at least one value whose exit point is further than anyone assumed (usually via an old prefixed variable), at least one consumer nobody can attribute to living code, and near-zero documentation connecting vault entries to runtime behavior. All three findings justify the hour invested; together they reframe the vault from "security layer" to "source system requiring downstream observability" — which is what it actually is.
What done-right looks like on both axes
With the decomposition established, operational maturity reads as a pair of checklists rather than a single vendor decision:
Storage axis (the vault's home turf):
- Per-consumer authorization with least privilege, reviewed quarterly
- Rotation automated or calendar-driven, with overlap procedure
- Audit retention sized for real investigation windows
- Break-glass access documented and rehearsed
- Dynamic generation adopted wherever backends support it
Exposure axis (everything after the fetch):
- Pre-deploy scans of built artifacts in CI (pipeline placement)
- Deploy-triggered plus scheduled monitoring of served surfaces
- Public-credential tiering tuned so findings stay actionable (rules design)
- Alert routing with owners, SLAs, and regression severity bumps
- The exit-point audit above, rerun on cadence
Neither checklist substitutes for the other, and — the practical punchline — neither requires the other to start. A team can begin exposure monitoring this week regardless of storage stage; a team mid-vault-adoption should not postpone exposure work until the migration "finishes," because leaks during migrations are precisely the ones nobody is watching for.
Procurement questions that expose axis confusion
Evaluating secrets platforms goes differently once the two axes are separate. Ask both sets; the answers sort vendors honestly:
Storage-axis questions:
- How are per-consumer authorizations scoped, and can one compromised consumer enumerate others' values?
- What does rotation automation actually cover — which providers, which backends?
- Where do audit logs live, how long are retained, and who can read them?
- What happens to running consumers when the platform is unavailable — caching policy, fail-open versus fail-closed?
Exposure-axis questions:
- Does the product observe built artifacts or served output in any way? (Most honest answers: no.)
- Can it distinguish public-tier credentials from elevated ones in client bundles (the tier problem)?
- Does it alert on regressions — reintroductions after remediation — or only first sightings?
- What's its story for surfaces outside its own injection path: CI logs, third-party bundles, mobile binaries?
Red-flag patterns emerge quickly. A vendor answering exposure questions with storage capabilities ("we encrypt at rest, we rotate automatically") is either confused about scope or hoping you are — and a buyer who can't tell those answers apart is who the framing was built for. Conversely, some vault vendors answer the exposure section with "that's not our layer, here's what complements us" — treat that precision as a positive signal about how they'll behave during incidents.
The exercise costs one procurement call and permanently upgrades how your organization reads security marketing: every future claim gets sorted into an axis before it gets believed.
Dynamic credentials shrink the calculus but do not repeal it: a sixty-minute database credential disclosed into a served bundle still authorizes sixty minutes of queries, and monitoring remains the only control positioned to observe the publication itself. The maturity staging and the exposure axis compose — they never substitute.
One adjacent surface rounds out the picture: the vault platform's own telemetry is exposure-relevant in reverse. Access-pattern anomalies — unfamiliar principals reading secrets, unusual volumes, off-hours fetches — are leading indicators that something downstream is wrong, frequently before artifact-level confirmation arrives. Storage-axis tooling thus contributes to exposure detection indirectly: not by observing outputs, but by noticing that consumption behavior changed. Feed those signals into the same alert channel as artifact findings so responders see one coherent story.
FAQ
We use dynamic short-lived credentials everywhere. Still exposed? Shrunk windows, not closed publications: a sixty-minute token in a served bundle still functions for sixty minutes against collectors operating continuously. Dynamic generation improves the storage axis dramatically — the exposure axis needs its own observer regardless.
Doesn't the vault's audit log show suspicious reads during abuse? It shows reads of your infrastructure's fetches — attacker usage of an already-leaked copy never transits your vault at all. Post-disclosure abuse is invisible to storage telemetry by definition; only provider-side logs and exposure monitoring speak to it.
Should we stop buying secret management then? No — buy it for the right reasons (coordination, audit, rotation economics per the maturity triggers). Stop expecting it to deliver the other axis, and fund that axis accordingly. Disappointment comes from mis-scoped expectations, not from the tooling.
What's the minimal exposure setup alongside our vault? Pre-deploy artifact scan in CI plus deploy-triggered monitoring on production, alerting on critical-severity findings only. Both fit inside a week of setup, and the free scan answers the baseline question immediately.
Storage solved? Verify the boundary it can't see: run KeyDrift's free scan — no signup — and learn what your deployed app actually serves.