add --ignore-scripts to npm build - #34
Conversation
use `--ignore-scripts` to secure the npm builds from package supply chain attacks via shell access in pre / post scripts. See https://docs.npmjs.com/cli/v7/commands/npm-install#ignore-scripts
|
Sounds good to me. It's possible we have projects with dependencies that run post-install scripts, but I think the risks of running them outweigh the benefits. I'll double-check whether |
Looks like |
|
On the other hand, we can also protect ourselves against malicious scripts by running installs with restricted permissions, which I think the Docker build already does? Maybe the best solution is a combination of restricted |
|
Oh, and I think the only package that might need to run a post-install script is |
zwolf
left a comment
There was a problem hiding this comment.
If nothing currently uses post-install scripts functionality, then this looks fine to me.
Noting that the FE team will have to keep this in mind as things are migrated or newly added. FEM won't be, due to its idiosyncratic deploys, but worth remembering.
Related to #33 (comment)
Run
npm cisystem with--ignore-scriptsto secure the npm builds from package supply chain attacks via shell access in pre / post scripts. See https://docs.npmjs.com/cli/v7/commands/npm-install#ignore-scripts