r/Hacking_Tutorials • u/GeekedSilicon • 32m ago
Question Show HN: Flag npm packages in your lockfile published in the last few days
Most of the recent npm supply-chain incidents were caught and pulled within a day or two of publishing. If nothing you installed was that new, you were fine. pnpm has a minimum release age setting now, but I wanted to check lockfiles I already have, npm and yarn ones included.
Drop a package-lock.json, yarn.lock or pnpm-lock.yaml and it lists every version published inside the window you pick, so you can hold those back.
https://usefultabs.com/fresh-hold/
Caveats, since they matter for this kind of tool:
- It asks the public npm registry for publish times, which means downloading each package's full registry document. A big lockfile can be a lot of data. There's a stop button.
- Yarn Berry and pnpm lockfiles don't record which registry a package came from, so private scoped names in those get sent to registry.npmjs.org. The page tells you before you run it. npm and Yarn classic lockfiles do record it, so private packages there are skipped and never sent.
- A name the registry doesn't know shows as "could not be checked", not as safe.
It's a static page. Your lockfile never goes to my server; the only lookups are to the npm registry.