Skip to content

test: cover host-key pinning on hops - #130

Merged
cmp-202 merged 1 commit into
masterfrom
test/hop-host-key-pinning
Nov 24, 2026
Merged

cmp-202 merged 1 commit into
masterfrom
test/hop-host-key-pinning

Conversation

@cmp-202

@cmp-202 cmp-202 commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Adds a live test proving that hostHash / hostVerifier are enforced on a hop, not just on the primary connection.

The test connects to a primary, rejects the first hop with hostVerifier: () => false, then runs a valid sibling hop. It needs no stored fingerprint, so it works with CI's throwaway host keys. The runner check verifies the rejected host command does not run, the sibling still runs, and exactly one host-key rejection is reported.

Also documents the test and records that test/coverage.md remains the published v4.1.0 measurement; coverage was not remeasured for this test-only addition.

Verification

  • node scripts/run-live.js hop_host_key --timeout 180 — PASS
  • npm run test:live:all — 31 passed, 0 failed
  • npm test — unit 229 passed; baseline 174 passed / 55 skipped; 0 failed
  • git diff --check — clean

No release, tag, or publish is requested for this change.

Adds a live test proving hostHash and hostVerifier are enforced on a hop, with a valid sibling after the rejected hop to prove failure containment. Documents the test and records that coverage figures remain the v4.1.0 baseline.
@cmp-202
cmp-202 merged commit d091f61 into master Nov 24, 2026
8 checks passed
@cmp-202
cmp-202 deleted the test/hop-host-key-pinning branch November 24, 2026 13:23
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