Skip to content

feat(ssh): verify optional host-key pins on the actual connection - #287

Merged
abruption merged 4 commits into
mainfrom
abruption/v110-ssh-identity-183-20261009
Oct 9, 2026
Merged

abruption merged 4 commits into
mainfrom
abruption/v110-ssh-identity-183-20261009

Conversation

@abruption

@abruption abruption commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Refs #183. Add POSIX-only --ssh-identity and --require-ssh-host-key for list/send/doctor --host. Actual OpenSSH KnownHostsCommand public-key callbacks supply local evidence; preflight destination/port/lookup names remain explicitly diagnostic. Required pins are enforced by strict verification in the actual dispatch connection, not a separate probe. Disable multiplex reuse, DNS acceptance and host-key updates; pin mode uses only the supplied public-key fingerprint, without writing known_hosts. Do not replace user KnownHostsCommand. Ordinary SSH output/behavior remains unchanged.

Preserve independently validated native submission evidence if receipt is missing; no retries. Local callback mismatch before authentication is typed refused/ssh_host_key_mismatch/submitted:false. Callback alone without complete remote response is observed, not verified. Identity-mode list skips the separate advisory installed-version probe.

Type

  • feat

Validation

  • 8 helper/config/fake-dispatch tests passed.
  • Actual OpenSSH 10.3 loopback handshake with an owned in-memory Paramiko4 fixture: correct fingerprint verified with one exec; wrong fingerprint produced zero auth and zero exec requests. Streamed source discarded, never executed. Host private key stayed in memory only; no credential files, personal SSH configuration or real agents.
  • Core353/2skip and docs33 pass; generator/diff pass.
  • Final 8c9543e full extras suite: 800 tests passed, 12 skipped on isolated Python3.14.8; native handshake included. An intermediate full run failed one workflow fixture after changing test dependency placement; resolved by a separate test-only SSH requirements file plus scoped Python3.13 POSIX CI install, not a runtime dependency or bypass.
  • Bounded independent static review found no confirmed blocker; native handshake locally complements the initial fake-transport review limitation.

Boundaries

Ordinary RSA/Ed25519/ECDSA keys on POSIX only; host certificates, security-key types, custom KnownHostsCommand and Windows identity mode fail closed. Operator-owned SSH config/jump trust remains separate. A key reused by multiple hosts is not unique machine/account/session identity or ACK. No real remote host, live agent, operation, install, release or version bump. Four CLI-reference locales and CI test-only setup updated. Local final tests complete; current-head CI and automatic review remain gates; no separate Codex mentions.

Documentation integration follow-up

The four localized SSH pin examples now use a single shell line-continuation backslash. A shell-only regression checks the exact argument boundaries in every locale; it replaces only the executable word with a local capture function and never calls an SSH/client process. The first test harness used a non-POSIX hyphenated function name and failed locally; corrected harness and all 34 documentation tests now pass. Runtime code is unchanged by this follow-up; the prior 800-test extras result applies to 8c9543e. Current-head CI remains a separate gate.

@abruption
abruption marked this pull request as ready for review October 9, 2026 00:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T00:28:27.629700Z 8c9543e Draft marked ready
🔒 Security Review ✅ Completed 2026-10-09T00:30:26.351246Z 8c9543e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption
abruption merged commit f07c403 into main Oct 9, 2026
28 checks passed
@abruption
abruption deleted the abruption/v110-ssh-identity-183-20261009 branch October 9, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant