Important notice, thank you! I have read the detailed answer on this page: https://stackoverflow.com/questions/4129631/linux-securing-environment-variables and suppose I could use file instead variable.
An alternative solution would probably be to configure sudoers file. But here comes the problem with running scripts with root privileges..