Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

docs(ssh): say why known_hosts matching uses HMAC-SHA1

enes3d1854318140
diff --git a/src/core/remote-ssh/native/known-hosts.ts b/src/core/remote-ssh/native/known-hosts.ts
index 2d61c7d67..fe034db22 100644
--- a/src/core/remote-ssh/native/known-hosts.ts
+++ b/src/core/remote-ssh/native/known-hosts.ts
@@ -42,6 +42,10 @@ function globMatch(pattern: string, name: string): boolean {
function hashedMatch(entry: string, name: string): boolean {
// |1|base64(salt)|base64(hmac-sha1(salt, name))
+ // HMAC-SHA1 is not our choice: it is what OpenSSH's HashKnownHosts writes, and we only READ the
+ // user's existing entries — any other algorithm could never match them. The input is a host name
+ // (the hash only hides it from someone reading the file), not a secret. CodeQL's weak-crypto
+ // alert on this line was reviewed and dismissed as a false positive for that reason.
const parts = entry.split('|')
if (parts.length !== 4 || parts[1] !== '1') return false
try {