If a secret was ever said out loud, it's already spent

This is my homelab: single-node Kubernetes clusters on Talos, one operator, a private git server for work in progress and a public one for the things I choose to publish. Nothing here describes an employer's systems. The search result is from 9 November 2026 and the repository history I quote was read the next day; the rest is my own configuration.
We reserve the word "compromised" for the dramatic case: the breach, the exfiltration, the attacker already inside the building. That framing quietly lets a far more common event slide, the credential that was simply said somewhere it should not have been. Pasted into a chat to debug something. Echoed into a log line. Printed by a diagnostic command that dumps a whole configuration document when you only wanted one field from it.
No attacker required. The value now lives in a place it was never scoped to live, which is the same thing as a key that has been out of the cabinet overnight. You can put it back. You cannot put back the period when you did not know where it was.
This week the lesson arrived by search engine. A query for my own handle returned a commit page from my public git server, and the snippet carried the name of the environment variable my deploy token travels in. The first minute went on the only question that matters, whether the value was ever in that file. The hour afterwards went on the fact that the page had been copied by a crawler months earlier and would stay in the index until I filed a removal. A crawler is the microphone in the room that nobody remembers switching on.
Stop reasoning about who was in the room
The tempting response is to argue about whether the exposure mattered. The chat was private. The log is internal. The terminal is mine. Every one of those is an assumption about who can read a place, and assumptions about read access fail without announcing themselves. Nobody tells you when a synced shell history lands on a second device, when an internal log ships to an aggregator someone wired up last quarter, or when a crawler takes a copy of a page you had stopped thinking of as public.
So the discipline is blunt: a credential that has appeared anywhere outside its vault is spent. Not "probably fine". Rotate it, and price that rotation as routine hygiene rather than as an incident, because pricing it as an incident is how you teach people not to admit it happened.
The one question worth asking is the one you can answer from a record. For the commit page, the record is the repository's own history:
git log --oneline -S GITEA_TOKEN | wc -l
git log -p -S GITEA_TOKEN | grep -cE 'GITEA_TOKEN=.?[A-Za-z0-9]{20,}'
# 4 then 0: four commits carry the variable's name, none carries anything shaped like its value
That is a clean answer, and it still cost a search-engine removal request, because the name alone tells a stranger which variable to go looking for. There is a corollary for tooling. Commands that print a whole machine configuration will happily render a registry credential in the clear, so when you need one field, grep for that field rather than dumping the document into your scrollback, and never let automation capture such a dump unredacted. The cheapest way to keep a credential out of a transcript is to never ask for it.
Make rotation cheap enough to be boring
The reason this rule gets broken is that rotation hurts. A credential shared across a fleet makes rotating it a fleet-wide event, so it gets deferred, so the exposure runs longer. The remedy sits upstream of the incident: one vaulted place for the value, one named owner, and one action that pushes the new value everywhere it is consumed. The registry's single push identity is the lab's example. Its credential is a pre-hashed line in the vault, and the cluster-side copy is an ExternalSecret:
kubectl -n zot annotate externalsecret zot-push-htpasswd force-sync="$(date +%s)" --overwrite
kubectl -n zot rollout restart deploy/zot
# the operator re-reads the vault now rather than at its next interval; the restart matters because the pod read the old value at start-up
Two commands, and "that touched a transcript, rotate it" becomes a two-minute job instead of a project.
Verify the way you should always verify a credential, which is without looking at it:
kubectl -n zot get secret zot-push-htpasswd -o jsonpath='{.data}' | jq 'keys'
# ["htpasswd"]: the expected key exists and materialised, and the value never reached the terminal
Echoing the value to confirm the rotation worked would put the new credential in exactly the place you just spent the old one.
Retire the credential, not just its permission
One more failure deserves naming, because it looks like completed work. Bootstrap credentials, the long-lived tokens that stand a system up, get revoked in an admin console, the console says revoked, and everyone moves on. But if that value is still sitting in the secret store, and the platform re-applies it on every start, the next restart mints it again. Revocation removed the permission. It did not remove the credential, and the thing that creates the credential is still running.
Revoke it, then delete the key from the store, then restart and confirm it stays gone. A key you took back from someone is not the same as a key that no longer cuts.
The principle
You cannot answer "was it captured?", and every hour spent trying is an hour the value stays live. You can answer "did it appear outside its vault?", today, from a transcript or a history you can point at. Design so that answering yes costs you two minutes, and you will get honest answers.
A credential's secrecy ends the moment it is spoken. Everything after that is paperwork catching up.
Live in the lab: the registry's one push identity is a pre-hashed line in the vault with a named owner and a two-command rotation, the commit page that started this is on a removal list, and the diagnostics that would print a value in the clear are grepped, never dumped.

