-
Notifications
You must be signed in to change notification settings - Fork 0
Hardening suggestions for jtd-codebuild / revert-3-pixeebot/drip-2024-02-17-pixee-python/subprocess-shell-false #6
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
Conversation
@@ -66,10 +67,8 @@ def generate( | |||
target_language = target["language"] | |||
target_path = self.get_target_path(target) | |||
safe_mkdir(target_path) | |||
process = subprocess.Popen( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -19,10 +20,8 @@ def _compile_typescript(self, tsconfig_path: str) -> subprocess.Popen: | |||
Args: | |||
tsconfig_path: The path to the tsconfig.json file. | |||
""" | |||
return subprocess.run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -14,8 +14,7 @@ def test_example_project_1(): | |||
# Run the command | |||
subprocess.check_call( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -13,8 +13,7 @@ def test_example_project_2(): | |||
# Run the command | |||
subprocess.check_call( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -13,8 +13,7 @@ def test_example_project_3(): | |||
# Run the command | |||
subprocess.check_call( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -13,8 +13,7 @@ def test_example_project_4(): | |||
# Run the command | |||
subprocess.check_call( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set shell
keyword argument to False
@@ -66,10 +67,8 @@ def generate( | |||
target_language = target["language"] | |||
target_path = self.get_target_path(target) | |||
safe_mkdir(target_path) | |||
process = subprocess.Popen( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaces subprocess.{func} with more secure safe_command library functions.
@@ -19,10 +20,8 @@ def _compile_typescript(self, tsconfig_path: str) -> subprocess.Popen: | |||
Args: | |||
tsconfig_path: The path to the tsconfig.json file. | |||
""" | |||
return subprocess.run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaces subprocess.{func} with more secure safe_command library functions.
I've reviewed the recently opened PR (5 - Revert "Use
shell=False
insubprocess
Function Calls") and have identified some area(s) that could benefit from additional hardening measures.These changes should help prevent potential security vulnerabilities and improve overall code quality.
Thank you for your consideration!
docs | feedback
Powered by: pixeebot