You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ssh): propagate the verified remote exit code instead of collapsing usage refusals to 1 #52
Security and stability hardening audit finding TS-04 / Low (2026-09-28). Priority is an audit recommendation, not a claim of a production incident.
README documents exit codes as 0/1/2 for success/error/usage. For SSH requests the remote exit code is validated ([0, 1, 2] and consistent with ok), but the local process then sets process.exitCode = result.ok === false ? 1 : 0. A remote usage refusal such as ambiguous_target (remote exit 2) becomes local exit 1, while the same refusal produced locally exits 2.
Reproduced with a fake ssh on a scratch PATH returning a valid refusal JSON with exit 2: the local exit code was 1.
What you expected
When the remote response is verified, the verified remote exit code is propagated, so local and SSH invocations of the same refusal return the same exit code.
Environment
Baseline: published session-peer 0.2.0 (npm latest), repository commit 38a1300369443e064f58bb18e8bda70f31af0fbb.
Audit environment: macOS arm64, Node 22.14.0.
No live message tests or production mutation.
Reproduction: stub ssh executable on a temporary PATH; no network connection.
Activity
fix: harden Codex delivery, CLI parsing, SSH and output (#49-#57) (#62)