Using container as a throwaway sandbox for auditing untrusted dependencies #1827
sterngold
started this conversation in
Show and tell
Replies: 1 comment
|
@sterngold Thanks, and we're glad that |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We run a small security layer across a personal dev workspace, and one long-standing rule is: never run build/test/install for an untrusted or unclassified repo on the host. Until now that meant we just didn't run them, so a whole class of behavioural checks was off the table.
containerchanged that. The VM-per-container model is what made it click: each container is a full lightweight VM, so the host filesystem, SSH keys, and credentials simply don't exist inside it unless we mount them. A real isolation boundary, not namespace separation.We wrote a small harness around it: mount the suspect repo read-only, install with lifecycle scripts disabled, run the test suite, all inside a disposable
--rmVM. Validated end to end this week on Apple silicon (macOS 27): cloned a real third-party npm library, audited it, ran its 32 tests, and the host came back with nonode_modulesand nothing touched.Two things we appreciated:
--mount source=…,readonlyplus the disposable VM made the "no writes reach the host" property trivial to prove.One honest note for anyone using it this way: the VM walls off the host, and it does not by itself contain outbound network during a run that needs the registry (
npm ci). We run static audits with no network attached for that reason. Not a complaint, just the boundary worth knowing.Thanks for shipping this. It closed a real gap for us.
All reactions