Erroneous 'Spam' Flag Affected 102 npm Packages (npmjs.org)
There was some trouble last weekend at the world's largest package repository. An anonymous reader quotes the official npm blog:
On Saturday, January 6, 2018, we incorrectly removed the user floatdrop and blocked the discovery and download of all 102 of their packages on the public npm Registry. Some of those packages were highly depended on, such as require-from-string, and removal disrupted many users' installations... Within 60 seconds, it became clear that floatdrop was not a spammer -- and that their packages were in heavy use in the npm ecosystem. The staffer notified colleagues and we re-activated the user and began restoring the packages to circulation immediately. Most of the packages were restored quickly, because the restoration was a matter of unsetting the deleted tombstones in our database, while also restoring package data tarballs and package metadata documents. However, during the time between discovery and restoration, other npm users published a number of new packages that used the names of deleted packages. We locked this down once we discovered it, but cleaning up the overpublished packages and inspecting their contents took additional time...
In cases where the npm staff accepts a user's request to delete a package, we publish a replacement package by the same name -- a security placeholder. This both alerts those who had depended on it that the original package is no longer available and prevents others from publishing new code using that package name. At the time of Saturday's incident, however, we did not have a policy to publish placeholders for packages that were deleted if they were spam. This made it possible for other users to publish new versions of eleven of the removed packages. After a thorough examination of the replacement packages' contents, we have confirmed that none was malicious or harmful. Ten were exact replacements of the code that had just been removed, while the eleventh contained strings of text from the Bible -- and its publisher immediately contacted npm to advise us of its publication.
They're now implementing a 24-hour cooldown on republication of any deleted package names -- and are also updating their review process. "As a general rule, the npm Registry is and ought to be immutable, just like other package registries such as RubyGems and crates.io... However, there are legitimate cases for removing a package once it has been published. In a typical week, most of the npm support team's work is devoted to handling user requests for package deletion, which is more common than you might expect. Many people publish test packages then ask to have them deprecated or deleted. There also is a steady flow of requests to remove packages that contain contain private code that users have published inadvertently or inappropriately."
In cases where the npm staff accepts a user's request to delete a package, we publish a replacement package by the same name -- a security placeholder. This both alerts those who had depended on it that the original package is no longer available and prevents others from publishing new code using that package name. At the time of Saturday's incident, however, we did not have a policy to publish placeholders for packages that were deleted if they were spam. This made it possible for other users to publish new versions of eleven of the removed packages. After a thorough examination of the replacement packages' contents, we have confirmed that none was malicious or harmful. Ten were exact replacements of the code that had just been removed, while the eleventh contained strings of text from the Bible -- and its publisher immediately contacted npm to advise us of its publication.
They're now implementing a 24-hour cooldown on republication of any deleted package names -- and are also updating their review process. "As a general rule, the npm Registry is and ought to be immutable, just like other package registries such as RubyGems and crates.io... However, there are legitimate cases for removing a package once it has been published. In a typical week, most of the npm support team's work is devoted to handling user requests for package deletion, which is more common than you might expect. Many people publish test packages then ask to have them deprecated or deleted. There also is a steady flow of requests to remove packages that contain contain private code that users have published inadvertently or inappropriately."
... that a little thinking ahead would have prevented this rather obvious gaffe. But then, if you thought that you'd've presumed that javascript monkeys can think ahead, or at all.
Apparently not.
They are a risk for both the site (they can just disappear or change without notice) and the user (malware, yet another library to manage in no-script).
Why expose yourself and your users to this? It is willful negligence and unethical if you ask me.
I use this guy's express-cocaine-service package a lot. This was terrible for me. I had to find another supplier but who knows what was in the package I received.
I have no idea what this block of text is telling me. What are npm packages? Who is floatdrop and why is he relevant?
Only the State obtains its revenue by coercion. - Murray Rothbard
If you have an important project and it is dependent upon a remotely-published package, it's not an important enough project to you.
There is a certain appeal to letting someone else maintain code and do bug fixes for you, but you have to give up that dream when the project becomes more than a casual "thing" you play with for fun.
They're now implementing a 24-hour cooldown on republication of any deleted package names
So make attackers wait a whole day before uploading their compromised replacements for widely-used packages. Got it!
Seriously, NPM is a shithole. "As a general rule, the npm Registry is and ought to be immutable", you think? It's not a "general rule". It's "all the time, every" you freaking amateurs.
This right here is how you brought it upon yourself, and why I have zero sympathy for your self-imposed situation. If I contribute a package to Debian, you think they'll spend "most of their week" removing it just because I asked? That's not gonna happen. Here's how you fix this:
"Effective immediately, we no longer remove packages unless they cause a clear and imminent threat to their users. If you accidentally included your GitHub password, change it. That's your problem, not ours. Next time try not to do that, OK? Also, we no longer reuse package names, ever, for any reason. If you wanted it, you should have registered it. And finally, under no circumstances, period, may you ever reuse a version number. Ten years from now, package foo-1.2.3 will be bytewise identical to the one we issued last week. We guarantee it."
Anything short of that is a joke to the rest of the industry. I'm not being idealistic or unrealistic, either: these are completely reasonable, common policies that pretty much literally every other package repo implements.
Dewey, what part of this looks like authorities should be involved?
Lovely article... What is npm?
Ignorance is bliss. On the plus side, it makes the house of cards web developers call a website these days, easier to knock over.
"Maintain your own dependencies!"
Bingo! Extra delicious cookie for you, sir! And a salute.
We suffer more in our imagination than in reality. - Seneca
npm is a central point of failure. I actually had a dream that someone hacked javascript on a central server and caused a worldwide DDOS of websites.. It's time for noscript to be enabled by default in all browsers and only run scripts on servers that are local and not on a centralized server. But of course this will never happen. In fact Firefox crippled their noscript with the change to webextentions.
I hope my buddy APK blocks these domains in the next hosts file engine update to keep me safe from this incompetent group!
Node.js Is Bad Ass Rock Star Tech
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
learn the proper use of commas, as your sentences make no sense because of your misuse of commas.
Says the person using improper capitalization.
Last time a developer deleted his NPM packages and broke the Internet.
https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code/
This time the Internet didn't care when the admins deleted the wrong NPM packages. Progress?
I’m harvesting credit card numbers and passwords from your site. Here’s how.
Your and such, idiot an should learn How too grammer and's, spells!
You are supposed to read, that mouthful of a sentence, like William Shatner, and treat each comma as, a dramatic pause for effect.
First of all, if npm is having a lot of issues with package deletion, they need a "staging" repo and a promotion policy, to protect the production repo from breaking changes.
Also, as is industry practice with maven central, it sounds like any company using npm needs to run their own caching mirror, to keep permanent copies of the artifacts your company is using. Unfortunately, I don't think npm's support for private mirrors is as good as maven's.
Anyone know of a good solution to this?
The right to protest the State is more sacred than the State.
So you are saying that retard APK's work failed yet again to prevent an attack.
He should be use to being a failure by now.
Even his parents regret not not aborting him.
Just because his software is such a sack of shit that it requires a rewrite when TLDs change doesn't meant he is incompetent.
By the way I hear it is also listed in the Misc section of some random web sites.
Here is the story of creimy the mountain and his royalties!
Listen to the audio version here:
https://www.youtube.com/watch?...
"Creimy The Mountain"
includes quotes from Pomp and Circumstance March No. 1 in D major (Edward Elgar), Johnny's Theme (Paul Anka), Off We Go Into The Wild Blue Yonder (Crawford), O Mein Papa (Paul Burkhard), Over The Rainbow (Harburg/Arlen), Star-Spangled Banner (Smith/Key), Suite: Judy Blue Eyes (Stephen Stills)
One, two, three
CREIMY the Mountain
CREIMY the Mountain
A regular picturesque
Postcardy mountain
Residing between lovely
Rosamond and Gorman
With his stunning wife ETHELL, A tree! A tree!
CREIMY was a mountain ETHELL was a tree Growing off of his shoulder
CREIMY was a mountain
(CREIMY was a mountain!)
ETHELL was a tree Growing off of his shoulder
(ETHELL was a tree growing off of his shoulder)
(hey, hey hey!)
Creimy had two big
Caves for eyes,
With a cliff for a jaw
That would go up 'n down,
And whenever it did,
He'd puff out some dust,
And hack up a boulder (HACK!) Hack up a boulder (HACK! HACK!)
Hack up a boulder (HACK! HACK! HACK!) Up a boulder
Now, one day, now I believe it was on a Tuesday, a man in a checkered double-knit suit drove up in a large El Dorado Cadillac, leased from BOB SPREEN
("Where the freeways meet in Downey!")
And he laid a HUGE, BULGING ENVELOPE right at the corner of CREIMY THE MOUNTAIN, that was right where his 'foot' was supposed to be.
Now, CREIMY THE MOUNTAIN, he couldn't believe it! All those postcards he'd posed for, for ALL OF THOSE YEARS, and finally, now, AT LAST, his Royalties!
Royalties! Royalties Royalties! Royalty check is in, honey!
Yes, CREIMY THE MOUNTAIN was RICH! Yes, and his eyeball-caves, they widened in amazement, and his jaw (which was a cliff), well it dropped thirty feet!
A bunch of dust puffed out! Rocks and boulders hacked up, (hack! hack!) crushing 'The LINCOLN'!
I gave him the money He acted real funny He hocked up a rock and It TOTALLED my car!
Oh, do you Know any trucks Might be bound for THE VALLEY?
I don't wanna stand here All night in this bar (Dear Lord)
I don't wanna stand here All night in this bar (No shit!)
I don't wanna stand here All night in this bar!
By two o'clock, when the bars are already closed down, CREIMY had broken 'THE BIG NEWS' to ETHELL. And with dust and boulders everywhere, CREIMY, choked with excitement, announced
"ETHELL, we're going on a VACATION!"
Yes, and they WERE going on a vacation! (Oh, and ETHELL, ETHELL, ETHELL, like every little woman, she of course was very excited! She creaked a little bit, and some old birds flew off of her.) CREIMY told ETHELL they were going to Yes! They were going to NEW YORK!
"ETHELL, we're going to New York!"
But first they were gonna stop in LAS VEGAS
It's off to LAS VEGAS to check out the lounges Pull a few handles,
And drink a few beers, (Oh, ETHELL!)
ETHELL, my darling, you know that I love you!
I'm glad we could have a Vacation this year! (Oh, NEET-O!)
Glad we could have a Vacation this year!
They left that night, crunchin' across the Mojave Desert their voices echoing through the canyons of your minds (POO-AAH!)
"ETHELL, wanna get a cuppa cawfee?"
(Howard Johnson's! Howard Johnson's!
Howard Johnson's! Howard Johnson's!)
"Ahhh! there's a HOWARD JOHNSONS! Wanna eat some CLAMS?"
The first noteworhty piece of real estate they destroyed was EDWARDS AIR FORCE BASE
And TO THIS VERY DAY, 'Wing Nuts' and Data Reduction Clerks alike, speak in reverent whispers about that fateful night when TEST STAND #1 and THE ROCKET SLED ITSELF (We have ignition!) got LUNCHED! I said LUNCHED! (Lunched!) By a FAMOUS MOUNTAIN-IN and his SMALL, WOODEN WIFE.
"Word just in to the KTTV News Service undeniably links THIS MOUNTAIN and HIS WIFE to drug abuse and