r/node • • 7d ago

WebLoad: "https:" Imports With Caching And Access Control

I've created WebLoad, an npm package for Node JS and Bun that uses module hooks (in Node) and plug-in (in Bun) APIs.

Features:

  • file-based module caching; includes basic cache management utility

  • import maps with scopes support

  • CSP "script-src"-inspired access control

  • shell scripts simplify hook/plug-in installation and local file/web/expression (eval) entry points or test-mode runs

npm i -g @bkatzung/webload

0 Upvotes

6 comments sorted by

4

u/its_jsec 7d ago

Inventing a problem nobody has, slopping a solution to it that opens up an RCE vector, and overengineers work that Node’s async loaders already do.

This bubble needs to pop already.

1

u/CoderAU 7d ago

literally

1

u/avereigh_Denizet 6d ago

yeah the RCE angle alone makes remote imports in prod a complete non-starter for most teams

-2

u/busres 7d ago

Inventing a problem nobody has

It's a problem I have, and possibly other people trying to port web-API-based applications from Deno to Node or Bun.

slopping a solution that opens up an RCE vector

Please forgive my ignorance and/or lack of vision. What vector is it opening that isn't in e.g. npm or a browser-loaded ES module?

overengineers work that Node's async loaders already do

Do you mean the deprecated module.register() API, or is there something else I missed in my research?

Thank you for your time.

4

u/its_jsec 7d ago

The vector it’s opening is that you do zero validation of a redirect, you just blindly follow the redirect path. You’d be able to tell this if any of your tests actually exercised the fetch or the redirect logic.

The overengineering is all of the ceremony around Atomics.wait and Atomics.notify, despite the fact that there’s no abort controller or cancellation signal between your main process and your worker, so after the wait times out, the worker just keeps cooking.

Question: What legitimate workflow becomes substantially easier with WebLoad over just using npm?