6 ms·
I think this probably happens more often in other package repositories than we hear about it’s just that NPM is gigantic and people like to hate on JavaScript.
by gigatexal 7y ago
I think this probably happens more often in other package repositories than we hear about it’s just that NPM is gigantic and people like to hate on JavaScript.
I’ve done stupid things too. I once committed the s3 keys to our public repo and had to explain why our s3 bill was so high. Never made that mistake again.
- thrwaway48373 7y agoOuch. How long did it take you to figure out what happened, and how high was your bill? How many people abused it, do you think (just one?) and any idea for what?
- gigatexal 7y agoJust one day. Someone uploaded thousands of junk and since we had versioning it took a long time to delete. And I think we were being billed extra on the high load being given to our bucket. So could have been multiple someones. I revoked the keys, deleted the bucket, even my own account, and reset everything. Lucky for me the CTO was understanding. I don’t remember the exact bill amount but it went up in relative terms by something like 2x
- thrwaway48373 7y agoOh, that sounds like you really avoided something much worse that could have happened. I thought you meant like a bill a couple of orders of magnitude larger than you ever paid normally. Thanks for the answers! Good on you for catching it relatively quickly.
- fs111 7y agoWhich other package repos are those supposed to be?
- gigatexal 7y agoMaybe github’s repo push is going to fix things.
- smurv1337 7y agoBeen there done that. I Think we were charged some $6000, not my proudest moment ...
- gigatexal 7y agoOh man I think had our bill been that high I’d have been fired for sure. We were a very cash strapped small op at the time.
- carlosperate 7y agoI'll never understand the idea of punishing employees for honest mistakes. Investing the time and money to hire a competent developer, and their ramp up to full productivity is definitely more expensive than that. Not only that, but the new person might make the same or similar mistake in the future. By being understanding you can save money and have the peace of mind that this mistake won't happen again.
- gigatexal 7y agoWell there are good managers out there that follow this.
- lmm 7y agoHaving submitted packages to Maven Central, NPM seems distinctly lax by comparison. No federation and no package signing speaks to an organisation that makes poor choices rather than one that's just been unlucky.
- gigatexal 7y agoThat low hanging fruit should be addressed. Having hashes of the data attached to the package that could then be checked on download would be nice. But it wouldn’t have fixed this adding of the .git folder.
- lmm 7y agoSorry, I wasn't very clear about the split between my two sentences. Maven central runs a battery of tests on packages before accepting them into the repository, which I suspect would catch this kind of issue. In parallel, I believe NPM is genuinely a worse-run repository than those of other languages, because of their stance on those low-hanging fruit, even though as you say those low-hanging fruit are not relevant to this particular issue.
- awinder 7y agoThis doesn’t count? https://blog.npmjs.org/post/172999548390/new-pgp-machinery https://blog.npmjs.org/post/172999548390/new-pgp-machinery
- pluma 7y agoUnlike Maven Central or almost every other package registry in the world, NPM is operated by a venture capital founded startup (npm Inc). So, yeah, their priorities are very different and that leads to questionable technical decisions. A number of prominent ex-employees have collaborated on a new, federated package repository called Entropic. Frankly, I hope they succeed and npm Inc meets its inevitable fate.
- tracker1 7y agoWhat I really wish that NPM would do, as an initial security addon would be to load each of the JS files and check for all the IP addresses and URLs in the module, and include that in the package information. If it's not an API client, then one can/could be very leery of any addresses and could flag any packages that add/change them between releases, or maybe require a major version bump.
- krapp 7y ago> I think this probably happens more often in other package repositories than we hear about it’s just that NPM is gigantic and people like to hate on JavaScript. This is Hacker News... if other package managers had issues more often than the circus of errors that is NPM, we would definitely hear about it. We don't, because NPM is qualitatively worse than all of them.
- wwright 7y agoI believe NPM is at least an order of magnitude bigger than every other package repository, for what it’s worth.
- pcr910303 7y agoThis is Hacker News... if other package managers that HN hates had issues more often than the circus of errors that is NPM, we would definitely hear about it. We don’t, because HNers hate NPM the most than all of them.
- krapp 7y agoWe don't hear about those other issues as often because those issues don't exist as often. It would only take one user to report on the constant failures of any other package manager. As much as people here do hate NPM (because they have to use it,) a vituperative community like HN still wouldn't pass up the chance to rant about anything else.
- jtdev 7y agoOr... maybe those other package repos are actually better managed? And maybe, just maybe, JavaScript might have actual, material language and ecosystem issues.
- firethief 7y agocargo won't publish with a dirty git working directory unless you force it, so that wouldn't have happened with Rust (and .git/ is excluded implicitly).