Bash allows to export read-only variables and functions to the environment.
Also, when a Bashbash script is run, Bash sources the file BASH_ENVBASH_ENV
was set to, unless invoked with -p-p
.
How do you protect against a hostile environment from within your Bash script? (In a portable way?)
'builtin'builtin
or 'unset'unset
could be redefined by an attacker.
Is there any way, a Bashbash script can protect itself against a hostile environment?