Yaron Lavi (@LaviYaron) profile picture
Joined June 2022
Yaron Lavi retweeted
We built our own npm registry with AI. It took a few endpoints, not a moonshot 🛠️ The trigger was a familiar fear. Deel has 200+ repositories. A popular npm package gets hijacked, and someone has to answer: are we running the bad version, and where? 😬 Answering that by scanning lockfiles is brutal. Three package managers, multiple lockfile formats, side branches that never show up on master. And even a perfect scan is too late, because the postinstall script already ran on someone's laptop. Scanning fights the problem at the wrong layer. Every install goes through a registry, so that's where the control belongs. 🎯 The npm registry protocol is just HTTP: metadata, tarball, publish, auth. npm, pnpm, and yarn all speak it. So we built a caching proxy behind our VPN and pointed every developer and CI job at it. What that gave us: 🛡️ Malicious versions blocked before install, not found after 📏 Release-age rules and scanning enforced server-side, for every package manager 🔍 "Are we affected?" becomes a database query, not a fleet-wide grep 📦 Our own S3 copy of every dependency, so upstream outages don't break builds Prevention instead of detection. Once you own the choke point, a whole class of supply chain problems gets tractable. ✅ Full write-up on @deel blog: deel.com/blog/npm-registry-p…
7
1
3
22
14,356