Command replay (a class of call, not one reported incident)
Dump the environment of a running process: how to stop it
What happens
Dump the environment of a running process. The call below tries to read a credentials file. The agent sends it through its Bash tool, and it involves Linux processes.
The call
cat /proc/1/environ | tr '\0' '\n'
Tool: Bash. The replay uses placeholder tokens and hosts only.
Fix it without us
Run the agent as its own OS user: Linux lets only the same user, or root, read /proc/PID/environ. Keep secrets out of the environment of long-running processes, and read them from a file with mode 0600 or from a secret manager.
What KYA does
Replay result: Stopped. In the replay test, the local hook denies the call and names the rule.
Rule secret-read-environ, first stopped in version 0.33.0.
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