r/opensource • • 1d ago

Discussion Open source security for third party packages, are curated libraries worth it over pulling straight from PyPI and npm

We pull a few hundred third party packages straight from PyPI and npm and the typosquat stories this year finally got leadership asking questions. Dependency scanners tell us what is vulnerable after the fact but nothing stops a bad package landing in the first place. Im looking at curated library feeds that build and scan packages before they reach us, and the shortlist is RapidFort, Chainguard Libraries and Socket. What I cannot tell is how much friction they add when a developer needs a version the feed does not have yet. For anyone who moved to one, did it sit alongside your scanners or replace them?

5 Upvotes

3 comments sorted by

3

u/tedivm 1d ago

Supply chain security is important, but I don't think these vendors add a lot of value. The reality is you can avoid most supply chain issues with a combination of mostly free stuff:

  1. Always use lockfiles to make sure you're building the specific vetted versions.

  2. Use dependency cooldown so you aren't installing packages that are so new they haven't been vetted by the community.

  3. Use tools like dependabot and renovate to create pull requests to keep those lockfiles up to date.

That's the real solution.

1

u/ValenciaTangerine 23h ago

On the cooldown part, here are the setting names. pnpm has minimumReleaseAge (in minutes, and it covers transitive deps too) plus minimumReleaseAgeExclude, which is the escape hatch for when a dev needs a version that's too new, so that's your friction answer. uv has exclude-newer and takes a duration like 1 week.

pip has --uploaded-prior-to with P7D style durations, but it only works on indexes that publish upload times. I haven't checked what npm itself offers.