Applications that execute operating system commands or execute commands that interact with the underlying system should neutralize any externally-provided values used in those commands. Failure to do so could allow an attacker to include input that executes unintended commands or exposes sensitive data.
The problem could be mitigated in any of the following ways:
* Using https://docs.python.org/3/library/subprocess.html[subprocess module] without the <code>shell=true</code>. In this case <code>subprocess</code> expects an array where command and arguments are clearly separated.
* Escaping shell argument with https://docs.python.org/3/library/shlex.html#shlex.quote[shlex.quote]