4 ms·
People who are upset that GitHub suspended him: would you still be upset if the contents of the new package were "require('child_process').exec('rm -rf /*');"?
by josephcsible 5y ago
People who are upset that GitHub suspended him: would you still be upset if the contents of the new package were "require('child_process').exec('rm -rf /*');"? If not, then how malicious does code have to be before a suspension is okay in your opinion?
- nomdep 5y agoOn your own repos? Never for code, nobody force you to run the code.
- bluefox 5y agoI take it you've never read a virus magazine like, say, 40Hex or 29A? What is "malicious code" anyway? Maybe Microsoft Windows is malicious. It does contain code to format your disk.
- greyface- 5y agoNot to mention the aggressive privacy-violating telemetry and advertising.
- chii 5y agoIntent matters. Windows contains the rm -rf code, but you, as a user, would have to knowingly trigger it and confirm. It's not like windows tricks you into formatting your drive. Directing the argument into windows is just whataboutism.
- bluefox 5y ago[flagged]
- yoavm 5y agoKnowingly?! Clearly every developer of an app breaking because of these packages had no idea their app is going to break, and clearly it was exactly the intention. They _were_ tricked. Can you not see a difference between this and between releasing a new package with a README saying "this module will print 'liberty liberty liberty' to your console in an infinite loop!"?
- bluefox 5y agoSo you're saying he also had to document his code? Maybe make a pull request. Every developer is responsible for what goes into his project, including dependencies. When a developer wants to update a dependency, he is responsible for the appropriateness of the update. In order to get an idea, he should audit the changes. For personal code, such an audit may constitute of a quick skim to determine that nothing breaks. For production code, it may also include a security audit. When a dependency that used to do X now does Y and therefore breaks your stuff, you are the one responsible for dealing with it. The author disclaimed any warranty and any fitness of purpose for his project, and whether his intentions make sense or not is of no consequence. My point was that there is no such thing as "malicious code". Code is code, and it's your responsibility to determine whether it fits the context. That someone put it out there with an MIT license means the responsibility is yours. P.S. Ata nishma bachur magniv, lama macharta et ha'autobus? OK, ro'e she'ata gar be-Sverige achshav (Scandinavia ze ha'chalom sheli) az mevin.
- deleted 5y ago[deleted]
- toyg 5y agoI'm not entirely versed in NPM politics, but: 1) GitHub and npm are supposed to be separate things. There might be stuff in that GH account that affects other ecosystems. By all means block the npm account, but that should be it. 2) in the end, one is responsible for the packages one pulls. We keep relearning that lesson over and over, because global package repositories made us lazy.
- fault1 5y ago> GitHub and npm are supposed to be separate things. Is that going to be true forever? I would assume not. There is already much deeper integration between github and npm than there was a few years ago, and Github seems to be going fairly deeply into CI and distribution.
- toyg 5y agoIf that's the case, people will have to start practicing account hygiene...
- throw_m239339 5y ago> People who are upset that GitHub suspended him: would you still be upset if the contents of the new package were "require('child_process').exec('rm -rf /*');"? If not, then how malicious does code have to be before a suspension is okay in your opinion? Microsoft owns both Github and NPM. There is an obvious conflict of interest here.
- ghiculescu 5y ago... it’s not obvious to me?
- throw_m239339 5y ago> ... it’s not obvious to me? If the source was maintained on Bitbucket, why the hell would bitbucket nuke the developer's account access? That's not their problem what happens on NPM. Github and NPM are defacto the exact same company on the other hand. Github actions are in retaliation of NPM "mispublishing".
- josephcsible 5y agoMarak didn't just mess with NPM. He also did a force push to his GitHub repo, replacing all the code there.
- Karupan 5y agoSo? It is a project under his username and he could've done anything he pleased with it. Not defending him, but banning him on GitHub instead of NPM is just bizarre.
- josephcsible 5y agoHe got banned on GitHub for what he did to his GitHub repos. I don't see how that's bizarre.
- xbar 5y agoWhat are the set of commits that GitHub should allow people to make to repos that they solely own?
- chii 5y agoThe set of commits that aren't directly trying to trick someone into installing malicious software. It's fine to host code that contains any instructions, as long as the intent of that code is not to trick someone into running malicious software.
- xbar 5y agoThat sounds reasonable. In this case, if the author had updated the documentation sufficiently along with the change to make it clear what the new behavior was, that would have been fine? I agree that malware is unhostable. And in this case I think the author crossed the line. But I am concerned about getting that line defined in a way that restricts project owners from making whatever changes they want in their own self-interest without tricking people, per se.
- morpheuskafka 5y agoI feel like that's a good rationale for NPM to suspend him and/or remove the offending version, but it seems kind of weird for GitHub to remove his access to the site completely since he wasn't abusing or causing any damage to GitHub. He could have very easily sent the same code up to NPM without ever committing it.
- Diggsey 5y agoJust because there might be a grey area in some cases, doesn't mean that you can't also distinguish some cases. Your example is clearly much more malicious than what the package author actually did. This is obvious from the fact that GitHub won't suspend your account for releasing a new version of a package that has breaking changes... Clearly there is a scale here. The only disagreement is about where the line is. IMO, if the package author had simply deleted the code - ie. published a new version with no functionality, then no action should be taken against them by GitHub or NPM. For this example, I think suspending the account is OTT, but I think NPM would be justified in reverting the package, since an infinite loop is somewhat malicious: and by that I mean that nobody would reasonably expect a package to hang just from importing it. If the package actually deleted data, then both the suspension and NPM revert would be justified.
- evouga 5y agoI think a suspension is okay if the code breaks the GitHub frontend or backend itself, or exposes Microsoft to legal liability (because the code embeds copyright material, etc.) In no other circumstances do I want GitHub patrolling what users commit to their own repositories. Of course, if you pull my code and run it sight-unseen, and are damaged by it, you have a right to be upset at me (and possibly sue me) but that's not something I want GitHub to (try to) police.
- CJefferson 5y agoSo can I put a package containing 'rm -rf' on github at all? Does all code there need to be safe? What if my code has known bugs? If my code has a licence which provides no warranty, then you can use it, but any damage is your fault, that's the point of the MIT license.