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

Variables exported via shellHook not set #7

Open
DavHau opened this issue Oct 14, 2020 · 3 comments
Open

Variables exported via shellHook not set #7

DavHau opened this issue Oct 14, 2020 · 3 comments

Comments

@DavHau
Copy link
Contributor

DavHau commented Oct 14, 2020

exporting variables via shellHook of mkShell doesn't seem to have any effect

@nmattia
Copy link
Owner

nmattia commented Oct 15, 2020

That is correct, I somewhat consider running shellHooks to be a security issue. The rest of the build is sandboxed (if you have sandboxed enabled) whereas the shellHook would just run as your user, in your shell, with access to your entire filesystem. I'm not sure what to do there.

@DavHau
Copy link
Contributor Author

DavHau commented Oct 19, 2020

AFAIK both direnv and lorri support executing shellHooks.
I think it's not a major security issue, since direnv allow protects you from executing untrusted code.
Maybe @zimbatm has a better answer to this?

@zimbatm
Copy link

zimbatm commented Oct 25, 2020

If sorri doesn't support the shellHook feature, it will not be a drop-in replacement to nix-shell. Using the shellHook to extend environment variables is quite common I think.

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

No branches or pull requests

3 participants