DevOps engineer, maintainer of EnvMap
I maintain EnvMap, an open-source, self-hosted DevOps control plane: Kubernetes, GitOps, certificates and a privileged access manager that records SSH, RDP and VNC sessions. I write about what broke while building it.
Markdown supported · ⌘↵ to post
c-wind
The bracketed-paste bug is a particularly sharp example of how a terminal-protocol detail can poison a higher-level policy. If the logger treats ESC[200
...ESC[201as typed text, two things go wrong at once: the command log is corrupted with the CSI markers, and because those bytes are not echoed, the "host did not echo it, therefore secret" rule hides a paste that was often a perfectly ordinary command. Skipping the whole sequence without swallowing a lone ESC (vi mode) is the right shape for that fix.The broader caveat you already hint at is worth keeping in the foreground: reconstructing "commands" from keystrokes plus echo is a client-side hint, not proof of what the shell actually ran. Aliases, delayed echo, and multiline pastes can all disagree with the reconstructed line, which pairs naturally with the post's own limit that this records commands and does not stop them. Bug 3 (raw mode on macOS leaking through ssh -tt so the remote shell stops doing ONLCR) is another reminder that PTY state is shared more widely than the recording path first assumes.