feat: prompt Lightning credential rotation after the 2.4.2 security fix; 2.4.2:0 → 2.4.2:1 - #105
Merged
Merged
Conversation
…ix; 2.4.2:0 → 2.4.2:1 2.4.2 patches an actively exploited vulnerability, but patching does not undo access an attacker already took. Everything BTCPay could reach on a pre-2.4.2 build should be treated as exposed, and for the Lightning backends that is actionable, so the up migration raises a critical task against whichever one btclightning names: - LND — lnd:recreate-macaroons. BTCPay reads LND's admin macaroon off the mount, which is full control of the node. - CLN — c-lightning:revoke-runes. BTCPay reaches CLN over the unrestricted lightning-rpc admin socket, so there is no credential of ours to rotate, but a compromised BTCPay could have minted itself a rune that survives the patch. Both tasks are gated on the backend being the configured one *and* its package being installed. The second guard is load-bearing: a critical task stops the source service and is cleared only when the *target* service runs the action, so raising one for an absent package would leave BTCPay unstartable short of a force-start. Two exposures the migration deliberately does not try to cover, both documented in the release notes and instructions instead: an install that pointed at a node and later switched away is indistinguishable from one that never did, and a hot on-chain wallet generated inside BTCPay has keys that cannot be rotated at all — those funds have to move. Version bumped rather than folded into 2.4.2:0 so installs that already took :0 from the alpha deploy still receive the prompt. Depends on lnd-startos 0.21.1-beta:11 and cln-startos 26.6.6:9 reaching the branches package.json pins: recreate-macaroons did not delete the macaroon root key before that release, so it did not actually revoke anything, and revoke-runes did not exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… work The 2.4.2:1 rotation task points at lnd's revoke-macaroons and c-lightning's revoke-runes. Neither existed in usable form before 0.21.1-beta:11 and 26.6.6:9 respectively — LND's was named recreate-macaroons and only deleted macaroon files, leaving the root key that signs them in place, so it revoked nothing; CLN's did not exist. Flooring the dependencies there means a user cannot end up stopped by a critical task pointing at an action that does nothing. Also repoints the import at the renamed lnd action. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks
Both siblings' next branches were fast-forwarded to master after #177 and #185 merged, so the pins now carry revoke-macaroons and revoke-runes — the actions 2.4.2:1's rotation task targets. Only the lockfile moves; package.json still tracks #next. cln-startos brings its start-sdk pin up to 2.0.9 with it, which the overrides entry keeps hoisted to a single copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…anifests effects.getInstalledPackages was the only raw-effect call left in the package; sdk.getInstalledPackages is the same call through the facade everything else already uses. The package ids came from string literals, which the repo takes from the dependency's own manifest elsewhere for exactly this reason — c-lightning's id is 'c-lightning', not the 'cln' the repo and directory are named after, and includes() on a wrong literal fails silently rather than at compile time. main.ts already imports both manifests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dr-bonez
approved these changes
Aug 7, 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.
Summary
2.4.2 patches an actively exploited vulnerability, but patching does not undo access an attacker already took. Everything BTCPay could reach on a pre-2.4.2 build should be treated as exposed, and for the Lightning backends that is actionable — so the
upmigration raises a critical task against whichever backendbtclightningnames:btclightninglnd→revoke-macaroonsc-lightning→revoke-runesBoth tasks are gated on the backend being the configured one and its package being installed. The second guard is load-bearing: a critical task stops the source service and is cleared only when the target service runs the action, so raising one for an absent package would leave BTCPay unstartable short of a force-start.
Two exposures the migration deliberately does not try to cover, documented in the release notes and
instructions.mdinstead:Version bumped rather than folded into
2.4.2:0so installs that already took:0from the alpha deploy still receive the prompt.Dependency floors
dependencies.tsfloorslndat>=0.21.1-beta:11andc-lightningat>=26.6.6:9, up from:4and:1. Neither action existed in usable form before those releases — LND's was namedrecreate-macaroonsand only deleted the macaroon files, leaving the root key that signs them in place, so it revoked nothing (lnd-startos#177);revoke-runesdid not exist (cln-startos#185). Without the floors a user could be stopped by a critical task pointing at an action that does nothing.Merge order: both sibling PRs must land, and reach the branches
package.jsonpins, before this one builds.Test plan
2.4.2:0; confirm BTCPay stops and shows a critical task pointing at LND's Revoke Macaroons0.21.1-beta:11installed, confirm the dependency floor surfaces rather than the task pointing at an ineffective action🤖 Generated with Claude Code