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

Adds PYTHONSAFEPATH to python_stub_template.txt #15701

Closed
wants to merge 3 commits into from

Conversation

groodt
Copy link
Contributor

@groodt groodt commented Jun 19, 2022

@sgowroji sgowroji added team-Rules-Python Native rules for Python awaiting-review PR is awaiting review from an assigned reviewer labels Jun 20, 2022
@@ -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
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Good idea.

@comius comius self-requested a review July 21, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-Python Native rules for Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants