If you had to install an npm package by URL, instead of by registry name, would you mind? eg. $ npm install https://website.com/package.tgz $ yarn add https://website.com/package.tgz
-
Show this thread
-
Just to be specific. This is a capability that those npm clients offer TODAY. It circumvents the registry, but that's by design. You can even append a SHA1 hash to the URL to enforce integrity checks, actually safer than the registry because it's author-provided.
3 replies 0 retweets 34 likesShow this thread -
PROS: - Author provided integrity hashes - Distributed package distribution - No guardian of control CONS: - No semver ranges (would only work well for top-level dependencies) - Sketchy availability (increased reliance on multiple servers) - Hard to self-host
5 replies 0 retweets 15 likesShow this thread -
Replying to @sebmck
Self-provided integrity hashes seems like a security con rather than pro, cause like, where are they gonna get the hash from? Some website, which is just as easy (probably easier!) to takeover/spoof as the download URL itself
1 reply 0 retweets 1 like
I guess that’s true. But now if you had write access to where the installation instructions were you could just change the package name to something else. I wouldn’t consider that any better.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 