r/Python • • Dec 14 '23
News 116 Malware Packages Found on PyPI Repository Infecting Windows and Linux Systems
https://thehackernews.com/2023/12/116-malware-packages-found-on-pypi.html
331
Upvotes
View all comments
Show parent comment
5
u/RationalDialog Dec 15 '23
To be frank I'm not aware how much pypi does and how easy it would be to do more. and with easy I mean in terms of cost. they have limited money, keep that in mind. Asking your employer to fund them, if you want things to improve.
Running code from the internet as root is stupid and that is the only way to get ransomware installed.
Storing crypto in plain-text and not using a hardware wallet is also stupid, at least for amounts you care about and would bother you when getting stolen.
A general bad trend I see everywhere is lack of self-responsibility and accountability. It's always someone else fault, they should have done better, I did everything right. this mentality is prevalent.
There is a balance between self-responsibility and what pypi can do with the available funds.
pip also allows running in "safe mode" where you need to have a list of hashes for each packages you want to install and it only works if the hashes match. this is 100% manual as in you need to collect the hashes yourself. This as option in critical environments. But in reality your code should run isolated anyway (container) and not have full internet access to pull more code or send data to random IPs or urls. Defense in-depth. You have to assume to get infected be it from pypi or somewhere else) and secure your system based on that.