feat(sqlite): encrypt stored runner request and response - #9210
feat(sqlite): encrypt stored runner request and response#9210chirag-bruno wants to merge 2 commits into
Conversation
Statements can wrap values in bruno_encrypt/bruno_decrypt, registered from a codec the host supplies when opening the database. Injecting it keeps @usebruno/sqlite free of an electron dependency. Registration runs before the migrations so a later backfill migration can use the same functions.
Runner exchanges hold full request and response bodies, including authorization headers and tokens. Route both columns through bruno_encrypt on write and bruno_decrypt on read.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. WalkthroughThe change adds SQLite codec support for encrypted values. It registers encryption and decryption functions before migrations, updates runner response SQL, wires the Electron codec, preserves null updates, and adds integration tests. ChangesSQLite codec integration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Runner request and response bodies are now encrypted in SQLite and decrypted on retrieval, with Electron supplying the encryption codec. The current change includes coverage for the new persistence behavior and has no identified merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant ElectronIPC
participant DB
participant SQLite
ElectronIPC->>DB: Create database with codec
DB->>SQLite: Register bruno_encrypt and bruno_decrypt
SQLite->>SQLite: Encrypt runner response values
SQLite-->>DB: Decrypt values during retrieval
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Encrypted strings now cross the gate Comment |
Runner exchanges store full request and response bodies, including authorization headers and tokens, as plaintext in
bruno.db. Both columns now go throughbruno_encrypton write andbruno_decrypton read.Stacked on #9209, merge that first. Until then this PR's diff includes its commit.
Ticket: BRU-4510