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

sqldb: wire up PragmaOptions config for SQLite store

Public commit record

What the developer wrote

Authored by ziggie

73/100 · Adequate
sqldb: wire up PragmaOptions config for SQLite store

The SqliteConfig.PragmaOptions field existed but was never appended to
the DSN. Add the loop to apply user-specified pragma options after the
built-in ones, matching the existing behavior in kvdb/sqlite.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a configuration bug in LND's new SQLite-based database layer. A setting called PragmaOptions existed in the config but was being silently ignored when building the database connection string. The change now appends those user-specified SQLite pragma options, matching how the older key-value SQLite store already behaves. Pragmas control low-level database behavior such as locking modes, journal settings, and synchronous levels, so honoring the user's choices matters for both correctness and security hardening.

Recommended action

Treat as a hardening/reliability fix. Review whether any deployment relied on PragmaOptions for security-sensitive pragmas and verify those pragmas are now active. Consider adding validation or an allow-list for user-supplied pragma options to prevent unsafe values from being passed directly into the DSN.

Security signals we found

01

Configuration value was silently ignored, potentially weakening intended security/integrity settings

02

User-supplied SQLite pragmas (e.g., synchronous, journal_mode, secure_delete) now take effect

03

Fixes behavioral inconsistency between kvdb/sqlite and sqldb/sqlite backends

04

No input validation or allow-listing added for pragma options

Risk score

Why this scored 27/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 4/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.