Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is tru…
No functional code change; only tests and commentsComment clarification that DisableAuth only suppresses generated Basic auth, not caller-provided Authorization headersTests now cover WebSocket handshake, cookie bypass, and caller-provided headers
This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctl…
This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for …
BIP324 handshake deadlock avoidanceCPU admission lease split to prevent resource exhaustion / lock holding across network I/OResponder now sends key material before full initiator key is received
This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size lim…
Removes an incorrect size bound that caused base64 PSBT parsing to reject valid large packets (denial-of-service / interoperability issue)Switches from full in-memory base64 decode to incremental streaming, reducing peak memory for large base64 PSBTsRetains strict base64 alphabet checks and rejects trailing data after the PSBT packet
This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying t…
nil-pointer dereference / panic prevention in Taproot PSBT finalizernil-pointer dereference / panic prevention in PSBT serializationinput validation added before sort.Slice and pointer dereference
This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for le…
Denial-of-service via blocking read on open stream (potential infinite hang)Denial-of-service via unbounded memory allocation on base64 input before validationStrict parsing hardening for PSBT base64 decoding
This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the li…
strict parsing of serialized witness datarejection of trailing bytes in PSBT final script witnesspotential malleability / ambiguity reduction in PSBT extraction
This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing by…
Strict parsing of final witness data to reject malformed/trailing bytesPrevents creation of transactions with non-standard witness encodingTest-only commit implies behavior enforcement elsewhere in the codebase
This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo …
BIP-340 signature parsing non-compliancesilent modulo reduction of s componentsignature malleability risk from non-canonical encodings
This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compa…
This commit only adds a new test case. It does not change any production code. The test checks that the PSBT parser rejects files that have extra bytes after a valid PSBT packet. Because no code behavior is changed, this commit by itself d…
Test-only commitNo production code changesTests input-validation behavior (trailing data rejection)
This change tightens how base64-encoded PSBT (Partially Signed Bitcoin Transaction) data is decoded. Previously, the decoder could silently ignore extra whitespace or unexpected characters in the base64 stream. Now it rejects anything that…
Strict input validation added for base64 decodingRejection of whitespace/newlines inside base64 payloadUse of strict base64 decoder to enforce RFC4648 padding rules
This commit only adds a new unit test that checks whether the MuSig2 partial signature decoder correctly rejects empty or too-short inputs. It does not change any production code, so by itself it cannot introduce or fix a security vulnerab…
This commit only adds new test code for the PSBT (Partially Signed Bitcoin Transaction) package. It does not change any production code. The tests verify that WitnessUtxo fields are parsed strictly and correctly, including rejecting extra …
Strict parsing tests for WitnessUtxo transaction outputsRejection of trailing data after serialized txOutCorrect handling of multi-byte CompactSize script lengths
This commit only adds a new test file. It does not change any production code. The test checks that the PSBT parser rejects transaction fields that have extra trailing bytes. Because no actual parser logic is modified, this commit by itsel…
Regression test added for strict parsing of transaction-valued PSBT fieldsNo production code changes
This commit only adds new test code to check that the PSBT (Partially Signed Bitcoin Transaction) parser rejects malformed base64 input such as whitespace, bad padding, or extra bytes. It does not change the actual parser logic. The tests …
strict base64 decoding validationPSBT packet format hardeningrejection of non-canonical base64 input
This change makes the PSBT (Partially Signed Bitcoin Transaction) parser reject files or data that have extra bytes after the end of a valid PSBT. Previously, extra trailing data was silently ignored, which could let an attacker hide malic…
Parser no longer ignores trailing bytesCould prevent smuggling of extra data inside PSBT containersCould prevent canonicalization attacks where different byte sequences parse to the same structure
This commit fixes a bug in the MuSig2 multi-signature code where reading a partial signature from an input stream could fail silently. Previously, if the stream ended early or had a read error, the function would return 'no error' as if th…
Silent failure in cryptographic decode pathPartial signature scalar left uninitialized on read errorMuSig2 signing correctness dependency
This commit tightens how a Bitcoin-related library reads transaction outputs stored inside PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the output value and script in a loose, hand-rolled way that ignored ext…
Strict canonical parsing of serialized transaction outputsRemoval of hand-rolled length handling that ignored script length byteAddition of full-consumption check on parsed witness UTXO data
This commit adds a new helper function to the PSBT (Partially Signed Bitcoin Transaction) package that checks whether a data reader still has leftover bytes after parsing. Leftover bytes could mean a malformed or malicious PSBT file was no…
New validation helper for trailing/leftover data in a binary parserLocated in PSBT parsing utilities, an area where malformed input handling mattersNo caller added in this commit, so defensive effect is not yet active
blockchain: tolerate trailing bytes when loading stored blocks
In this commit, we relax the strict block deserialization introduced as part of the trailing byte hardening. Databases written by older versions of btcd may have persisted blocks with trailing bytes, so refusing to load them would prevent a node from ever starting (or serving such a block) after an upgrade, with no recovery path short of a full resync.
We instead introduce a new dbBlockFromBytes helper, used by both initChainState and dbFetchBlockByNode, that deserializes the block leniently: any trailing bytes are logged, ignored, and excluded from the serialization cached on the returned block, so downstream consumers of the raw bytes never observe them.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedrpcclient: add typed SubmitPackage methodby Elle Mouton · de3d460e · Jun 17, 2026 · 2 filesMessage 68 · AdequateTriage 12Details
Commit message · Elle Mouton
rpcclient: add typed SubmitPackage method
Add SubmitPackage / SubmitPackageAsync / FutureSubmitPackageResult, wrapping the submitpackage RPC the same way TestMempoolAccept wraps testmempoolaccept: serialize the topologically-sorted package to hex, issue the btcjson submitpackage command, and decode the response into btcjson.SubmitPackageResult (which already maps the raw fields to higher-level types via its UnmarshalJSON).
This keeps the multi-backend RPC layering intact so callers (e.g. btcwallet's chain.Interface) can invoke a typed method instead of a RawRequest. submitpackage is a Bitcoin Core RPC (v24+); btcd has no server handler for it.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedrpctest: scope shared state to the current processby Calvin Kim · f8ce7a7d · May 30, 2026 · 2 filesMessage 88 · StrongTriage 0Details
Commit message · Calvin Kim
rpctest: scope shared state to the current process
Two pieces of rpctest's global state silently aliased across concurrent test processes (which is what `go test ./...` does by default, so any `make unit` that exercises -tags=rpctest hit this):
- btcdExecutablePath compiled to a fixed path /tmp/btcd/rpctest/btcd. Two `go build` invocations would race on the same file, occasionally yielding a truncated or stale binary and downstream "tls: certificate signed by unknown authority" failures when the harness tried to talk to the resulting node.
- lastPort started at the same defaultNodePort in every process. The bind-test in NextAvailablePort closes the listener before returning, so two processes climbing from the same base would frequently hand out the same port and one harness would die with "connection refused" when btcd failed to bind.
Suffix the executable with a random uint32 and seed lastPort with a random offset into a 50k-port window so each process climbs through its own range.
88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: broader security terminology
AI review queuedserver: fix linter issueby Oliver Gugger · 9dfa926f · May 15, 2026 · 1 fileMessage 28 · OpaqueTriage 0Details
Commit message · Oliver Gugger
server: fix linter issue
28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI review queuedtxscript: turn into own module, use v2by Oliver Gugger · 55a463a3 · May 15, 2026 · 26 filesMessage 45 · ThinTriage 12Details
Commit message · Oliver Gugger
txscript: turn into own module, use v2
45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI review queuedwire: make own module, use v2by Oliver Gugger · 039baa25 · May 15, 2026 · 32 filesMessage 45 · ThinTriage 0Details
Commit message · Oliver Gugger
wire: make own module, use v2
45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: unusually broad change
AI review queuedaddress: move to top-level module, use v2by Oliver Gugger · 3000c455 · May 15, 2026 · 25 filesMessage 45 · ThinTriage 0Details
Commit message · Oliver Gugger
address: move to top-level module, use v2
45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: unusually broad change
AI review queuedmulti: appease go 1.26 vet for non-const format + goroutine Fatalfby Olaoluwa Osuntokun · 62cc0a6b · May 15, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · Olaoluwa Osuntokun
multi: appease go 1.26 vet for non-const format + goroutine Fatalf
In this commit, we fix two go vet errors that go 1.26 now treats as hard failures during test compilation.
In btcjson/help.go, the final result row of a complex help description was emitted via fmt.Fprintf with a non-constant format string (the result text could contain '%' chars). Switch to fmt.Fprint, since there are no format args here anyway.
In btcec/schnorr/musig2/musig2_test.go, the nonce-registration loop ran inside a goroutine and called t.Fatalf on failure. Fatalf only exits the calling goroutine, so the test goroutine would keep running with stale state. Use t.Errorf + return so the failure is recorded correctly and the goroutine exits cleanly.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI review queuedmulti: bump Go toolchain to 1.25, build CI with 1.26.3by Olaoluwa Osuntokun · 1863073c · May 15, 2026 · 11 filesMessage 81 · StrongTriage 12Details
Commit message · Olaoluwa Osuntokun
multi: bump Go toolchain to 1.25, build CI with 1.26.3
In this commit, we update every in-tree go.mod to declare go 1.25 and have CI build with 1.26.3 (Dockerfile uses the golang:1.26-alpine base). Docs that mention the minimum required Go version are aligned with the new floor as well.
Fixes #2527, which flagged the README.md / go.mod version mismatch (the README claimed 1.22 while the root + v2transport go.mod files already required 1.23.2).
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedbtcutil: export interfaceAddrby Calvin Kim · c90e88ee · May 14, 2026 · 2 filesMessage 35 · OpaqueTriage 0Details
Commit message · Calvin Kim
btcutil: export interfaceAddr
35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI review queuedserver: guard OnVerAck with sync.Onceby Olaoluwa Osuntokun · f1b95f8f · May 12, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Olaoluwa Osuntokun
server: guard OnVerAck with sync.Once
The prior select/default+close() guard on verAckCh is correct only under the invariant that OnVerAck is invoked from a single goroutine (peer.processRemoteVerAckMsg on the input handler). The two steps are not atomic: any future change that invokes listeners off the input goroutine would let two concurrent callers both observe default and panic on double-close.
Replace the guard with sync.Once. This makes the close-once contract obviously correct rather than correct-by-distant-invariant and drops the dead "called more than once" log path.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI review queuedmake fmtby Boris Nagaev · 51944b27 · May 6, 2026 · 3 filesMessage 0 · OpaqueTriage 0Details
Commit message · Boris Nagaev
make fmt
0/100 · OpaqueMessage clarity
! Very short subject! Too few words to establish purpose! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI review queuedserver, integration: add unit regression tests for peer lifecycle fixby Or Aharonee · 08be37f3 · Apr 9, 2026 · 2 filesMessage 83 · StrongTriage 13Details
Commit message · Or Aharonee
server, integration: add unit regression tests for peer lifecycle fix
Address review feedback on the peer add/done race fix:
Add three direct unit tests in server_test.go that exercise the fix without the full server or rpctest harness:
- TestOnVerAckDoubleCall: call OnVerAck twice on the same serverPeer, assert no panic and verAckCh remains closed. - TestPeerLifecycleOrdering: verack before disconnect emits peerAdd then peerDone in order. - TestPeerLifecycleSimultaneousReady: both verAckCh and Peer.Done() ready before the handler runs; assert peerDone always arrives and peerAdd, if emitted, precedes it (100 iterations).
Harden integration tests in sync_race_test.go:
- Check fakePeerConn errors via require.NoError instead of discarding. - Extract dialAndSendVersion helper for TestPreVerackDisconnect; check all errors instead of silently continuing. - Fix comment wording ("produces" -> "is expected to produce").
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validationfuzzing or regression evidencesecond-pass: broader security terminology
AI review queuedwire: separate protocol message limit from serialization boundby Erick Cestari · 5e96c5b3 · Mar 24, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Erick Cestari
wire: separate protocol message limit from serialization bound
Revert MaxMessagePayload to 32MB and introduce MaxProtocolMessageLength (~4MB) for p2p network message size enforcement. This mirrors Bitcoin Core's separation between MAX_SIZE (32MB serialization bound) and MAX_PROTOCOL_MESSAGE_LENGTH (~4MB network limit) introduced in bitcoin/bitcoin#5843.
The previous commit reduced MaxMessagePayload to 4MB, but that constant is also used as a serialization bound for deriving maxTxInPerMessage, maxTxOutPerMessage, and variable-length string limits in contexts beyond network messages (e.g. database deserialization via MsgTx.Deserialize). While consensus limits keep real values well below the 4MB-derived bounds, conflating the two constants is architecturally incorrect and diverges from Bitcoin Core's design.
The new MaxProtocolMessageLength is now enforced in all four network read/write paths: WriteMessageN, WriteMessageWithEncodingN, ReadMessageWithEncodingN, and ReadV2MessageN (which previously had no overall message size check).
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI review queuedpeer: add panic recovery to message handling goroutinesby Erick Cestari · 45135e67 · Mar 9, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Erick Cestari
peer: add panic recovery to message handling goroutines
Add a recoverFromPanic method that catches panics in peer goroutines, logs the error with a stack trace, and disconnects the offending peer instead of crashing the entire node. This provides defense-in-depth against future unknown panics in message parsing or handling.
Protect two goroutine boundaries: - The negotiation goroutine in start(), which handles pre-handshake message decoding via BtcDecode. - The inHandler goroutine, which processes all post-handshake messages.
Refactor inHandler cleanup from manual end-of-function calls to defer-based cleanup, ensuring close(p.inQuit) always runs even on panic, which prevents stallHandler from hanging.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI review queuednetsync: require peer argument in fetchHeaderBlocksby Calvin Kim · 8588a251 · Feb 26, 2026 · 2 filesMessage 85 · StrongTriage 0Details
Commit message · Calvin Kim
netsync: require peer argument in fetchHeaderBlocks
Refactor fetchHeaderBlocks and buildBlockRequest to take an explicit peer parameter instead of implicitly using sm.syncPeer. This makes the caller responsible for choosing which peer to fetch from and adds a nil guard to prevent a panic if the sync peer has been cleared.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode