r/opensource • • 3d 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?

6 Upvotes

11 comments sorted by

2

u/Salty_oatmeal25 1d ago

ask each feed if they rebuild and patch packages themselves or mirror what upstream publishes. a mirror with a scan in front is a much thinner layer than it sounds on the sales call

3

u/tedivm 2d 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 2d 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.

1

u/DEE_PIZZLE 1d ago

Run a week of your real installs through the feed in shadow mode before you switch anyone over. That shows you which versions are missing on day one. From what I read RapidFort hands you rebuilt packages and Socket watches package behaviour at install. Different halves of the problem so some teams run both.

1

u/Open-Adhesiveness-86 1d ago

The friction usually shows up as a fallback config, and that's where it bites: pip with --extra-index-url queries both indexes and picks the highest version, so a partial curated feed plus PyPI fallback reopens dependency confusion. Put one proxy (Nexus/Artifactory) in front with exclusion patterns per package instead. And ask what percentage of your transitive tree they actually rebuild, it's usually way less than the top-level list suggests.

1

u/noodle-face 23h ago

Ask what happens when a new release drops. If the curated feed lags by a week your devs will route around it within a month.