• The Cuuuuube
      link
      fedilink
      English
      3
      edit-2
      10 months ago

      Piping curl into sh in install instructions is a fast track to me not taking a project seriously

      • @gomp@lemmy.ml
        link
        fedilink
        210 months ago

        I’ve heard this over and over… what’s the difference security-wise between sudo running some install script and sudo installing a .deb (or whatever package format) ?

        • The Cuuuuube
          link
          fedilink
          English
          110 months ago

          A deb is just a zip file that gets unpacked to where your binaries go. A shell script you curl pipe into shell could contain literally any instructions

          • @gomp@lemmy.ml
            link
            fedilink
            1
            edit-2
            10 months ago

            Binary packages have scripts (IIRC for .deb they are preinst/postinst to be run before/after installation and prerm/postrm before/after removal) that are run as root.

            BTW the “unzip” part is also run as root, and a binary package can typically place stuff anywhere in your system (that’s their job after all)… even if you used literal zip files they could still install a script in ways that would cause the OS to execute it.

            • The Cuuuuube
              link
              fedilink
              English
              110 months ago

              Yeah I’m over simplifying on purpose here. The bottom line is piping into sh is dangerous