logoalt Hacker News

straygarr • today at 3:23 PM • 5 replies • view on HN

Agreed with everything up to:

"curl-to-shell pipe to install" - what's the problem here? that's pretty common on linux systems and something the AWS CLI uses.

Or is the problem the fact that this dev is untrusted and is executing a possibly malicious script on your machine?


Replies

jasongi • today at 3:57 PM

For a mock server? Surely a versioned, standalone executable, library/package or docker image makes more sense. Integration tests generally need to be portable and running on CI, you don't wanna be shell-piping whatever exists in the moment.

ssl-3 • today at 5:49 PM

The problem, for me, is that self-running installers can create a mess that's hard to keep track of.

I've run Linux without meaningful package management, as that was kind of the style of the time 30 years ago with Slackware. It can quickly become untenable.

There's no real difference between an uninspected script that gets piped straight from the URL into the shell, or a similarly-uninspected make&&sudo make install routine from a tarball. They can both execute code that does bad things (whether unintentionally or deliberately), and they can both leave a mess that is hard to cleaned up.

I've found that it is better to just avoid going down that road to begin with. Whether distro-specific packages, Docker containers, flatpaks, or whatever: All of these make housekeeping easier.

MisterMunchkin • today at 3:31 PM

Running arbitrary code directly in your terminal is very dangerous

➕ show 1 reply
sdcfgy • today at 3:55 PM

I'm worried that this behaviour has to be defended.

x3n0ph3n3 • today at 4:57 PM

curl-to-shell is a terrible installation mechanism because it's not easily reversible and I can't tell if any of the assets are signed, or integrity checked, or not.