Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: guard node_modules roots for dynamic multi-linked npm deps #3248

Merged

Conversation

gregmagolan
Copy link
Collaborator

With exports_directories_only all 3rd party deps are now linked npm deps.

This fixes an issue where npm deps that are dynamically linked (not in the deps of a binary target) from non-root package_path in yarn_install and npm_install do not have their package_path added to BAZEL_NODE_MODULES_ROOTS. BAZEL_NODE_MODULES_ROOTS is used to generated the list of patch roots for symlink escape protection. TL;DR is this fix ensures that all linked node_modules folders are guarded from symlink escapes.

@gregmagolan gregmagolan force-pushed the fix_dyn_BAZEL_NODE_MODULES_ROOTS branch from 1c4df60 to 7ab40b1 Compare January 15, 2022 04:58
@alexeagle alexeagle merged commit 5ad9753 into bazel-contrib:5.x Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants