is creepy. Never ever run other people's code without at least giving it a glance.
is creepy. Never ever run other people's code without at least giving it a glance.
wget mysqltuner.pl
perl mysqltuner.pl
(Yes, they actually have a .pl domain for it)
A far cry from the safer/verified "download this and check it's MD5 checksum" method that I'd prefer.
Seriously, fixing package management so we can continuously integrate arbitrary code would be great. Getting arbitrary OS package creation to be almost as easy as pushing code to GitHub seems like a very worthy goal.
Also, pushing random code via apt-get is not going to win you any sysadmin friends. They like their servers to be stable, and their packages to be well tested.
Much better not to be broken in the first place.
Viable verification is based on an unbroken hash (preferably SHA-(256|384|512), but SHA1 still not broken even it it's definitely too short nowadays. And the hashes need to be distributed properly, either PGP signed or hosted on a trusted TLS protected site...
Yet many projects still distribute MD5 hashes, thinking it got any value.
> Never ever (ever) trust foreign input introduced to your PHP code.
Where'd I put that sense of irony...
Unless you've read every line of the Linux kernel, we all succumb to the later point sooner or later.
> curl -s http://getcomposer.org/composer.phar -o $HOME/local/bin/composer ; chmod +x $HOME/local/bin/composer
Assuming that $HOME/local/bin is in your $PATH, the current user will have a "composer" command available.Mr. Cantor, I have added to the list of people to never hire I keep in my notebook.
I do not trust a random website that could easily be MITMd.
Or the second time that an IP address hits it.
Or something else that you haven't thought of.
Update: Such as doing something nasty to http://getcomposer.org/composer.phar instead - a 520KB php file that the first script downloads and runs without even md5ing first. Did you audit that too? Did you understand everything that it was doing?
'apt-get install whatever' is just as magically scary and dangerous.
No it isn't, there's GPG signing and things going on there.
That's really just Cargo Cult security, isn't it? Signed packages can just as easily be malicious. In fact a repository server could be a much worthier target for the injection of bad code than a single, relatively obscure web project.In context, what you say makes no sense.
Regardless, https would be better, but if you are that nervous as you suggest you are, then https doesn't solve your problem either. Neither does some hash thrown up on some site for you to compare against.
aw3c2: 'curl | php' is creepy
timaelliott: apt-get is just as scary
kudos: no, it has signing
udo: that's cargo cult
me: no, it protects like https (meaning it authenticates and stops MitM)
I was responding perfectly in context to point out how the protections apt-get have are useful. I also tied it back into the original comment but you can ignore that part if you like. I don't know why you think I was 'trying to be witty' and ignoring context.Still, https doesn't validate anything. You could add a certificate, but then that only means you are talking to the server assigned the cert, not that the actual package is good.
I still stand by what I said: mountain and mole hills.
Protecting against that is the whole fucking point of using things like apt-get/PEAR and GPG/code signing.