We are actively working on a solution that will fully sandbox package installations for npm, yarn, poetry and others.
It's rolled up as part of our core CLI [1], but is totally open source [2]:
[1] https://github.com/phylum-dev/cli [2] https://github.com/phylum-dev/birdcage