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

don't suggest curl | bash #241

Open
rspier opened this issue Jul 15, 2017 · 6 comments
Open

don't suggest curl | bash #241

rspier opened this issue Jul 15, 2017 · 6 comments

Comments

@rspier
Copy link
Contributor

rspier commented Jul 15, 2017

http://learn.perl.org/installing/osx.html contains

curl -L http://xrl.us/installperlosx | bash

which is a horrible security anti-pattern.

Yes, it's extremely simple, but we shouldn't be encouraging people to do this without enough warnings to dissuade them. What happens if someone changes where that short link redirects to? What if someone changes the result to do sudo rm -rf /.

@ranguard
Copy link
Member

ranguard commented Jul 16, 2017 via email

@rspier
Copy link
Contributor Author

rspier commented Jul 16, 2017

It's less about whether this specific case is good or bad and more about this particular pattern being bad. Ok, it's safe this time. But it might not be next time. What if your github account gets hacked? What if gugod's github ccount gets hacked. Or if they start getting used to this anti-pattern and run it for some other tool?

(Yes, this is nearly exactly as dangerous as downloading any other pre-compiled binary, but for some reason it feels riskier.)

What's wrong with the perl that comes with OSX?

@VynceMontgomery
Copy link

Also: since it's http I don't need to own the endpoints to inject bad stuff in the curl response. If it were https, that would be better, but xrl.us doesn't support https (or at least the cert was failing for me today).

@rspier
Copy link
Contributor Author

rspier commented May 31, 2019

FWIW, I just fixed the cert.

@Grinnz
Copy link
Contributor

Grinnz commented Oct 22, 2019

What's wrong with the perl that comes with OSX?

A few things now, apparently: https://rt.cpan.org/Public/Bug/Display.html?id=127028

@rspier
Copy link
Contributor Author

rspier commented Oct 22, 2019

Either way, curl | bash isn't a terribly safe thing to do.

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

4 participants