Giter VIP home page Giter VIP logo

Comments (4)

jackmallers avatar jackmallers commented on June 2, 2024

Wow, very interesting @kewde. Thanks so much for taking the time to write this up. I am about to merge in a feature later today and then I will take a deeper dive ๐Ÿ‘

from zap-desktop.

kewde avatar kewde commented on June 2, 2024

Cool, let me know if you have any issues with it!

I noticed that you already use a static channel 'lnd' for the IPC communication, so I don't think you'll have to completely overhaul the architecture to apply the sandbox.


Also another interesting security feature that you can add is a "payment confirmation model" on the backend. An exploit in the UI would be unable to bypass the payment confirmation model: an attacker that exploited an XSS vulnerability still can't steal any coins without user interaction. All communications are forced through IPC, and the backend would take care of the confirmation box. This assumes that the lnd-rpc is executed on the backend (main/browser process).

Here is a pseudocode

Clicked 'send Payment button' 
----> ipcRenderer.send('lnd', 'sendPayment + details) 
----> ipcMain.on('lnd', ..)
      ----> if( action === sendPayment) { 
                    open payment confirmation model
                           ----> if OK then execute payment through lnd rpc.
              }   

from zap-desktop.

jackmallers avatar jackmallers commented on June 2, 2024

Yeah so I took a deeper look, I think the architecture already supports sandbox support, since we moved away from Node/WS and went with ipcRenderer. I'll give it a try when I'm done with my current todo list.

Other security features like confirming payments should definitely be considered, but probably not until the MVP for testnet is done

from zap-desktop.

kewde avatar kewde commented on June 2, 2024

I've added an extended example that allows for multi-channel support (using a whitelist). Always happy to assist with any questions.

from zap-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.