News for hackers. Stuff that matters.
Re:Uv is the best thing to happen to the Python ecosystem in... by pama on Wednesday October 29, 2025 @04:05PM (#45752329)
I love uv. But the post starts with a simple install using a oneliner curl piping to sh, which is such a big attack surface area… I would much rather have a much longer one liner that increases safety.
Re:Uv is the best thing to happen to the Python ecosystem in... by hirako2000 on Wednesday October 29, 2025 @04:08PM (#45752370)
It seems to be a trend in the rust community. I guess because rustup is suggested to be installed that way.

But you don't have to. Brew and other package managers hold uv in their registries.

Re:Uv is the best thing to happen to the Python ecosystem in... by oblio on Wednesday October 29, 2025 @04:08PM (#45752368)
Isn't uv like... a Rust binary? If that sh has any sense it just copies the binary and adds it to PATH.
Re:Uv is the best thing to happen to the Python ecosystem in... by rieogoigr on Wednesday October 29, 2025 @05:11PM (#45753095)
but since you are curling a web URL straight to sh you will never know. which is the problem.
Re:Uv is the best thing to happen to the Python ecosystem in... by bmicraft on Wednesday October 29, 2025 @07:26PM (#45754472)
But it's not if you trust the url and curl has `--proto '=https' --tlsv1.2` as args
Re:Uv is the best thing to happen to the Python ecosystem in... by oblio on Thursday October 30, 2025 @07:22AM (#45758778)
What about running a downloaded binary installer? What if the URL is HTTPS?
Re:Uv is the best thing to happen to the Python ecosystem in... by dboon on Wednesday October 29, 2025 @05:32PM (#45753331)
If you look at the script, this is indeed more or less what happens. Except the folks over there are very clever about ergonomics, so the script is quite long so it can detect your architecture, OS, and even libc to give you an appropriate binary. There’s a tool that they use (which they wrote) which generates such install scripts for you

It’s really excellent stuff

Re:Uv is the best thing to happen to the Python ecosystem in... by tiagod on Wednesday October 29, 2025 @08:48PM (#45755096)
What's the difference from going to the website and downloading it, or doing it through the package manager?
Re:Uv is the best thing to happen to the Python ecosystem in... by pama on Thursday October 30, 2025 @05:49AM (#45758111)
Package managers or old school download from a website (gnu) provide a separate public checksum and GPG signature in multiple mirrored locations. Even if their server was compromised I can still be safe.
Re:Uv is the best thing to happen to the Python ecosystem in... by Mawr on Thursday October 30, 2025 @01:53PM (#45762939)
If you're aware of the above then you're aware of what you're doing by piping curl into bash.

In reality, nobody checks checksums of binaries they download, so piping curl into bash makes no difference.

Re:Uv is the best thing to happen to the Python ecosystem in... by pama on Thursday October 30, 2025 @09:15PM (#45767341)
Many people still use package managers though and these run such checks and disclose infosec events. And I still know enough other people who also look at the checksums of individual downloads when needed.

Piping curl to bash, especially a copy/paste from a random blog is way too easy to exploit. Most people might not realize if the unicode they copied from a website silently translates to a different location than what they thought they read in the screen.