Command replay (a class of call, not one reported incident)
Read tool opens a private key: how to stop it
What happens
Read tool opens a private key. The call below tries to read a credentials file. The agent sends it through its Read tool, and it involves SSH keys.
The call
{
"file_path": "~/.ssh/id_ed25519"
}
Tool: Read. The replay uses placeholder tokens and hosts only.
Fix it without us
Add a deny rule such as Read(~/.ssh/**) to the Claude Code settings, and protect the key with a passphrase loaded through ssh-agent. A Read rule also covers shell commands such as cat, but not a script that opens the file itself, so enable the Claude Code sandbox when the block must hold.
What KYA does
Replay result: Stopped. In the replay test, the local hook denies the call and names the rule.
Rule secret-read-file, first stopped in version 0.32.8.
The hook is local and advisory. It fails open: if kya breaks or times out, the call goes ahead.
Install
For Claude Code, the host this replay ran on:
/plugin marketplace add The-Pixel-Boys/shield-kya
/plugin install kya@shield-kya
For any host:
npm i -g @shield-agent/kya@latest && kya start