Security

Five-layer local execution sandbox.

Castor isolates path traversal, shell execution, AST writes, and network egress across every worker turn, with verifiable air-gapped builds for regulated deployments.

137 sandbox vectors123 blocked14 allowedLoopback only
01 — Threat model

What we assume can go wrong.

A coding agent is a confused deputy with a shell. The threat model starts there, not at the model's good intentions.

Path

Escape the workspace

A prompt asks the worker to read ~/.ssh or write outside the repo. Five layers refuse it.

Shell

Destructive command

A generated command targets the wrong root. The lexical scanner blocks it before execution.

Write

Break the repo

A hallucinated edit lands on disk. The AST gate parses the buffer in memory and rolls back on error.

Network

Exfiltrate code

A tool call reaches an external host. The sovereign build removes outbound web tools; the default build does not.

Input

Binary or PDF bytes

A file is not text. The magic-number sniffer refuses to dump binary bytes into a string buffer.

Supply chain

A dependency moves

Pinned engine versions, a signed bundle, and a reproducible build are pilot deliverables.

02 — Controls

The layers, in order.

The path pipeline runs before any file operation. The shell scanner runs before any child process. The AST gate runs before any write hits disk.

LayerControlWhat it refusesPlatform
L1Canonical root anchorResolves the workspace to one canonical root.All
L2Symlink realpathA symlink that points outside the root.All
L3Out-of-tree refusalAny read, write, or list outside the root.All
L4Traversal normalisationNull bytes, ~, device names, ...All
L5Binary snifferDumping binary bytes into text buffers.All
ShellLexical scanner + dead-man fuseDestructive targets, protected roots, fork bombs, elevation.All
KernelLandlock rulesetShell children leaving the workspace root.Linux 5.13+
AST27-grammar tree-sitter gateMalformed code before it touches disk.All
The 137-vector table lives in the open-source test suite: 123 blocked, 14 allowed. We do not treat a blocked test as a marketing number; it is a regression gate.
03 — Egress

What leaves the machine today.

This is the sentence most vendors blur. We will not. The default build includes outbound web tools. The sovereign pilot removes them at compile time and attests the boundary.

Default build

Local loop, with web tools

  • No telemetry beacon, no auto-updater, no crash reporter
  • Engine, status, and proxy ports bound to 127.0.0.1
  • web_search and web_fetch are part of the lean tool core
  • The cloud architect sees the plan and the short result

If a diff cannot leave the building, the default hybrid deployment is not the right shape. The sovereign pilot is.

Sovereign pilot

Compile-time egress boundary

  • Build profile with outbound web tools excluded
  • Local orchestrator: opencode, goose, aider, or your host
  • Loopback-only listeners, verified with ss / netstat
  • Hash-chained audit ledger with a verification command
  • Egress attestation and a signed runbook
04 — Ledger

The audit trail is evidence, not decoration.

Every tool call, path verdict, edit, and execution is recorded as a JSONL event. Today the ledger is append-only. The pilot adds a hash chain and a verification command so an assessor can prove nothing was removed.

  • Per-turn token and timing metrics
  • Per-tool verdict: allowed, refused, or failed
  • Per-task terminal status, including cancellations
  • Hash chain and castor audit verify in the pilot
Ledger eventJSONL · append-only
{
  "task": "auth-refactor",
  "turn": 12,
  "tool": "edit_file",
  "path": "src/auth/session.ts",
  "verdict": "allowed",
  "ast": "pass",
  "prompt_tokens": 14820,
  "cache_read": 13902,
  "completion_tokens": 412,
  "ts": "2026-11-30T22:14:08Z"
}
Sample shape, not a real customer eventPilot adds prev_hash + hash
05 — Honesty

What we do not claim.

A security page that only lists strengths is a liability. These are the gaps, stated plainly.

  • No SOC 2, ISO 27001, CMMC, or cATO certificate.
  • No SSO in the open-source engine; it is pilot scope.
  • No hash-chained ledger in the current release; it is pilot scope.
  • No shrink-wrapped air-gapped installer; it is built in the pilot.
  • No claim that the default build is zero-egress: web tools are compiled in.
  • No claim that Landlock covers Windows or macOS; the lexical gates do.
  • No claim that a blocked vector proves safety; it proves a regression test passed.
  • No claim that local model quality equals the frontier; the proof page shows the gap.
Responsible disclosure: email m.abdullah.ali.2523@gmail.com with the details and a reproduction. We aim to acknowledge within two business days.
Next

Bring your auditor. We'll bring the boundary.

The sovereign pilot is built around the evidence your assessor needs to run.