Main sync: known_hosts mismatch diagnostics (closes the 2026-09-22 live-use audit item) - #7
Merged
Merged
Conversation
The raw knownhosts mismatch error names neither the algorithm the server presented nor what known_hosts holds, so a file scanned with a single algorithm (ssh-keyscan -t ed25519) reads as a MITM alarm when the connection negotiates a different algorithm. Both callback paths (default and accept-new) now wrap mismatches with the host, presented type, on-file types and the scan-without--t remediation. Failing closed is unchanged; the wrap still unwraps to *knownhosts.KeyError.
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.
Hash-preserving sync of Forgejo main (same flow as #5/#6). The branch exists on both remotes so the Forgejo->GitHub push-mirror cannot prune it mid-flight.