Security: Command Injection via shell=True in with_server.py
loading diff…
The script uses shell=True in subprocess.Popen which allows shell injection attacks. User-controlled server commands could execute arbitrary shell commands.
Severity: critical
File: webapp-testing/scripts/with_server.py
Replace shell=True with shell=False and pass command as a list of arguments instead of a string. Use shlex.split() if shell is required, or better yet, avoid shell=True entirely.
webapp-testing/scripts/with_server.py (modified)