AI made speed common. Craft is the edge.
Founder & CEO / Design Engineer, @GProductionsJP
Built OpenSTF (13k+ stars)
元サイバーエージェント(15年間)
署名できる仕事だけを。日本の創造力を、世界へ。
Omarchy is forever free. There's no monetization scheme coming. I'm already rich and the Omacom Foundation is a well-founded nonprofit.
The only ulterior motive here is to make Linux win on the desktop and create the perfect, malleable computer for all to enjoy!
I learned spearfishing in Japan, and did myself the Shinkeishime.
It's fine to do it yourself for a small quantity of fish, and actually fun as a hobby, but for commercial fishing I can see this is revolutionary.
Flavor is 1000% different.
I can assure one of the reasons of why sushi 🍣 in Japan is better its thanks to the Shinkeishime technique.
After 10 days of using Bend2, I am thoroughly hooked.
Migrating core TypeScript logic to Bend's functional style, with laws and proofs, feels very satisfying.
@SkrOYC@grok Yeah right now Nix ranks on the top for package managers.
I just found amusing that the author of Brew was vouching for curl|sh despite his own creation is at least more secure
Max, Homebrew is the best argument against this post.
Last year I wrote a paper scoring 100 install methods. On macOS:
Homebrew Core: 89/100
Homebrew Cask: 84/100
A developer's own curl | sh: 43/100
A third-party curl | sh: 18/100
That's a 46 to 71 point gap on the same Mac. People who flinch at curl one-liners are reacting to that gap, even if they can't explain it.
You're right that it comes down to trust, and you're right that a proper package manager is what you want. Afaik, where we differ is that I don't think trust is a yes/no question about the vendor. When you run curl | sh, you trust the vendor, their domain, their DNS, their CDN, and whoever holds their GitHub token on the day you install. You can't verify what you got, you can't tell if everyone else got the same file, nobody can revoke it, and nothing records what ran.
The paper I wrote scores six things. Integrity and review/CI are worth 25 points each, provenance and least privilege 15 each, update hygiene and distribution hygiene 10 each. curl | sh gets 0 out of 25 on review and between 1 and 8 out of 25 on integrity.
You said you can at least inspect the script before running it.
The file your browser shows you and the file curl downloads can be different. The server sees the User-Agent and sends whichever it wants.
With | sh the server can do more. The shell runs the script while it's still downloading, so the server can tell from the timing that the output is going into a shell and send a different payload. https://t.co/nrPnlaKH9C published a working demo of this 10 years ago. It even beats the careful version where you curl the script to your terminal first, read it, and then pipe it into sh, because the server can tell those two requests apart.
If the connection drops halfway, sh runs the half it received.
To run the exact script you read, you have to save it to a file, read the file, and run that file. That isn't a one-liner anymore, and once you add a hash check you've built a package. Most people never read the script anyway, since skipping that step is the reason one-liners exist.
You said a .pkg can also run arbitrary scripts.
Of course it can. The difference is that a pkg is a fixed file. The developer signs it with a Developer ID, Apple notarizes it, and Gatekeeper checks both before it runs. Suspicious Package shows you the same bytes the installer will run, and Apple can revoke the signature if the pkg turns out to be malware.
curl | sh runs whatever the server sends at the moment you press enter. HTTPS tells you that you reached the right domain. It tells you nothing about whether someone broke into that domain. Many of these scripts also call sudo partway through, so a script nobody read gets root.
You said MitM is a risk with any download.
A signature check fails if anyone changes the file in transit or on a mirror. That is the reason signing exists.
You said that once anything is installed it can run arbitrary code anyway.
After install, yes. But the install step decides whether you got the same file as everyone else, and whether anyone would find out if you didn't.
A curl | sh server can send malware to one company's IP range on one night and the clean script to everyone else, including any researcher who checks. A notarized pkg is one build with a hash Apple has on file. Releases signed through a transparency log like Sigstore leave a public record of every version, so a one-off malicious build would show up there. Most of supply chain security is about whether someone can send you different code without anyone noticing.
The inspect argument also assumes a person reads the script. In 2026 a lot of install commands get run by coding agents that copied them from a README, and the person's only check is approving a prompt. Nobody reads the script in that setup, so the install method has to be safe on its own.
Homebrew also ships a signed, notarized Homebrew.pkg on its GitHub releases. The current maintainers already built what the people complaining about curl asked for.
If you ship a CLI and want a better score:
- Put it in a package manager like a Homebrew tap, apt, winget, or nix. You get checksums and pinned versions with no extra work.
- Sign your releases. On macOS that means Developer ID plus notarization, and on other platforms cosign or minisign.
- If you still offer a curl command, pin the version, check a hash or signature inside the script, wrap the script in a main() function so a cut-off download runs nothing, install into the user's home directory, and ask before using sudo.
- Document how to verify the download. Most users will skip it, but anyone auditing your tool will use it.
You don't need to apologize for the one-liner. It got a lot of people to open a terminal for the first time, and in 2009 Gatekeeper, notarization and Sigstore didn't exist yet. Now they do, and the default install command should use them.
The paper is in the reply. I'd like to hear what you think.
curl one liners trigger people apparently.
They want a dedicated .pkg.
Which also can run arbitrary scripts.
And once anything is installed by any mechanism it can basically run arbitrary scripts too.
So then you're really just talking about race conditions on inspecting the
Ojo, no dije que me guste brew lol. Le estaba discutiendo al autor de brew, que defendía curl|sh. El paper lo hice porque todos los métodos tienen sus problemas y quería medir cuánto.
Y lo de Binance me da la razón al paper: el chabón buscó la herramienta online y se bajó un Homebrew trucho. Esas páginas de phishing te dan un comando para pegar en la terminal. Es justo la capa que le falta a curl | sh, saber que estás en el sitio posta. Hasta el bootstrap de brew tiene ese riesgo, por eso existe el .pkg firmado.
Lo del user agent: con | sh ni hace falta, el server detecta por timing si va a un shell o a un archivo. Está documentado desde 2016 que es un exploit facil de hacer.
Igual, bueno cruzarme con otro argentino que le interese en el tema 🇦🇷