Sort:  

The biggest security concern is prob the RPC node in terms of your program, which is the same concern as with the CLI :)

Why would the rpc node be a concern regarding security?

The key never enters the node as far as I'm aware and all the encrypting/signing does happen on client side.

Please correct me of I misunderstood anything.