For the complete documentation index, see llms.txt. This page is also available as Markdown.

BlueRock Sandbox

The BlueRock Sandbox uses containerd to operate as a policy-driven container runtime. It shares foundational features with standard Docker environments, including process isolation, namespaces, and volume mounting. The architecture prioritizes execution control and integrated telemetry rather than general application deployment. The runtime enforces security policies that explicitly permit or deny specific binaries to ensure that compromised AI agents execute only authorized tools. Running containerized workloads requires using the brace command to import OCI-compliant images from the local Docker daemon into the isolated runtime registry.

Package

The BlueRock Sandbox utility comes pre-installed on the BlueRock Linux distribution, cloud images for AWS and GCP. The BlueRock Sandbox binary is present at /opt/bluerock/bin/brace with a symlink at /usr/bin/brace.

CLI Command Reference

The brace command is the primary interface for launching applications in isolated environments.

Usage: brace [OPTIONS] [-- <TARGET>...]

Primary Options

Option

Description

--socket <SOCKET>

Path to the sensor socket. (Default: /run/bluerock/sensor.sock)

--name <NAME>

Assigns a unique name to the BlueRock Sandbox instance. (Default: sandbox)

-l, --logfile <LOGFILE>

Path to the log file. (Default: ./brace.log)

-K, --clear-env

Clears all host environment variables for a "clean slate."

-e, --env <ENV>

Passes environment variables into the BlueRock Sandbox.

--pid <PID>

PID namespace mode: 'host' to share host PID namespace, or 'isolated' for a separate namespace (overrides config).

--mount-proc <MOUNT_PROC>

Mounts /proc inside the sandbox (overrides config).

Possible values: true, false

-v, --volume <VOLUME>

Bind-mounts host directories: HOST_PATH:CONTAINER_PATH. Append :ro for read-only access (overrides config mounts).

--user-ns <USER_NS>

Runs the sandbox with an enabled user namespace.

Possible values: true, false

--tmpfs <TMPFS>

Mounts a temporary file system (tmpfs) at the specified PATH inside the sandbox.

--skip-mnts

Skips all policy-configured mounts; only CLI --volume mounts will be used.

--disable-network

Disables the network namespace setup.

--nested

Runs nested inside another brace container (disables the seccomp listener).

-h, --help

Prints help information.

-V, --version

Prints version information.

Architectural Workflow

BlueRock Sandbox Use Cases

The BlueRock Sandbox provides a highly secure, isolated execution environment for workloads. The primary use cases and execution methods are detailed below.

Running Shell Commands

To securely explore, test, or execute commands within an isolated environment, run a direct shell command.

notes-sticky

Note:

BlueRock Sandbox provides an isolated execution environment; the system is distinct from standard container runtimes.

To test the environment using the host's binaries, mount the standard system directories and run a simple command:

Expected output:

Running a Python Application

To execute applications directly using the host file system, map system directories (/usr, /lib) and the user directory (e.g., /home/ubuntu) to provide the necessary tools and permissions. This execution runs under the current user identity and does not require sudo.

Running Python MCP Server and MCP Client Programs

To execute Python applications directly using the host file system, you must map the required system directories (/usr, /lib, /lib64), BlueRock sensor directories (/opt/bluerock, /run/bluerock), and the user workspace (e.g., /home/ubuntu) to provide the necessary tools and telemetry permissions to the sandbox. This execution runs under the current user identity and does not require sudo.

Setup

1. Install uv :

2. Create Project Directory Create a new project directory for the MCP applications and navigate into it:

3. Install Required Dependencies Create an isolated Python environment using uv, then install the MCP framework, BlueRock sensor, and BlueRock runtime required for generating and exporting telemetry:

4. Add MCP Application Files Create the MCP client and server scripts in the project directory using the sample code provided in the Appendix section. Ensure the following files are present in the mcp-observability directory:

Using Mount Points in Command Line Arguments

Pass the required volume mounts (-v) directly in the execution command. The /home/ubuntu:/home/ubuntu mapping provides access to your newly created project folder, while the system and bluerock mounts ensure the Python binary and security sensors function correctly.

notes-sticky

Note:

Adjust this path based on the active host user. For example, on AL2023, the default path is /home/ec2-user. For a test user, the path could be /home/test.

Terminal 1: Starting the MCP Server

Launch the sandbox with the required bind mounts:

Expected Output:

FastMCP Server starts on http://0.0.0.0:8001

Terminal 2:

Starting the MCP Client: Open a separate terminal and launch a second sandbox using identical Operating System (OS) mounts to execute the client script.

Expected output:

BlueRock Sandbox Container

Using Mount Points in Command Line Arguments

Mount local host directories into the container application to share data, configurations, or output logs.

Expected output:

Passing Environment Variables at Runtime

Container applications often require runtime configuration such as API keys, environment toggles, or port definitions. Pass these variables securely at execution using the environment (-e) flag.

Run BlueRock Sandbox Container using Docker Image

Execute OCI-compliant Docker images within the BlueRock Sandbox environment. The brace and docker command facilitates the process and manages the subsequent container lifecycle.

When launching containers, specifying --runtime io.containerd.bluerock.v2 forces the workload through a secure abstraction layer.

Containerd Shim Mode

The brace-shim natively implements the containerd shim v2 (io.containerd.bluerock.v2) to wrap runc and attach acoustic monitoring at the boundary of every container.

For example:

Terminal changes to:

Native OCI Annotations

When orchestrating container deployments via standard engine runtimes, you can pass custom Open Container Initiative (OCI) annotations directly through the command line, or deployment manifests to modify runtime behavior.

Annotation
Default Value
Purpose / Behavior

io.bluerock.socket

/run/bluerock/sensor.sock

Overrides the target acoustic sensor Unix domain socket path for this specific container.

io.bluerock.principal

(None)

Specifies the principal identifier. This is written to /etc/bluerock.env inside the container rootfs so nested runtime sensors (e.g., bluepython) automatically inherit it.

io.bluerock.policy-hint

(None)

Provides a policy selection hint passed directly to bluerockd to determine which access policy applies to the workload.

Example Invocation with OCI Annotations:

Last updated