Python is a popular choice for automating anything and everything, that includes automating system administration tasks or tasks that require running o...
It’s fine for the majority of cases. Shell vulnerabilities exist when you take in user input. If it’s a personal project or you are composing the string to pass to the shell without user input then it’s perfectly fine.
Don’t do this. As the article says its much better to split the string using
shlex
and avoid the risk of shell injection vulnerabilities.It’s fine for the majority of cases. Shell vulnerabilities exist when you take in user input. If it’s a personal project or you are composing the string to pass to the shell without user input then it’s perfectly fine.