Get rid of as much `subprocess` as possible, and get rid of passing args via CLI where possible
See original GitHub issuesubprocess
is a potential security issue and usage of it should be minimized.
Describe the solution you’d like
0. bash install.sh
is forbidden: it is directly code execution!
git
is used through API provided by numerous python packages for working withgit
wget
is replaced witharia2c
getting their args via a named pipe.- calling
tar
through CLI is prohibited, use packages to access tar archives instead
Describe alternatives you’ve considered No such.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
python - What is the subprocess.Popen max length of the args ...
I don't mind breaking up the command into multiple calls to process_file.exe . I am looking for a general way to get the...
Read more >Python Tutorial: subprocesses module - 2020 - BogoToBogo
The command line arguments are passed as a list of strings, which avoids the need for escaping quotes or other special characters that...
Read more >An Introduction to Subprocess in Python With Examples
The call() method from the subprocess in Python accepts the following parameters: args: It is the command that you want to execute. You...
Read more >The subprocess Module: Wrapping Programs With Python
In this tutorial, you'll learn how to leverage other apps and programs that aren't Python, wrapping them or launching them from your Python ......
Read more >subprocess — Subprocess management — Python 3.11.1 ...
If shell is True , it is recommended to pass args as a string rather than as a sequence. On POSIX with shell=True...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
GitPython is using subprocess calls to call git command line too, no?
It’s OK not to use it where it has significant enough drawbacks.