You can set up sudo in a way that specific programs do not ask for a password. Look into NOPASSWD (manual).
sudo
NOPASSWD