by aw3c2 · 14y ago · 0 comments
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.