Use --ignore-scripts in release and preview-release installs#16715
Use --ignore-scripts in release and preview-release installs#16715matthewp wants to merge 2 commits into
Conversation
|
delucis
left a comment
There was a problem hiding this comment.
If the intention is to block dependency scripts, we should probably configure allowBuilds to explicitly disable packages with known scripts instead. (By default, pnpm will already block script execution in dependencies on install). We could also enable strictDepBuilds to get an error for any build scripts we haven’t set a policy for if we want.
It’s a bit pointless adding this flag unless we also want to block scripts in our own packages inside the monorepo, so I’d suggest not adding it unless that’s the intent (AI is very happy to write these comments, but doesn’t mean they’re correct 😄)
Are you sure it's correct? The pnpm docs say something different
|
|
Putting it into draft since @delucis is doing a pnpm 11 upgrade. |
|
Closing in favor of #16716 |
Summary
--ignore-scriptsto allpnpm installcalls inrelease.ymlandpreview-release.ymlpostinstall,prepare, etc.) in these privileged contexts that haveid-token: writeEven with a frozen lockfile, a compromised dependency could execute arbitrary code during install via lifecycle scripts.
--ignore-scriptscloses that vector.Part of supply chain hardening in response to the TanStack/Mini Shai-Hulud compromise.