-
|
Hi everyone, I’m trying to harden a Gatsby workflow against npm supply-chain risk by using Install-time lifecycle scripts are a common attack vector, and OWASP recommends disabling them by default. One way to keep the security posture while still allowing needed packages to work is In my minimal Gatsby example, I have a few related questions:
A couple of clarifications to keep the focus on the right risk model:
I don’t think this is a bug, so I’m asking here first before opening an issue. Thanks for any guidance or recommended practices. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
A little update on this topic: using {
"lavamoat": {
"allowScripts": {
"@lavamoat/preinstall-always-fail#3.0.0": false,
"gatsby#5.16.1": false,
+ "gatsby-plugin-sharp>sharp#0.32.6": true,
+ "gatsby>@parcel/cache>lmdb#2.5.2": true,
"gatsby>@pmmmwh/react-refresh-webpack-plugin>core-js-pure#3.24.1": false,
"gatsby>core-js#3.48.0": false,
"gatsby>gatsby-cli#5.16.0": false,
+ "gatsby>lmdb#2.5.3": true,
+ "gatsby>lmdb>msgpackr>msgpackr-extract#3.0.3": true,
"gatsby>memoizee>es5-ext#0.10.64": false,
+ "sass>@parcel/watcher#2.5.6": true,
}
}
}
Should I also treat build-time scripts or Gatsby lifecycle scripts as a separate risk in this scenario? Community, or maintainers input are still appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
Just updated Thanks for your attention. |
Beta Was this translation helpful? Give feedback.
Just updated
can-i-ignore-scriptswith the packages that can be ignored on install, in case anyone for some reason wants to useignore-scripts=truewith a legacy Gatsby project.Thanks for your attention.