← All projects
Project record1 mention
Originally shared on Hacker News

Rust sandbox-exec wrapper for npm commands

A small Rust tool that wraps and generates sandbox-exec rules for sandboxing npm commands. It builds on the author's hand-written sandbox-exec profiles that wrap `npm install` and `npm run <script>` on their machine, packaging the messy manual rules into a nicer-to-use tool whose generated sandbox wrappers can be shared with others, limiting what malicious npm packages can do.

Last shared
01 / The problem

What it addresses

Recent npm package supply chain compromises put machines at risk when running npm install and npm scripts, motivating sandboxing of those commands.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Rust sandbox-exec wrapper for npm commands

    A small Rust tool that wraps and generates sandbox-exec rules for sandboxing npm commands. It builds on the author's hand-written sandbox-exec profiles that wrap `npm install` and `npm run <script>` on their machine, packaging the messy manual rules into a nicer-to-use tool whose generated sandbox wrappers can be shared with others, limiting what malicious npm packages can do.

    Problem: Recent npm package supply chain compromises put machines at risk when running npm install and npm scripts, motivating sandboxing of those commands.

    Posted by @xinu2020 · Original source ↗

    Source text · @xinu2020 · · Source ↗

    I'm tired of all the recents npm packages supply chain compromises, so I've written a collection of `sandbox-exec` rules to wrap all the `npm install` and `npm run <script>` of my projects on my machine. It works but it's messy, so now I'm working on a small rust tool that acts as a wrapper and generator for that so that it's nicer to use and can be shared to other people.