Feature/lavamoat - Allow scripts list #909
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the allow-scripts package from the Lavamoat suite of JS security tools.
This lets us define which packages can use scripts and which scripts they can use during the build/install lifecycles. This acts as a whitelist and serves to protect against supply chain attacks that are popular on npm and which take advantage of the open access to lifecycle scripts by the npm runtime.
Adds the allow scripts package and configures allow lists for all workspaces.
Adds
yarn setup
to replaceyarn install
.Future work -
I was not able to add any runtime hardening with either Lavamoat or SES directly, most roadblocks are related to Webapcks dynamic module resolution and some refactoring needed to support proper use of the shimmed global object. Future possible solutions include investing in a webpack plugin and/or porting pieces of ses back to freighter directly.