Shell scripts and security

前端 未结 4 782
攒了一身酷
攒了一身酷 2021-01-13 05:17

TLDP\'s Advanced Bash Scripting Guide states that shell scripts shouldn\'t be used for \"situations where security is important, where you need to guarantee the integrity of

4条回答
  •  [愿得一人]
    2021-01-13 05:55

    Because of the malleability of the shell, it is difficult to verify that a shell script performs its intended function and only that function in the face of adversarial input. The way the shell behaves depends on the environment, plus the settings of its own numerous configuration variables. Each command line is subject to multiple levels of expansion, evaluation and interpolation. Some shell constructs run in subprocesses while the variables the construct contains are expanded in the parent process. All of this is counter to the KISS principle when designing systems that might be attacked.

提交回复
热议问题