-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potentially unsafe subprocess execution (shell=True) #182
Labels
Comments
Related #28 |
I think the answer is basically split the cmd string: https://github.com/OrkoHunter/pep8speaks/blob/30af5bf0de1a2bfdf35b0a76bf63c70486c12c69/pep8speaks/helpers.py#L231 and pass cmd as a list to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 👋 - Any particular reason that subprocess needs to be run with
Shell=True
?An example:
https://github.com/OrkoHunter/pep8speaks/blob/837643bb95c18a5364cd0539b0f8edaeb3813a76/pep8speaks/helpers.py#L234
Shell=True
is a more dangerous way of invoking subprocess that exposes you to potential command injection attacks. If you're not using any shell specific features (e.g.|
), changing it toshell=False
is a pretty easy fix.The text was updated successfully, but these errors were encountered: