Skip to content
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

Remove shell=True #300

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Remove shell=True #300

merged 1 commit into from
Sep 27, 2022

Conversation

maipbui
Copy link
Contributor

@maipbui maipbui commented Sep 27, 2022

Signed-off-by: maipbui [email protected]

Description

subprocess() - use shell=False, use list of strings Ref: https://semgrep.dev/docs/cheat-sheets/python-command-injection/#mitigation

Motivation and Context

subprocess() - when using with shell=True is dangerous. Using subprocess function without a static string can lead to command injection.

How Has This Been Tested?

Additional Information (Optional)

Signed-off-by: maipbui <[email protected]>
@prgeor
Copy link
Collaborator

prgeor commented Sep 27, 2022

@maipbui please fix the code coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants