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

fix: run post-link scripts #574

Merged
merged 13 commits into from
Apr 5, 2024
Merged

Conversation

wolfv
Copy link
Contributor

@wolfv wolfv commented Mar 20, 2024

@baszalmstra
Copy link
Collaborator

👍

One of the primary reasons that I am very much against executing scripts during installation is that it is a massive security risk. We are basically allowing arbitrary code execution at install time.

Bun recently introduced the concept that a user has to explicitly allow running installation scripts for certain packages. Would you be open to adding a similar approach here right off the bat? I know this complicates the integration into rattler-build and pixi but I think its very important to protect users.

@wolfv
Copy link
Contributor Author

wolfv commented Mar 21, 2024

From our discussion:

  • I totally agree that post-link / pre-unlink scripts are ugly and should ideally not exist
  • On the same note, activation scripts are "just as bad" (unfortunately!)
  • Lastly we always have to trust packages

To make things more secure in the longer run I advocate for:

  • sandboxing using cgroups, and other means
  • removing activation or post-link scripts wherever possible and substituting for simpler "environment variable" setters (actually already possible but underused in conda-forge)

I will make it configurable wether to run the installation scripts, and we can also emit a warningi or something like that/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants