Describe the bug
I don't understand how I should "check for untrusted input.
To Reproduce
Steps to reproduce the behavior:
With the code:
import shlex
import subprocess
def foo():
args = shlex.split("git rev-parse HEAD")
return str(subprocess.check_output(args, shell=False), "utf-8").strip()
Gives Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input. I don't understand how this is shell equals true given that "shell=False" is passed, nor how this is untrusted input.
Expected behavior
This line shouldn't be flagged as a warning
Bandit version
bandit --version
bandit 1.4.0
Additional context
Describe the bug
I don't understand how I should "check for untrusted input.
To Reproduce
Steps to reproduce the behavior:
With the code:
Gives
Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input. I don't understand how this is shell equals true given that "shell=False" is passed, nor how this is untrusted input.Expected behavior
This line shouldn't be flagged as a warning
Bandit version
Additional context