Guide · Audit
See which programs read your secrets
A secret sitting in a file can be read by anything that can open the file, and nothing records it. When a key leaks, you want to know who read it.
In shortOpen Activity in the app or run lk log to see each read with the program chain, folder and command. Run lk log --verify to check that no entry was changed, removed or added.
Why plain files can't answer this
A .env file records nothing about who opened it. A leaked key could have come from your editor, a test run, a script, or an agent working in the folder. Without a record you rotate everything and guess.
With Latchkey, values are read through the app, and the app logs each read, change, grant, move, import and push. The log holds the program chain and the folder. It does not hold values.
Read the record
-
Look in Activity
In the app, Activity has search, and filters by event and project, grouped by day. An entry's detail shows the action, the items, the decision, who asked and through which programs, the folder and the command.
-
Read the log from the terminal
The same entries are available from the command line.
--limittakes 0 through 1000.Terminal lk log --limit 20lk logprints one readable line per entry. The file behind it,~/Library/Application Support/Latchkey/access.jsonl, holds one JSON object per line. The fields to read areop(what happened),names(which items),decision(allowed or approved, with why; or denied or refused),chain(the calling program's parent processes, nearest first),cwdandcommand. This one is an example:Example entry {"chain":["zsh","claude","Terminal"],"command":"latchkey run -- npm test","cwd":"/Users/you/Projects/shop","decision":"allowed (grant k3v9q2)","names":["shop/development/DATABASE_URL"],"op":"get","time":"2026-11-10T20:14:03Z"}Real entries also carry
prevandmac, the hash chain that--verifychecks. -
List what one program touched
To ask what was released to programs started under a name, such as an agent, use
touched. It reads the access log on this Mac, and counts reads that were allowed or approved.Terminal lk touched --since 24h --by claude -
Check the log wasn't edited
Each entry carries a keyed hash of itself and the entry before it. The key lives in your keychain, where only Latchkey can read it. Verifying checks the whole chain.
Terminal lk log --verifyWhen every entry is as Latchkey wrote it, it prints
intact: N signed entriesand exits 0. Otherwise it exits 1 and names the first line that isn't, with the reason. It finds an entry that was changed, removed or added, and a log cut short. -
Check an item's earlier values
For one item,
historylists earlier values by when, why (changed, deleted or restored) and by whom. It never prints the values. Latchkey keeps the last 10 earlier values of each item.Terminal lk history shop/development/STRIPE_KEY
What this doesn't do
- The log can't stop a program running as you from deleting the file. It can only show that it happened.
- It records what Latchkey released, not what a service saw. A command that has a value can do what it likes with it.
- The caller chain is informative, not proof. The caller itself is checked by signature, but its parents are named by their files, and file names can be faked. Judge an entry by its folder and command too.
- Command lines in the log have likely secrets replaced with
<redacted>. That is a heuristic, not a guarantee, so keep secret values out of command arguments.
More detail is in the log, history and Security.