AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 24 Bitcoin

common: enforce the use of a "primary" tag in coin_mvt tags.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
common: enforce the use of a "primary" tag in coin_mvt tags.

Undocumented, but the first tag in the coin_movement notification is
considered the primary tag, and the others are optional. The
bookkeeper plugin relies on this!

Enforce that this is true, and in the process document in the code which
is the primary tag.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds internal safety checks to ensure that financial movement records in Core Lightning always start with a main category tag, with any extra tags treated as secondary. It does not change user-facing behavior in production builds, but it helps prevent bookkeeping mistakes that could misclassify transactions.

Recommended action

Treat as a hardening/defensive commit. Review whether the assertions are sufficient and whether any existing call sites pass tag arrays that violate the new invariant. No immediate security patch is indicated, but verify bookkeeper accounting correctness under the new rules.

Security signals we found

01

Defensive invariant enforcement for coin movement tagging

02

Reliance by bookkeeper plugin on first tag being primary

03

Use of assertions means runtime enforcement depends on build configuration

04

No direct exploit path visible in diff

Risk score

Why this scored 24/100

Our methodology →
Potential impact 5/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 4/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.