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 adds support in LND for a new Lightning protocol message called InvoiceError. It is used to politely tell another node why their payment invoice or invoice request was rejected, sent privately through an onion-routed message. T…
New unsigned onion message type added with no cryptographic signature or bech32 formWriter-side validation prevents empty or non-UTF-8 error strings and disallowed suggested_value without erroneous_fieldReader-side BOLT 1 must-understand rule enforced: unknown even TLVs rejected, unknown odd TLVs tolerated
This commit adds validation checks for BOLT 12 invoices in the LND Lightning node software. It ensures invoices contain required fields (creation time, amount, payment hash, node ID, payment paths), match their originating invoice requests…
New validation gate added to Invoice.Encode() to reject malformed invoices before serializationReader rejects unknown even invoice TLV types and unknown even feature bitsReader enforces chain compatibility against activeChain
This commit adds new code to support BOLT 12 invoices in the LND Lightning node. It introduces a data structure, encoding/decoding logic, and helper functions to filter fallback addresses and blinded payment paths. There is no bug fix or s…
This commit is a hardening and cleanup of a GitHub Actions workflow that automatically labels pull requests by severity. It does not change any LND node code, wallet logic, or network protocol. Instead, it splits the workflow into two jobs…
Principle of least privilege: write token moved out of the model-bearing jobUntrusted input (model-generated comment) sanitized before privileged API useExternal action pinned to immutable commit SHA instead of mutable tag
This commit is a straightforward internal code cleanup in LND's channel-opening machinery. It swaps one internal type name (channeldb.OpenChannel) for another (chanstate.OpenChannel) across function signatures in the funding manager and it…
This commit fixes a bug in how the Lightning Network Daemon (LND) copies payment channel data. When the program made a copy of an HTLC (a pending payment in a Lightning channel), it failed to copy several important fields and did not prope…
Incomplete deep copy of security-relevant channel stateMissing fields in HTLC clone (RHash, OnionBlob, HtlcIndex, LogIndex)Nil-slice copy bug for Signature and ExtraData
This commit adds a new RPC called SubmitPackage to LND's WalletKit. It lets users submit a group of related Bitcoin transactions together so a zero-fee parent can be accepted because a later child transaction pays its fee. This is a featur…
New RPC endpoint gated by onchain:write macaroon permissionPackage size bounded to 25 transactions to limit deserialization workFee-rate ceiling passed through to backend; explicit 0 disables limit
This commit adds validation checks for BOLT 12 invoice requests in the LND Lightning node. It ensures that invoice requests follow protocol rules when being created (written) and received (read), rejecting malformed or non-compliant reques…
New input validation functions added for protocol messagesValidation now runs before encoding, preventing malformed outbound messagesOverflow guard added for amount*quantity calculation
This commit adds a new data structure and serialization code for BOLT 12 invoice requests in the LND Lightning node. It is purely an implementation of a protocol message format and includes a round-trip test. There is no indication in the …
This is a large dependency upgrade for the LND Lightning node software. It moves LND from older btcd Bitcoin library packages to new 'v2' packages and updates related wallet and network libraries. The commit is almost entirely mechanical i…
Large dependency upgrade touching core Bitcoin primitives (wire, txscript, chainhash, btcutil, psbt, address)Migration to new v2 module layout with API changes in address handlingPins new upstream releases (btcd 0.26.0, btcwallet 0.17.0, neutrino 0.18.0, lightning-onion 1.4.0) that may include undisclosed fixes
This commit fixes a bug in LND's DNS seed bootstrap code that could crash the node. The code assumed every record in a DNS response was an SRV record, so a non-SRV record (like a normal A or CNAME record) would cause a panic. The fix safel…
Unconditional type assertion panic in DNS fallback pathMissing bounds check on LookupHost result before array indexingMissing network deadline on manually dialed DNS TCP connection
This commit removes a temporary security workaround in a Go module file. The workaround forced the use of a newer, fixed version of a compression library (xz) to avoid a known historical vulnerability. The commit message says the library i…
Removal of a dependency-level vulnerability workaroundReference to historical advisory GHSA-25xm-hr59-7c27 in deleted commentNo code changes; only go.mod cleanup
This commit removes an old workaround in LND's dependency file (go.mod) that pinned a safe version of the 'xz' compression library. The workaround was originally added because another dependency once pulled in a vulnerable version of xz. T…
Removal of a dependency override that was a security mitigation for CVE-2021-29482Commit explicitly references the original GHSA advisory (GHSA-25xm-hr59-7c27)No actual downgrade or re-introduction of the vulnerable module is visible in the diff
This commit is a cleanup-only change that removes unnecessary loop-variable copies in Go test files. Since Go 1.22, loop variables are already scoped per-iteration, so the old `x := x` workarounds are redundant. The change affects only tes…
This commit only changes a dependency version label in LND's package manifest. The underlying code (commit 70a94ea39e9c) stays exactly the same; the dependency is simply tagged as v0.16.18 instead of being referenced by a pseudo-version. T…
This commit updates a dependency version in LND's build files. It bumps the internal 'kvdb' submodule from version 1.5.0 to 1.5.1 so that downstream projects importing kvdb directly do not pull in an older, vulnerable telemetry library (Op…
Dependency bump explicitly motivated by a known vulnerability identifier (GO-2026-4394)No source code changes in LND itself; only module metadata updatedVendor describes the root build as already unaffected, limiting direct security impact on LND
This commit removes support for obsolete Tor v2 onion addresses from the Lightning Network Daemon (lnd). Tor v2 services were shut down by the Tor network in October 2021, so lnd will no longer create, accept, or dial v2 onion addresses. H…
Removal of deprecated network protocol (Tor v2) reduces attack surface and prevents futile/unsafe dials to unreachable services.Input validation added at operator boundaries (ParseAddressString, parseAddr) to reject v2 .onion addresses with a clear error.On-disk legacy key fallback now validates decrypted key type and rejects non-v3 (RSA1024) keys before passing them to Tor.
This commit simply updates a software library dependency (neutrino) used by the Lightning Network Daemon (LND). The new version is said to add a faster way to import blockchain headers and fix a bug that could stop peer-to-peer header sync…
Dependency update to a newer tagged release of neutrinoCommit message references a 'ResetHeaderState fix' for P2P sync continuation after chain importNo direct code-level security fix is visible in the supplied diff
This commit fixes a bug in LND's remote-signing setup where zero-value previous transaction outputs were wrongly ignored when preparing a PSBT for a remote signer. The most concrete affected use case is BIP-322 message attestation, where t…
Functional denial-of-service in remote-signer BIP-322 workflows due to PSBT rejectionIncorrect zero-value UTXO validation caused legitimate outputs to be droppedFix removes Value check while preserving non-empty PkScript sanity check
This commit only adds new unit tests for an existing helper function in LND's RPC wallet code. It does not change any production logic, so it cannot introduce a security vulnerability or directly fix one in the code being committed. The te…
AI review queuedlnwallet: fix HTLC trimming test case to use dust_limit for zero-fee HTLCsby Olaoluwa Osuntokun · 745bdc18 · Apr 13, 2026 · 1 fileMessage 95 · StrongTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet: fix HTLC trimming test case to use dust_limit for zero-fee HTLCs
In this commit, we fix the "commitment tx with some HTLCs trimmed" test case to actually exercise trimming for taproot's zero-fee HTLC transactions.
With zero-fee second-level HTLCs, the HTLC output value on the commitment transaction equals the HTLC amount directly (no fee is deducted). This means trimming is determined solely by whether the HTLC amount falls below the dust limit, not by the fee rate. The previous parameters (fee_per_kw=100000, dust_limit=546) didn't actually trim any of the test HTLCs because even the smallest test HTLC (1000 sats) was above the 546 sat dust limit.
We now use fee_per_kw=644 (a reasonable rate) and dust_limit=2500 to ensure that the three smallest test HTLCs (1000, 2000, 2000 sats) are properly trimmed, leaving only the 3000 and 4000 sat HTLCs on the commitment transaction.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedmulti: use feature bits to pick which taproot nonce field to useby Olaoluwa Osuntokun · 5ffcd823 · Apr 13, 2026 · 6 filesMessage 73 · AdequateTriage 12Details
Commit message · Olaoluwa Osuntokun
multi: use feature bits to pick which taproot nonce field to use
Before this commit, we'd _always_ set both nonces fields, for both the staging and the final taproot channels type.
With this commit, we've switched to only setting the new nonce map field for the final taproot feature bit type.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI review queuedwatchtower: add production taproot channel support to justice kitby Olaoluwa Osuntokun · 7a18fba6 · Apr 13, 2026 · 10 filesMessage 73 · AdequateTriage 12Details
Commit message · Olaoluwa Osuntokun
watchtower: add production taproot channel support to justice kit
Wire channel type through BreachRetribution and the watchtower blob system to support production taproot channels with final scripts.
The key changes are:
1. Add ChanType field to BreachRetribution so downstream consumers (including the watchtower) can determine the script variant.
2. Add FlagTaprootFinalChannel blob type flag and TypeAltruistTaprootFinalCommit blob type to distinguish production from staging taproot channels in watchtower backups.
3. Add TaprootFinalCommitment to the watchtower's CommitmentType enum with appropriate witness type and size mappings.
4. Update taprootJusticeKit to use WithProdScripts() when constructing script trees for production taproot channels. The isFinal flag is set during construction from BreachRetribution.ChanType and during deserialization from the blob's commitment type.
Without this change, the watchtower would construct justice transactions using staging scripts for production taproot channels, resulting in invalid witnesses that fail to sweep breached outputs.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
lnrpc/walletrpc: add witness types for taproot chans final
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedlnwallet: integrate production script options in commitment generationby Olaoluwa Osuntokun · 2e0343cc · Apr 13, 2026 · 3 filesMessage 85 · StrongTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet: integrate production script options in commitment generation
This commit updates the wallet's commitment transaction generation logic to use appropriate script options based on the channel type. The commitment builder now determines whether a channel uses production taproot scripts and passes the WithProdScripts() option accordingly to HTLC script generation functions.
The changes affect three key areas of the wallet: channel state management, commitment transaction construction, and funding reservation handling. Each area now properly detects production taproot channels using the IsTaprootFinal() method and applies the correct script generation options to ensure consistency with the channel's script optimization level.
This integration ensures that production taproot channels generate commitment transactions with optimized script trees using OP_CHECKSIGVERIFY, while maintaining full compatibility with staging taproot and legacy channel types. The script option selection is applied consistently across all commitment transaction scenarios including local commits, remote commits, and HTLC processing.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
Apply the RequireSSL config knob when opening Postgres stores so it cannot be silently ignored.
Before this change, sqldb/v2 exposed PostgresConfig.RequireSSL but still opened cfg.Dsn verbatim, which meant RequireSSL=true was a no-op. A caller could set RequireSSL=true together with a DSN such as sslmode=disable and still establish a non-TLS connection.
This is a v2-only API contract bug, not a v1 regression in DSN handling: v1 never offered a separate RequireSSL flag and always left TLS policy entirely up to the DSN. The fix rewrites the DSN to use sslmode=require when needed, while preserving stricter modes such as verify-ca and verify-full.
The bug was easy to miss because no test asserted that the boolean flag changed the effective DSN or overrode an insecure sslmode. Keep the focused DSN rewrite test because it proves the contract without needing a live Postgres instance.
90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI review queuedlnwallet/chancloser: remove racy "no more states" checkby Elle Mouton · 1f8b558c · Mar 31, 2026 · 1 fileMessage 95 · StrongTriage 12Details
Commit message · Elle Mouton
lnwallet/chancloser: remove racy "no more states" check
The assertStateTransitions helper contained a non-blocking select after consuming expected states to verify no additional transitions occurred. This check is inherently racy: the state machine goroutine can emit the next transition before the non-blocking select runs, causing spurious "unexpected state transition" failures.
This was the primary cause of TestRbfCloseErr flakes (~29% failure rate under coverage instrumentation).
To preserve strictness, add a post-Stop() quiet-period check in stopAndAssert(). After the state machine is stopped, no further transitions should be produced, so draining the subscriber channel there is deterministic and catches any unexpected stragglers.
Also fix the CloseErr restart test paths (send_offer_restart, recv_offer_restart) which were under-consuming transitions. Both ClosePending and CloseErr produce an extra ClosingNegotiation emission on restart via internal requeue, so the helpers now take an explicit expectExtraTransition flag rather than the ambiguous iteration bool.
Finally, register the state subscriber before Start() to avoid racing with the initial state notification emitted by driveMachine. The old ordering (Start then RegisterStateEvents) could miss the first transition entirely on slow CI runners, causing a permanent timeout in assertStartupAssertions.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedlnwallet/chancloser: use wait.DefaultTimeout for state transitionsby Elle Mouton · 7e549631 · Mar 31, 2026 · 1 fileMessage 83 · StrongTriage 12Details
Commit message · Elle Mouton
lnwallet/chancloser: use wait.DefaultTimeout for state transitions
The hardcoded defaultTimeout (previously 500ms, then 5s) used in assertStateTransitions was too tight for CI runners, especially under coverage instrumentation or remote DB backends (postgres).
Use wait.DefaultTimeout which automatically adapts to the build environment: 30s on standard platforms, 60s+ for remote DB builds, and 60s on Windows.
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
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedrpcserver: wire ForwardingLog into router backendby ziggie · b3b05dda · Mar 30, 2026 · 5 filesMessage 68 · AdequateTriage 0Details
Commit message · ziggie
rpcserver: wire ForwardingLog into router backend
In this commit, we pass the node's ForwardingLog into the RouterBackend alongside the MinFwdHistoryAge configuration value, completing the dependency injection chain from the RPC handler down to the database layer.
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 queuedlnwallet/chancloser: fix flaky test assertionsby Olaoluwa Osuntokun · fa9163ac · Mar 27, 2026 · 1 fileMessage 78 · AdequateTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: fix flaky test assertions
Restore the defaultTimeout constant (500ms) that was lost during the PR's commit squash, where the hardcoded 10ms replaced it. The 10ms value was too tight and caused timeouts under -race -count=N.
Also fix assertSingleRemoteRbfIteration to consume both iteration transitions in a single assertStateTransitions call. When iteration=true, the state machine emits two ClosingNegotiation transitions from a single event (via internal events). Making two separate assertStateTransitions calls races with the "no more states" check, which could drain the second transition before the second assertion consumed it.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedlnwallet/chancloser: fix rbf close docsby Olaoluwa Osuntokun · 763fea92 · Mar 27, 2026 · 1 fileMessage 45 · ThinTriage 0Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: fix rbf close docs
45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathdocumentation-only discountsecond-pass: security-sensitive path
AI review queuedlnwallet/chancloser: fix comments and wrap errors for debuggingby Olaoluwa Osuntokun · e2a91b23 · Mar 27, 2026 · 2 filesMessage 83 · StrongTriage 20Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: fix comments and wrap errors for debugging
Fix incorrect comment about PartialSigWithNonce nonce - it's the JIT closer nonce for current session verification, not a closee nonce for future RBF. Wrap errors from validateSigFields and CreateCloseProposal with additional context to aid debugging.
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 validationsigning or wallet pathsecond-pass: near security thresholdsecond-pass: broader security terminologysecond-pass: security-sensitive path
Fix several issues raised in PR review: - Use safe type assertion in createClosingSigMessage to avoid panic if localSig is not *MusigPartialSig. - Fix typo "taprotot" -> "taproot" in comment. - Remove unnecessary type argument in NewTaprootSigType. - Simplify nested if to single condition for taproot nonce generation. - Fix typo "once the no updates" -> "once there are no updates" in test comments. - Move misplaced TestRbfCloseClosingNegotiationLocal doc comment to the correct function definition.
90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI review queuedlnwallet/chancloser: use AND for IsTaproot check, use partialSigToWireSigby Olaoluwa Osuntokun · a0cf1466 · Mar 27, 2026 · 3 filesMessage 73 · AdequateTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: use AND for IsTaproot check, use partialSigToWireSig
Change IsTaproot() from OR to AND: both LocalMusigSession and RemoteMusigSession must be set to consider the channel taproot. This prevents panics from nil session access when only one session is initialized.
Also use partialSigToWireSig helper for consistency in extractSigAndNonceFromComplete instead of inline conversion.
73/100 · AdequateMessage clarity
✓ Specific, 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 queuedlnwallet/chancloser: revamp sig type parsing to be spec compliantby Olaoluwa Osuntokun · 1d2fa8dc · Mar 27, 2026 · 4 filesMessage 73 · AdequateTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: revamp sig type parsing to be spec compliant
In this commit, we revise the sig type parsing to make the control flow clearer, and also to be spec compliant. Before we would error out if _both_ the CloserNoClosee and the CloserAndClosee fields were set.
lnwallet/chancloser: fix priority ordering for rbf sig parsing
We need to parse the sigs in a strict order, as it's possible for a party to send more than one siganture.
73/100 · AdequateMessage clarity
✓ Specific, 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 queuedlnwallet/chancloser: split taproot/non-taproot test helpersby Olaoluwa Osuntokun · 4f669cef · Mar 27, 2026 · 1 fileMessage 83 · StrongTriage 12Details
Commit message · Olaoluwa Osuntokun
lnwallet/chancloser: split taproot/non-taproot test helpers
Split testSendOfferRbfIterationLoop, testRecvOfferRbfLoopIterations, and testSendOfferIterationNoDust into separate taproot and non-taproot variants. This removes the isTaproot bool parameter and inlines each branch, making the tests easier to read and maintain.
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
signing or wallet pathsecond-pass: security-sensitive path
AI review queuedchancloser: update RBF close to match current flowby Olaoluwa Osuntokun · 7197fd21 · Mar 27, 2026 · 1 fileMessage 50 · ThinTriage 0Details
Commit message · Olaoluwa Osuntokun
chancloser: update RBF close to match current flow
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathdocumentation-only discountsecond-pass: security-sensitive path
AI review queuedlnwire: remove stale pong limit errorby yyforyongyu · dd61acd9 · Mar 26, 2026 · 2 filesMessage 78 · AdequateTriage 0Details
Commit message · yyforyongyu
lnwire: remove stale pong limit error
Drop the unused pong limit decode error now that ping deserialization accepts the full uint16 wire range. Update the randomized ping generator to cover the full range so the property tests exercise the no-reply sentinel values too.
78/100 · AdequateMessage clarity
✓ 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 queuedgitignore: ignore `.worktrees`by yyforyongyu · 331f53be · Mar 26, 2026 · 1 fileMessage 35 · OpaqueTriage 0Details
Commit message · yyforyongyu
gitignore: ignore `.worktrees`
35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body