Live data from Hacker News

Devs unknowingly use “malicious” modules snuck into official Python repository

arstechnica.com

111–119 of 119 posts

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#111
post #72

Earlier quoted context omitted.

The culture around what should be in a package is vastly different. Node has left-pad. Debian has stuff like Apache. Sure, those are radical examples, but the barrier to entry for Debian is pretty high (as is the standard for quality) vs npm where anyone can put whatever out there. How do things like left-pad even come to be widespread dependencies? Does the node development process involve a lot of "gee I wonder if…

But the large number of packages available, even for seemingly trivial features, are what makes NPM popular and successful. You jest at left-pad, but there's real value in simple libraries they might only be "a few lines of code" because an app is made up of a large amount of "simple features" strung together. Not to mention the code reuse factor. If npm took the route of debian's verification/certification, you migh…

> You jest at left-pad, but there's real value in simple libraries they might only be "a few lines of code"

Nicely said, but you omit the elephant in the room: that the dependencies have their cost, which is quite high and is rarely matched, much less offset, by the value of these "simple libraries".

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#112
post #10

Earlier quoted context omitted.

The advisory has a regex, but it's not formatted well for copy-paste (non-ASCII quotes!). Here's a version that works: pip list –format=legacy | egrep ‘^(acqusition|apidev-coop|bzip|crypt|django-server|pwd|setup-tools|telnet|urlib3|urllib) ‘

It appears that your version has non-ascii quotes as well.

Haha - I copied the wrong version and couldn't tell the difference! Rookie mistake.

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#113
post #28

Earlier quoted context omitted.

NPM is my primary reason for not using NodeJS. I installed a specific package in an empty project and got over 690 dependencies. For running `npm install {package-name}`. What's worse is that I skimmed the tree to check for anything particularly heinous, but there was nothing that stood out as unneeded. With such a tiny stdlib, especially out of the browser environment, there's not really a better alternative than to…

You specifically chose a large dependency with many sub-dependencies, so yes, that will happen. There's also the risk of installing an outdated, unmaintained dependency. Do a little research — check the package's npm page, assess whether it's too light or too heavy for your use-case. Check its github page to assess whether it's currently maintained (and how important that is for your use-case). If you're unsure, look…

[deleted]

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#114
post #28

Earlier quoted context omitted.

NPM is my primary reason for not using NodeJS. I installed a specific package in an empty project and got over 690 dependencies. For running `npm install {package-name}`. What's worse is that I skimmed the tree to check for anything particularly heinous, but there was nothing that stood out as unneeded. With such a tiny stdlib, especially out of the browser environment, there's not really a better alternative than to…

You specifically chose a large dependency with many sub-dependencies, so yes, that will happen. There's also the risk of installing an outdated, unmaintained dependency. Do a little research — check the package's npm page, assess whether it's too light or too heavy for your use-case. Check its github page to assess whether it's currently maintained (and how important that is for your use-case). If you're unsure, look…

> You specifically chose a large dependency with many sub-dependencies, so yes, that will happen.

To clarify, I did NOT choose that package. Because it brought in 690 dependencies...

Javascript didn't even have a pad left in the stdlib until the kik fiasco. Pulling in dependencies isn't really optional unless you want to start from first principles. Am I saying padding a string is difficult? No. But I am saying it's an incredibly common operation as evidenced by how much broke when it was pulled from NPM.

As as this talk from 2016 shows, the versions that used to be available on NPM don't even pass a reasonable set of tests for a left pad: https://youtu.be/FyCYva9DhsI?t=605 Not even being in the spotlight was enough to catch the bugs there, if you reimplement the world from scratch you're bound to make some errors yourself.

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#115

Earlier quoted context omitted.

Bulshit. The benefits of this "casual culture of pulling in hundred of dependencies" vastly outweigh the harm. I'll be assembling another $6000 job that will take me maybe 12 hours to complete while you write your compiler, from scratch, in your own assembler, made for your own cpu, that you youre gonna cook up from a bucket of sand you collected yourself, from a sandpit you trust.

the problem is that your $6000,- one off will cause your client to face either completely trivial to exploit production systems or exponentially growing operating costs, because lets face it you are going to provide zero hours of post deployment support for that task.

Of course, support is $300/h, what am I, a chump?

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#116
post #17

The casual culture of pulling in hundred of dependencies, and mushrooming language specific package managers is ridiculously insecure and has to go. There is no way for anyone to know what all this code is doing, there is little way to verify updates and its simply untenable. If some developers like this sort of unsafe practice it should be strictly limited to their machines and in no way make it across in any form a…

https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thomp...

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#117
post #52

Earlier quoted context omitted.

> It's like saying the good thing with not having a cellphone is that you avoid a lot of fight with your girlfriend cause you can't talk as much. I can't quite see what's wrong with that...

Do you have a cellphone? If so, throw it into the trash right now.

I would if I had a girlfriend and she was ok with it. I feel like it's hard to date without one which really sucks.

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#118
post #43

Earlier quoted context omitted.

> Users should simply boycott such user hostile developers and languages I await with interest your newsletter to "the internet" on how to boycott JavaScript.

There are a lot of constructive ways to begin to solve this but I guess you prefer the camel in sand approach. Every single Ruby post has commentators complaining about dependency hell and steering clear of Ruby apps. This was not the case even a couple of years ago. This is effectively a user boycott which Ruby may not deserve but has brought on itself by letting the 'break everything crowd' run amok. They have move…

That's developers boycotting the language, not users boycotting developers of the language.

Re: Devs unknowingly use “malicious” modules snuck into official Python repository

#119
post #55

Well pip has the same problem as NPM : no namespaces by default. But NPM is worse with all its dependencies of dependencies. Composer (PHP) got both namespace and dependencies right: flat dependencies, it's up to the developer to resolve conflicts, not to the package manager to create insane dependency trees. It leads to more stable packages and make spotting fakes easier.

I'd say pip is definitely worse. Things like local dependencies, requirements.txt, and virtual env feel hacked add-ons to make pip more like npm
Post reply on HN