r/Python • • May 07 '26

Discussion Do we really check library security?

PyPi's filtering isn't cutting it. We all know it. I know the people about to say to just use the popular libraries that have community moderation.

The recent claude code injection hack in Torch has proved that isn't a solution.

https://www.reddit.com/r/Python/s/2lwDYSv0eT

And scanning packages are either unmaintained or maintained by one dev in the middle of nowhere.

https://pypi.org/project/safety/

So, I honestly ask you, short of reading each libraries code by hand or avoiding them entirely how do you stay safe?

Sandbox enviroments? Winging it? Hope?

27 Upvotes

51 comments sorted by

View all comments

Show parent comment

20

u/SheriffRoscoe Pythonista May 07 '26

No slack given. People are responsible for the words they use, even if they come from an LLM. In this case, they were posted by some stock-trading company's userid, so even worse.

1

u/marr75 May 08 '26

I didn't say any slack should be given. I was suggesting that the commenter not bother to take offense at the content of a low effort post.

-10

u/tradelydev May 08 '26

Not LLM, but I'm glad I can be confused with it.

Why Autism gets flagged as AI.

Here is something to read while we are at it.