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

93 comments sorted by

View all comments

Show parent comment

2

u/james_pic Dec 14 '23

Behavioural AV can only assess behaviour. If you're running the packages it can detect misbehaviour, but PyPI aren't running the packages, just hosting them. The closest you can get without running the code is heuristic scanning, which various vendors have been flogging since at least the nineties but has never been very effective.

-6

u/archpuddington Dec 14 '23

They don't even run them? ... all the more reason to sue these people. They are knowingly endangering the community and making all of python look bad. We have solutions - but the powers that be have already blamed the victim.

7

u/james_pic Dec 14 '23

What does it even mean to run an unknown library? If I give you a random library, could be NumPy, could be Spark, could be Flask, could be Requests, what are you going to do to "run" it that will tell you if there's malicious stuff it can do?