Delete unused rpc.DefaultTransport and reject out-of-range integer attrs#977
Open
phinze wants to merge 2 commits into
Open
Delete unused rpc.DefaultTransport and reject out-of-range integer attrs#977phinze wants to merge 2 commits into
phinze wants to merge 2 commits into
Conversation
DefaultTransport had no references anywhere outside its own init(). Live client connections build TLS config from State.clientTlsCfg and pin the peer certificate through VerifyPeerCertificate, so nothing ever reached this transport or the InsecureSkipVerify on it. Removing it clears a CodeQL go/disabled-certificate-check alert that was pointing at dead code. DefaultQUICConfig stays, since client.go and State.qc both still use it.
MakeAttr parsed with ParseInt(..., 64) and then converted to int, which silently truncates on 32-bit builds. The value is user-supplied, so an oversized input would be stored as some unrelated number rather than refused. Atoi parses at the platform's int width and returns ErrRange, so the existing error path rejects it at the boundary. Clears a CodeQL go/incorrect-integer-conversion alert.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRemoved the exported Comment |
phinze
marked this pull request as ready for review
July 24, 2026 22:16
evanphx
approved these changes
Jul 24, 2026
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.
rpc.DefaultTransportwas an exported package var carryingInsecureSkipVerify: true, which is the sort of thing worth a second look. It turns out nothing referenced it outside its owninit(). Real client connections build their TLS config fromState.clientTlsCfgand pin the peer certificate throughVerifyPeerCertificate, so this transport was never in any code path. Deleting it is both the fix and the explanation.DefaultQUICConfigsitting next to it is genuinely used and stays.MakeAttrparsed integer attribute values withParseInt(..., 64)and then converted toint, which silently truncates on a 32-bit build. Since the value arrives over the wire, an oversized input would have been stored as some unrelated number rather than refused.Atoiparses at the platform's int width and returnsErrRange, so the error path that was already there now catches it.Two revs since the changes are unrelated.