Rust systems/security project
ChronicleVM
Replayable sandboxing for safe plugins.
A Rust VM that runs plugins through typed capability negotiation, records provenance-rich traces, and replays executions deterministically for audit and debugging.
- Runtime
- Rust VM
- Model
- Typed capabilities
- Evidence
- Trace replay
- Hardening
- Property tests
Recruiter snapshot
What this project demonstrates.
Five-minute demo
Run, audit, replay, and inspect a plugin trace.
cargo run -p chronicle-cli -- trace examples/audit-plugin.chr \
--policy examples/audit-policy.toml \
--out /tmp/audit.ctrace
cargo run -p chronicle-cli -- audit /tmp/audit.ctrace
cargo run -p chronicle-cli -- replay /tmp/audit.ctrace
cargo run -p chronicle-cli -- debug /tmp/audit.ctrace \
--commands "source;next;regs;caps;jump 20;why;quit"
Typed host powers
Plugins declare versioned capabilities. Hosts grant, deny, or mock them before execution.
Deterministic evidence
Trace events capture source lines, register changes, capability calls, results, errors, and checksums.
Browser inspection
The static trace viewer loads .ctrace files locally and exposes timelines, diffs, source maps, and raw events.
Security posture
Designed around explicit boundaries.
Capability negotiation
Host access is mediated by versioned signatures and policy decisions. Missing or denied capabilities fail before plugin code runs.
Default sandbox limits
CLI runs are bounded by instruction count, call depth, register count, and array size unless --unbounded is explicit.
Malformed input hardening
The binary decoder rejects oversized lengths, bad tags, truncation, and random mutated inputs with structured errors.
Design decisions
Why these trade-offs.
Why not WASM?
WebAssembly gives you portable sandboxing. ChronicleVM gives you inspectable sandboxing.
- Per-instruction event recording with register snapshots — WASM does not expose this
- Typed capability negotiation before execution begins, not at import time
- Replay from a recorded trace without re-calling live host functions
- CLI debugger that steps backward through recorded events
- Embeds as a pure Rust library — no JS runtime or browser dependency
Why deterministic replay?
"The plugin ran fine in CI" is not evidence when CI used live clocks and real randomness.
- Production failures can be re-examined without reproducing original conditions
chronicle auditchecksums the trace and re-runs it, verifying the same result- Capability values come from the recorded trace — not new calls to live hosts
- The exact inputs, decisions, and outputs are preserved as auditable evidence
Execution lifecycle
From source to auditable evidence.
chronicle-core
Bytecode model · VM runtime · trace · replay · host SDK
chronicle-lang · chronicle-asm
High-level compiler · assembly parser
chronicle-cli
run · trace · audit · replay · debug · inspect