Show HN: npm-daycare, an NPM proxy that filters out recent & small packages
Show HN (score: 6)Description
- are younger than 48h (it will just provide an old version instead)
- have fewer than 5,000 weekly downloads
https://github.com/stack-auth/npm-daycare
This is in response to the recent supply chain attacks that shattered the JavaScript ecosystem [1]. It's likely not a problem that will go away any time soon, so we figured we'd build something to protect against it.
Doing this on the proxy layer means it will work across the entire system, as proxies are set globally. In the future, we could also add more filters to the proxy.
To get started, just run the Docker container:
docker run -d --rm --name npm-daycare -p 4873:4873 bgodil/npm-daycare
npm set registry http://localhost:4873/
pnpm config set registry http://localhost:4873/
yarn config set registry http://localhost:4873/
bun config set registry http://localhost:4873/
npm view @types/node # has recent updates
npm view pgmock # has <5,000 weekly downloads
Downside: npm-daycare won't show packages that are younger than 48h on its default config, so be aware of that when you try to update your packages to patch a zero-day exploit.You probably also shouldn't rely on this as your only line of defense. Curious to hear what you think!
More from Show
Show HN: I built a tool that reviews any GitHub PR and quizzes you on it
Show HN: I built a tool that reviews any GitHub PR and quizzes you on it Prepend any Github PR URL with `makesense` to get a<p>- quick review for all sorts of issues (cleanly designed issue explorer)<p>- summary of changes in concise slide deck to grasp the essence of changes<p>- a 5 question quiz on the changes to make sure there's "cognitive coverage" of the change<p>There's also a handy bookmarklet using which you can trigger a review for any publicly accessible Github PR<p>Feedback welcome
Show HN: A Handwritten Blogging Platform
Show HN: A Handwritten Blogging Platform The idea is a place for beautiful notes like <a href="https://insidevoices.handwritten.blog" rel="nofollow">https://insidevoices.handwritten.blog</a>.
No other tools from this source yet.