-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed as not planned
Closed as not planned
Copy link
Labels
topic-subprocessSubprocess issues.Subprocess issues.type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Hi,
I propose to add a subprocess.shell(cmd) function similar to os.system(), but use subprocess: close file descriptors, restore signal handlers, etc. The function runs a shell command and so is vulnerable by design to shell injection vulnerability if an attacker can modify the shell command.
The function accepts keyword arguments: subprocess.shell(cmd, env=env), subprocess.shell(cmd, stdout=subprocess.PIPE), etc.
This proposition is related to os.system() soft deprecation: #120744
What do you think?
Victor
Linked PRs
Metadata
Metadata
Assignees
Labels
topic-subprocessSubprocess issues.Subprocess issues.type-featureA feature request or enhancementA feature request or enhancement