I believe it might help to allow packages to set limits on which APIs can be accessed by the dependencies. This way, packages that do not need access to abusable resources such as FS access, networking and native bindings (those can access everything else) can be restricted from using them, reducing the impact in the event of packages whose job is mostly data processing (most body processors, utilities such as lodash) being compromised.
I believe the implementation does not need to be granular, and that with simply restricting access of a dependency (and all its childs).
While this is probably not the ideal way to implement sandboxing, I believe that some sandboxing method would be helpful.