Sandbox Logging
Every OpenShell sandbox produces a log that records network connections, process lifecycle events, filesystem policy decisions, and configuration changes. The log uses two formats depending on the type of event.
Log Formats
Standard tracing
Internal operational events use Rust’s tracing framework with a conventional format:
These events cover startup plumbing, gRPC communication, and internal state transitions that are useful for debugging but don’t represent security-relevant decisions.
OCSF structured events
Network, process, filesystem, and configuration events use the Open Cybersecurity Schema Framework (OCSF) format. OCSF is an open standard for normalizing security telemetry across tools and platforms. OpenShell maps sandbox events to OCSF v1.7.0 event classes.
In the log file, OCSF events appear in a shorthand format with an OCSF level label, designed for quick human and agent scanning:
The OCSF label at column 25 distinguishes structured events from standard INFO tracing at the same position. Both formats appear in the same file.
When viewed through the CLI or TUI, which receive logs via gRPC, the same distinction applies:
OCSF Event Classes
OpenShell maps sandbox events to these OCSF classes:
Reading the Shorthand Format
The shorthand format follows this pattern:
Components
Class and activity (NET:OPEN, HTTP:GET, PROC:LAUNCH) identify the OCSF event class and what happened. The class name always starts at the same column position for vertical scanning.
Severity indicates the OCSF severity of the event:
Action (ALLOWED, DENIED, BLOCKED) is the security control disposition. Not all events have an action; informational config events, for example, do not.
Details vary by event class:
- Network:
process(pid) -> host:portwith the process identity and destination - HTTP:
METHOD urlwith the HTTP method and target - SSH: peer address and authentication type
- Process:
name(pid)with exit code or command line - Config: description of what changed
- Finding: quoted title with confidence level
Context in brackets at the end provides the policy rule and enforcement engine that produced the decision.
Examples
An allowed HTTPS connection:
An L7 read-only policy denying a POST:
A connection denied because no policy matched:
Proxy and SSH servers ready:
An SSH handshake accepted, one event per connection:
A process launched inside the sandbox:
A policy reload after a settings change:
Log File Location
Inside the sandbox, logs are written to /var/log/:
Both files rotate daily and retain the 3 most recent files to bound disk usage.
Next Steps
- Access logs through the CLI, TUI, or sandbox filesystem.
- Enable OCSF JSON export for SIEM integration and compliance.
- Learn about network policies that generate these events.