Honestly, I think it depends on how much you consider necessary for your application. I entered the GPG key password on stdin. I always ask the question "what is the acceptable risk?"
However, nothing will protect your application from rootkits in kernel space. It can read not only std I / O terminals, but also all your process memory when it starts. And probably override a few defenses that you have.
You can take a look at using the SELinux sandbox in combination with what you are doing - read more about it at http://danwalsh.livejournal.com/ if you really need this level of protection. libselinux allows you to interact with it to verify security, etc.
user257111
source share