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

vdk-jupyter: python subprocess security problem #1463

Merged
merged 5 commits into from
Jan 3, 2023

Conversation

duyguHsnHsn
Copy link
Collaborator

@duyguHsnHsn duyguHsnHsn commented Dec 22, 2022

What:
This PR introduce a small change that can lower the vulnerability of subprocess call in JupyterLab extension.

Why:
Possible security implications associated with subprocess module are present in JupyterLab Extension. There should be checks for untrusted input from the user when we call subprocess.call or subprocess.Popen. Currently, the module shlex is used which decreases the vulnerability but it is only designed for Unix shells.
You can see https://semgrep.dev/docs/cheat-sheets/python-command-injection/ for more

Signed-off-by: Duygu Hasan hduygu@vmware.com

Copy link
Contributor

@ivakoleva ivakoleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shell=False LGTM, the request is for a few minor changes

@ivakoleva
Copy link
Contributor

ivakoleva commented Jan 3, 2023

Please add (to PR description) links to the subprocess security guidelines you had I'm mind when creating this fix

@duyguHsnHsn duyguHsnHsn merged commit 5e6f1c0 into main Jan 3, 2023
@duyguHsnHsn duyguHsnHsn deleted the person/hduygu/jupyterlab-vdk-run-job branch January 3, 2023 15:05
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.

None yet

6 participants