r/learnpython • • Jul 26 '23
Is there a trusted source/list of safe python packages?
Pypi doesn't do any vetting to packages published. Is there a list of packages that are known to be safe and verified by some org dedicated to checking?
36
Upvotes
16
u/boy_named_su Jul 26 '23
https://snyk.io/advisor/python
5
u/Work45oHSd8eZIYt Jul 26 '23
Do you have a definition of safe? :)
26
u/ThreeChonkyCats Jul 26 '23
You've asked a super important question.
I've been lead on security projects and audited in this way. It's a fucking horrible process.
Other than keeping a known, saved, local copy of any particular package, its a real challenge.
1
u/m0us3_rat Jul 26 '23 edited Jul 26 '23
and who is vetting the vetters?
that's one of the benefits of "open-source"
thousand of eyes all over the code. including automated tools etc.
in reality, there is no.. trusted anything.
your only choice is to keep a local repo and verify the packages before pushing a "new update".
and it's mostly "security" updates not ..actual package updates.
most of the time.
it is one of the most 100% jobs that you can have.
do expect middle of the night work phone calls.
keep up with all the blogs all the sites news vulnerabilities etc.
time intensive.
sometimes you have/get to craft pre-patches till the code maintainers come up with their own patch.
1
u/quts3 Jul 26 '23
Honestly there is probably a market for a 3rd party enterprise subscription model for python package audit. I am aware of none. Google said they were going to get in the game, but their initial list is basically anticompetitive ecosystems.
1
u/threeminutemonta Jul 26 '23
I haven’t used it and learned of its existence only due to the pipenv docs.
https://github.com/pyupio/safety
I’m keen to start using it now.
1
u/[deleted] Jul 26 '23
who will pay for the audits? the answer is no one. You have to hire someone to audit your code.
1
u/BlueeWaater Jul 27 '23
GitHub has a feature for inspecting your requirements.txt modules for public vulnerabilities. Useful but probably not enough.
1
u/stradivari96 Jul 27 '23
Not sure if google's assured OSS fits:
https://cloud.google.com/assured-open-source-software/docs/supported-packages#python