throwaway-machine
यह क्या करती है
यह दिखाती है कि स्क्रिप्ट या टेस्ट सूट को एक अस्थायी smolvm मशीन में कैसे चलाएँ, जो आपके repo को नहीं बदल सकती और जब तक आप अनुमति न दें, इंटरनेट तक नहीं पहुँच सकती। यह उन लोगों के लिए है जो ऐसा कोड चलाते हैं जिस पर पूरा भरोसा नहीं।
कब इस्तेमाल करें
- ✓जब एजेंट ने कोई स्क्रिप्ट बनाई हो जिसे आप सुरक्षित रूप से चलाना चाहते हों।
- ✓जब आप अपने कंप्यूटर पर उसका कोड भरोसा किए बिना pull request टेस्ट करना चाहते हों।
- ✓जब कोई रन बिना मशीन छोड़े रद्द करना हो।
Skill का लिंक
https://github.com/smol-machines/smolvm/blob/main/docs/throwaway-machine/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस अज्ञात टेस्ट सूट को बिना इंटरनेट वाली अस्थायी मशीन में चलाइए और मुझे आउटपुट दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
repo अपरिवर्तित रहता है, और नतीजे एक अलग आउटपुट फ़ोल्डर में लिखे जाते हैं। आप एक खास होस्ट की अनुमति न दें तो नेटवर्क पहुँच बंद रहती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Running untrusted work in a throwaway machine
Verified on smolvm v1.23.0 on macOS arm64, 2026-10-04, by the offline route, the network-on route and the cancel; on Linux aarch64 by the offline route and the cancel on v1.20.2, 2026-09-29, and the network-on route on v1.18.2, 2026-09-24. Done means the command's output landed in your writable directory, the repo is unchanged, the workload could not reach the network, and nothing is left running. The Linux runs used the scripts of their date; this version's preflight, run and cleanup scripts ran on Linux aarch64 on v1.22.2 on 2026-10-03.
On macOS from v1.24.0 the offline route does not run
(#1819). Every --oci-cache run, the bake's own
included, fails with agent did not become ready within 30 seconds: measured on v1.24.0, v1.24.1,
v1.25.0, v1.25.1, v1.27.3, v1.28.1 and v1.29.0, while v1.23.3 and v1.23.7 boot the same command on
the same host. The preflight says offline_shape=unavailable there and bake.sh says
result=FAILED. For a run with no network, use the persistent machine with no network in
README.md, which boots the image with no bake; the network-on route works.
Ctrl-C on run.sh ends the run from v1.20.2: the script forwards an interrupt or a SIGTERM
to the CLI, which ends its VM. Before v1.20.2 the cancel is scripts/cleanup.sh --cancel, as
"Cancelling" below measures.
Two issues shaped this packet, both fixed in v1.20.2 on macOS and Linux; older releases still have them:
#1193, a cached run's VM outlives an interrupted CLI, invisible
to machine list; and #1192, a cached run with any mount never
boots on macOS, for which references/macos.md gives the older releases a route.
Workflow
If you have no script to isolate, make one. A file that reads a path under /workspace, tries
to create a file there, and tries to fetch a URL proves all three properties in one run, and the
three lines it prints are the evidence. An agent with an empty directory and no fixture stopped and
asked the user instead of building one.
- [ ] 1. preflight.sh, and read result= and device_budget_ok=
- [ ] 2. bake.sh (offline route only; network on, nothing untrusted mounted)
- [ ] 3. run.sh (the untrusted command; records the VM pid)
- [ ] 4. verify.sh (from inside the guest and from the host)
- [ ] 5. cleanup.sh (or cleanup.sh --cancel to stop a run early)
1. Preflight. Read-only: starts no VM, bakes nothing.
scripts/preflight.sh --mounts 2 --ports 0
device_budget_ok=no means the boot will fail with no more IRQs are available. On x86_64
through v1.22.2 the guest has eleven IRQs: four -v mounts boot and five do not, and publishing
any port, or granting egress, adds one device. arm64 guests have 128, and the preflight prints
device_budget_ok=not_limiting there. v1.23.0 ships a libkrun whose x86_64 guests have IRQs 5 to 23
(#1521); its ceiling was not measured, and the preflight applies the budget through v1.22.2 only.
Combine directories under one mount rather than discovering this at boot.
offline_shape=unavailable means this host cannot run the shape below: macOS before v1.20.2
(#1192), or Windows. The preflight cannot see whether the 8192 MiB bake helper fits; bake.sh
finds that out in step 2 and says so.
2. Bake the image. This is the only step in which a machine has a network.
scripts/bake.sh python:3.12-alpine
Network on, nothing untrusted mounted, done before the untrusted code is anywhere near the machine.
Afterwards the runs' machines need no network at all, which is materially stronger isolation than
granting egress and hoping. The host CLI still asks the registry for the image's manifest on every
--oci-cache run, to authorize the pull and to notice a tag that moved, so the host needs to reach
the registry; the workload does not.
3. Run the untrusted command.
scripts/run.sh --repo ./repo --out ./out -- sh -c 'python3 /workspace/calc.py > /out/result.txt'
The repo is mounted read-only at /workspace, or at the path --repo-path names, the output
directory writable at /out, and the run has no network. It prints used_host_cache=yes, which
is the assertion that the bake worked and that this run's machine pulled nothing: without it the
guest pulled, which
अक्सर पूछे जाने वाले सवाल
क्या कोड इंटरनेट तक पहुँच सकता है?
डिफ़ॉल्ट रूप से नहीं। नेटवर्क पहुँच केवल उन होस्ट के लिए मिलती है जिन्हें आप एक-एक करके स्पष्ट रूप से दें।
क्या यह हर Mac पर काम करता है?
स्किल बताती है कि macOS पर संस्करण 1.24.0 से ऑफ़लाइन रास्ता विफल होता है, और वहाँ वह दूसरी सेटअप सुझाती है।
रन कैसे रोकूँ?
स्किल रन रद्द करना कवर करती है: नए संस्करणों पर Ctrl-C, और पुराने पर cleanup स्क्रिप्ट।
जानकारी
लेखक का मूल विवरण
Runs untrusted code in a throwaway smolvm microVM against a repo it must not modify, with no network unless explicitly granted, and collects artifacts from a writable output directory. Use when executing an agent's generated script, a pull request's test suite, or any code that should not be trusted with the host; when a workload needs egress granted one host at a time; or when a run has to be cancelled, because Ctrl-C on the wrapper script leaves the VM running, and on releases before v1.20.2 so does Ctrl-C on the CLI. Do not use it for a development environment that is re-entered across sess
repo: smol-machines/smolvm
लोकप्रियता
- GitHub स्टार
- 6.9k
- रैंकिंग में स्थान
- #13724
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
branch-and-checkpoint
6.9kयह आपके एजेंट को चल रही smolvm वर्चुअल मशीन को चेकपॉइंट के रूप में सहेजने, बाद में वापस लाने, रोकने और फिर चालू करने, और उसे कॉपी में बाँटने में मदद करती है।
coding-agent
6.9kयह आपके एजेंट को smolvm की सुरक्षित वर्चुअल मशीन के अंदर Claude Code जैसे कोडिंग एजेंट चलाने में मदद करती है, जिसमें आपका प्रोजेक्ट फ़ोल्डर माउंट होता है।
credentials
6.9kयह आपके एजेंट को आपकी key से API कॉल करने देती है, जबकि key कभी उसकी वर्चुअल मशीन के अंदर नहीं जाती, ताकि भरोसे के बाहर का कोड उसे न पढ़ सके।
dev-env
6.9kयह आपके एजेंट को smolvm की डेव मशीन में इंस्टॉल किए टूल बनाए रखना सिखाती है, ताकि वह जल्दी रीस्टार्ट हो और सत्रों के बीच पैकेज बने रहें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।