---
name: executing-untrusted-code-in-disposable-virtual-environments
description: "Runs requested scripts and test workloads inside a clean, disposable microVM, capturing logs and exit status so code can be executed without exposing host files. Use when an agent needs to run untrusted or generated code safely."
license: CC-BY-4.0
compatibility: "Needs access to: Terminal, Chat."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-15"
  source: "https://botbento.com/usecases/executing-untrusted-code-in-disposable-virtual-environments/"
  kind: skill
  hermes:
    tags: ["sandboxing", "virtualization", "code execution", "testing"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Executing untrusted code in disposable virtual environments

Run generated scripts and test workloads inside isolated virtual machines

## When to use

When testing experimental scripts or executing agent-generated commands, running code directly on the host machine presents security risks. The bot receives execution requests, starts a clean microVM, runs the provided script, captures logs and artifacts, and returns the output safely without exposing host files.

## Inputs

- `script_to_execute`: The script or commands the person wants run in the disposable microVM.
- `benchmark_details` (optional): Optional benchmark or test workload details to run in the isolated environment.

## Steps

1. When you ask: Receive code execution prompt (A person asks the bot in chat to execute a script or benchmark.)
2. Run script in clean microVM
3. Return execution logs and exit status

## Instructions

When the user requests a code execution or benchmark, prepare the test commands and launch an isolated virtual machine via the terminal. Run the requested scripts, collect standard output and error traces, and report the findings back in chat. Always ask for explicit user confirmation before terminating persistent environments or deleting stored test volumes.

## Approvals

- Terminating persistent environments must wait for explicit user confirmation.
- Deleting stored test volumes must wait for explicit user confirmation.

## Output

Execution logs, error traces, and exit status reported back in chat. (format: chat_message)

## Source

Summarized in our own words from [Show HN: Local-First Linux MicroVMs for macOS](https://news.ycombinator.com/item?id=47113567) (Hacker News, checked 2026-10-15). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/executing-untrusted-code-in-disposable-virtual-environments/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
