▲ | condiment 11 hours ago | ||||||||||||||||
What makes node supply chain attacks so dangerous is the CI/CD pattern whereby all dependencies are downloaded from the internet every time a build is created. NPM attacks move fast. I previously worked in an environment where our ci servers weren't internet-connected. One of the things we did get get node builds to work was we had 'node_modules' for our projects in a separate repository that got joined with our source code in CI to complete a build. When a developer added a dependency, they had to update this repo from their local version. It was annoying to have to synchronize two repositories, but this ended up being a forcing function for the development team to adopt several of the suggestions listed here. When you see a PR with a massive diff for a small dependency change, eyebrows raise and the team starts conversations about how to improve things. | |||||||||||||||||
▲ | minitech 10 hours ago | parent [-] | ||||||||||||||||
Lockfiles are a more standard and probably better way to do this. (People do need to pay more attention to lockfile diffs.) | |||||||||||||||||
|