fix: fail closed without vss auth - #665
Open
ben-kaufman wants to merge 4 commits into
Open
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryThe PR removes unauthenticated VSS fallback behavior so backup and Lightning-node initialization fail closed when LNURL-auth is unavailable.
Confidence Score: 5/5The PR appears safe to merge and consistently enforces fail-closed VSS authentication across the changed setup paths. The backup client and Lightning builder now reject missing LNURL-auth rather than selecting unauthenticated construction, while preserving authenticated setup and stale-monitor recovery behavior.
|
| Filename | Overview |
|---|---|
| Bitkit/Services/LightningService.swift | Removes fixed-header VSS node construction and rejects empty LNURL-auth configuration before either normal or stale-monitor-recovery builds. |
| Bitkit/Services/VssBackupClient.swift | Removes unauthenticated backup-client fallback and consistently reports the shared authentication-required error. |
| Bitkit/Utilities/Errors.swift | Adds localized handling for the new vssAuthRequired service error. |
| changelog.d/next/fail-closed.security.md | Accurately records that wallet backups no longer fall back to unauthenticated VSS. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[VSS or Lightning setup] --> B{LNURL-auth configured?}
B -- No --> C[Throw vssAuthRequired]
B -- Yes --> D[Build authenticated VSS client or node]
D --> E{Build succeeds?}
E -- Yes --> F[Setup complete]
E -- DangerousValue --> G[Enable stale monitor recovery]
G --> H[Retry authenticated node build]
E -- Other error --> I[Propagate setup failure]
Reviews (1): Last reviewed commit: "fix: fail closed without vss auth" | Re-trigger Greptile
Co-authored-by: Cursor <cursoragent@cursor.com>
jvsena42
previously approved these changes
Aug 13, 2026
jvsena42
left a comment
Member
There was a problem hiding this comment.
Self-contained PR, no issues found
jvsena42
reviewed
Aug 13, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
jvsena42
approved these changes
Aug 13, 2026
Member
|
@ben-kaufman conflict |
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.
This PR fails closed when LNURL-auth is missing so wallet backups cannot fall back to unauthenticated VSS.
Description
Removes the unauthenticated VSS client fallback. If LNURL-auth is not configured, backup setup and Lightning node build now error instead of using a public encryption key or fixed-header VSS.
Env currently always sets an LNURL-auth URL, so this is a footgun fix rather than a user-visible change on production configs.
Related: synonymdev/audit#55 (BITKIT-SEC-003). Library-side rejection is in synonymdev/vss-rust-client-ffi.
Linked Issues/Tasks
Screenshot / Video
N/A
QA Notes
Manual Tests
regression:empty LNURL-auth URL → VSS setup and node build fail instead of using unauthenticated VSS.Automated Checks
Made with Cursor