feat: allowScripts tooling and inBundle hardening#9480
Merged
owlstronaut merged 1 commit intoJun 3, 2026
Conversation
Behavior-neutral additive tooling split out of npm#9424 so it can land on v11 without the v12 default-deny flip: - arborist: add collectUnreviewedScripts() + strictAllowScriptsError (ESTRICTALLOWSCRIPTS) helpers in unreviewed-scripts.js - arborist: isScriptAllowed() returns null for bundled deps; propagate inBundle through isolated reifier / isolated-classes - libnpmexec: opt-in strict-allow-scripts preflight (only under --strict-allow-scripts); no default behavior change - cli: rewrite check-allow-scripts as a wrapper over collectUnreviewedScripts; exclude bundled deps from rebuild/runAll - tests for all of the above No default install-script behavior changes; the default-deny gate stays in npm#9424 for v12.
3b20a3b to
80ae152
Compare
owlstronaut
approved these changes
Jun 3, 2026
Contributor
|
🎉 Backport to |
owlstronaut
pushed a commit
that referenced
this pull request
Jun 3, 2026
Backport of #9480 to `release/v11`. Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pulls the non-behavioral pieces out of #9424 so they can land on v11: the
collectUnreviewedScripts/strictAllowScriptsErrorhelpers, theinBundlefixes, and an opt-in libnpmexec preflight. Nothing changes by default here, install scripts still run. The default-deny flip stays in #9424 for v12.References
#9424