Uh oh!
There was an error while loading. Please reload this page.
fix: Enforce allow-git/allow-file/allow-directory/allow-remote configs at the arborist resolution layer - #9348
Conversation
9e9d7dd to
3f6545dCompare3f6545d to
8605d10Comparea42d830 to
d4b454eCompare
nishantms
left a comment
There was a problem hiding this comment.
Read-through of the arborist allow-* enforcement. Approach (lift the gate above the symlink branch and the manifest cache) is right, and the soft-fail-via-#loadFailures handling for optional transitives is the correct behavior. A few non-blocking nits below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This usually means the cherry-pick had conflicts. Please create a manual backport: git fetch origin release/v11
git checkout -b backport/v11/9348 origin/release/v11
git cherry-pick -x f550eb415de0aff83a5fa297850104f5390a6e30~3..f550eb415de0aff83a5fa297850104f5390a6e30
# resolve any conflicts, then:
git push origin backport/v11/9348Error details |
Pacote already enforces these settings inside FetcherBase.get, but it only sees what its callers tell it — specifically the _isRoot flag, and it never gets called at all for directory specs, which arborist resolves by creating a Link node directly.
That left two gaps: pacote couldn't gate directory deps because it never saw them, and the _isRoot hint it received was wrong for any transitive that flowed through a synthesized virtualRoot or a hoisted location. Moving the check into arborist closes both: arborist is the only layer that has the real tree context (the actual edge being resolved, with its true from node) and the only layer that sees every spec type before any branching. Pacote's gate stays in place as defense-in-depth for direct pacote consumers, but the authoritative enforcement now lives where the truth lives.
fixes#9347