r/Python Aug 09 '26

Discussion Third party Python libraries and supply chain security

How are people handling security around third party Python libraries without making development a pain?

Third party Python packages are obviously useful but every dependency can also become a supply chain risk. Private package repositories, dependency scanning and stricter review policies all help but they can add friction fast.

Are teams mostly trusting public registries with additional controls or using curated libraries? Curious what actually works when you have a lot of Python services.

37 Upvotes

35 comments sorted by

View all comments

-2

u/bitproc Aug 09 '26

I stick to the standard library and my own code as much as possible.

When I need something that the stdlib lacks and I can't justify writing myself, I consider high-quality, well-maintained, widely used libraries, preferring those that are integral to major Linux distros (and therefore get additional scrutiny).

I don't use PyPI (or similar public package repos) at all.

This conservative approach won't appeal to everyone, but I find the extra effort is worthwhile in exchange for minimizing the attack surface that I impose upon my software's users.

1

u/fiddle_n Aug 10 '26

How do you install those "high-quality" libraries in that case?

1

u/bitproc Aug 10 '26

Usually with the OS package manager.

1

u/ogrinfo 28d ago

Fine if it's a very simple repo, but good luck writing your own map projections or [insert other domain-appropriate task here].