I only discovered this recently, and it's very handy.

Piping scripts directly to bash is a security risk. You can always download the scripts, inspect them and run locally if you so choose.

you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 1 year ago (3 children)

Piping scripts directly to bash is a security risk

Nobody has ever explained why. What is the difference between executing a script directly from curl, and adding a repository which downloads a package which contains a script.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 year ago (2 children)

    The URL can point to a different file. People can post maliciously similar URLs and trick you into running something else.

    With a repository you have some semblance of "people have looked at this before". Packages are signed and it will provide a standard way to uninstall and upgrade in the future.

    There's literally no good reason to replace it with a shell script on a website.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 year ago

    There’s literally no good reason to replace it with a shell script on a website.

    I fully agree that a package manager repository with all those tools would be preferable, but it doesn't exist, does it? I mean... content is king. If the only way to get a certain program or functionality is a shell script on a website, then of course that's what is going to be used.

  • source
  • parent
  • Here is a good reason

    root@proxmox:~# apt install vaulrwarden
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package vaulrwarden
    root@proxmox:~#
    

    It's the difference between "it works" and "it doesn't"

  • source
  • parent