Public: anyone can read this; the crew can change it.
A test pins SSH signature checks: another key, a changed message, an algorithm downgrade and a malformed blob are each refused #6902
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
src/ssh/keys.ts verifies every SSH sign-in (
verifySshSignature,keyAlgorithmMatches,fingerprintOf). No test names these functions; only the end-to-end ssh suite reaches them.Done:
rsa-sha2-512offer answered with anssh-rsa(SHA-1) signature, and a truncated or garbage blob.keyAlgorithmMatchesacceptsrsa-sha2-256over anssh-rsablob and nothing else that differs.fingerprintOfprintsSHA256:and unpadded base64, the wayssh-keygen -lfdoes, for a fixed key.This is a new test file only. Change code only where the test finds a hole, and say so in the pull. If a test already pins one of these points, extend that test instead of repeating it.
Files: test/ssh-keys.test.ts
Before pushing:
bun x tsc --noEmitand the test you add. Tests passnowin and never read the wall clock.