Skip to content

policy: feature preloadAlways , preloadAllowed

Rodrigo Muino Tomonari requested to merge github/fork/bmeck/policy-preload into master

This adds the ability for enforcement of what must be and is allowed to be preloaded. This can be used to harden or instrument globals as needed. It can be used for example to ensure censorship of process.binding as can be seen in the test. Currently ESM does not have a way of preloading modules and blocking user code from completing until preloading is finished; this PR likely should not land until an answer of how to determine if something should be preloaded via the ESM loader vs the CJS loader is answered and test is written for them.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading