Repository navigation
test: cover host-key pinning on hops - #130
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a live test proving that
hostHash/hostVerifierare 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.mdremains the publishedv4.1.0measurement; coverage was not remeasured for this test-only addition.Verification
node scripts/run-live.js hop_host_key --timeout 180— PASSnpm run test:live:all— 31 passed, 0 failednpm test— unit 229 passed; baseline 174 passed / 55 skipped; 0 failedgit diff --check— cleanNo release, tag, or publish is requested for this change.