-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Adds PYTHONSAFEPATH to python_stub_template.txt #15701
Conversation
src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
Outdated
Show resolved
Hide resolved
…/python_stub_template.txt
@@ -314,6 +314,10 @@ def Main(): | |||
if runfiles_envkey: | |||
new_env[runfiles_envkey] = runfiles_envvalue | |||
|
|||
# Don't prepend a potentially unsafe path to sys.path |
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.
fwiw, i'd recommend also linking to the rules_python issue. The unsafe behavior this is trying to prevent isn't immediately obvious.
(apologies for the drive-by comment)
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.
👍 Good idea.
See: bazelbuild/rules_python#382