I started to develop only inside VMs, with a full Desktop, IDE, browser etc. inside the virtual machine. There have been to many contaminations of major package repos lately. Only one typo in an import statement up the dependency chain and you’d be compromised.
Dozens of malicious PyPI packages discovered targeting developers
161–170 of 334 posts
Re: Dozens of malicious PyPI packages discovered targeting developers
#162I wonder why we can’t have pip packages be published by username or organization, like pip install google/tensorflow It would significantly reduce the attack space
It gives false sense of security. What about google_official/tensorflow
Re: Dozens of malicious PyPI packages discovered targeting developers
#163This type of stuff is one reason I like vendoring all my deps in golang. You have to be very explicit about updating dependencies, which can be a big hassle, but you're required to do a git commit of all the changes, which gives you a good time to actually browse through the diffs. If you update dependencies incrementally, it's not even that big a job. Of course, this doesn't guarantee I won't miss any malicious code…
Re: Dozens of malicious PyPI packages discovered targeting developers
#164This type of stuff is one reason I like vendoring all my deps in golang. You have to be very explicit about updating dependencies, which can be a big hassle, but you're required to do a git commit of all the changes, which gives you a good time to actually browse through the diffs. If you update dependencies incrementally, it's not even that big a job. Of course, this doesn't guarantee I won't miss any malicious code…
The problem is the tree of dependencies you might check. Sure you can check the changes in a direct dependency, but when that dependency updates a few others and those update a few others, the number of lines you need to read grow very quickly
Re: Dozens of malicious PyPI packages discovered targeting developers
#165Earlier quoted context omitted.
Does GitHub actually prohibit programs that are up front about the fact they do something questionable? Considering there have been active repos for those steam pirating DLLs on the site for ages I thought they only really go after hidden maliciousness
Considering the entire open source pentesting community almost exclusively uses GitHub to host their projects: no. There is actual malware being hosted on GitHub, with the caveat that malware and pentest tools or proof of concept exploits are sometimes indistinguishable. GitHub announced a few years ago that they would crack down on malware and were about to introduce some very strict T&C. After a huge backlash from…
I was a skid once, I get it, probably a lot of us were.
Re: Dozens of malicious PyPI packages discovered targeting developers
#166Example of defining project dependencies:
{
"apollo-client": {
"version": "...",
"access": ["fetch"] // only fetch allowed
},
"stringutils": {
"version": "...",
"access": [] // no system resources allowed for this dependency, own or transitive
},
...
}
It would probably require the language to limit monkey-patching core primitives (such as Object.prototype in javascript),
and it would be more cumbersome for the developer to define the permissions it gives to each dependency.
These required permissions could be listed on the package site (eg npm or PyPI) and the developer would just copy paste the permissions when adding the dependency.
But if you upgrade a dependency version and it now requires a permission that seems suspicious (eg "stringutils" needing "filesystem"), it would prompt the developer to stop and investigate, or if it seems justified add the permission to "access" list.Re: Dozens of malicious PyPI packages discovered targeting developers
#167I wonder why we can’t have pip packages be published by username or organization, like pip install google/tensorflow It would significantly reduce the attack space
quite why python refuses to learn from anything that went before it I really dont know
“Namespaces are one honking great idea — let's do more of those!”
Re: Dozens of malicious PyPI packages discovered targeting developers
#168I wonder why we can’t have pip packages be published by username or organization, like pip install google/tensorflow It would significantly reduce the attack space
Re: Dozens of malicious PyPI packages discovered targeting developers
#169https://medium.com/agoric/pola-would-have-prevented-the-even...
Re: Dozens of malicious PyPI packages discovered targeting developers
#170Earlier quoted context omitted.
> And why is nodejs so much more dependency-happy than python? Could it be that nodejs has implemented package management more consistently and conveniently than other languages/platforms?
That's one thing, the other is the almost complete absence of a standard library.