-
Notifications
You must be signed in to change notification settings - Fork 7
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
updates to avoid shell injection vulnerability #22 #42
base: main
Are you sure you want to change the base?
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Just2Deep on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Just2Deep on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
I have read the CLA Document and I hereby sign the CLA. |
except: | ||
raise EnvironmentError() | ||
else: | ||
subprocess.run(["source", ".env"], check=True) |
Check notice
Code scanning / Bandit
Starting a process with a partial executable path Note
except: | ||
raise EnvironmentError() | ||
else: | ||
subprocess.run(["source", ".env"], check=True) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
def install(packages): | ||
if packages == "pip install fastapi[all]": | ||
subprocess.call("pip install fastapi[all]", shell=True) | ||
packages = packages.split(" ") # passing as list of commands | ||
subprocess.run(packages, check=True) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
for package in packages:subprocess.call(package, shell=True) | ||
else:subprocess.call(packages, shell=True) | ||
for package in packages: | ||
subprocess.run(package.split(" "), check=True) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
for package in packages: | ||
subprocess.run(package.split(" "), check=True) | ||
else: | ||
subprocess.run(packages.split(" "), check=True) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
b = b.split(" ") # split commands into a list | ||
if b[0] == "python": | ||
b[0] = sys.executable # to support execution of script in windows | ||
subprocess.run(b, check=True) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
P.S there are some formatting changes(single quote to double quotes) due to Black Formatter, Hope that is okay