Skip to content

Proposal: extension sidecars with host grants and Sandboy-backed process boundary #53

Open

Description

@PhysShell

Context

While looking at aula-id/koma's extension protocol, one useful idea stands out: extensions are not loaded into the host process. They are supervised sidecar processes with a manifest, a duplex protocol, and explicit grants.

Koma's Unix implementation currently looks roughly like this:

host creates local socket
host launches extension process
extension receives socket path + token through env
extension sends Hello { protocol, token, manifest }
host replies Welcome
then both sides exchange Invoke / Call / Result / Event frames

The important shape is not the Unix socket itself. The useful shape is:

manifest-declared contributions
+ grant-declared requirements
+ host-enforced permission checks
+ external supervised process
+ machine-readable protocol

For 007, this maps naturally to the existing run/gate/judge direction, but with a stronger process boundary than Koma's first-party trust model.

Thesis

007 should eventually support extension sidecars, but not as a product-store/plugin-marketplace feature.

The useful form for 007 is:

extension sidecar
  + host grants
  + TaskContract / DiffPolicy
  + Sandboy-backed process confinement
  + run-record evidence

Protocol grants answer:

What may this extension ask 007 to do?

Sandboy answers:

What may this extension process do to the host?

Both are needed. Grants without a process boundary are only polite paperwork if the extension process can still read host secrets, env vars, sockets, SSH agents, NuGet tokens, or arbitrary filesystem paths.

Proposed extension classes

Initial extension kinds should be boring and harness-focused:

gate-provider
judge-provider
sandbox-provider
reporter
workflow-provider
policy-provider

Example directions:

sandboy extension:
  contributes.sandbox_backends = ["landlock-seccomp"]
  requires = []

ownaudit extension:
  contributes.judges = ["fp-triage", "lifetime-leak"]
  requires = ["runs:read", "models:invoke"]

ownnet extension:
  contributes.gates = ["roslyn-analyzer-tests", "wpf-smoke"]
  requires = ["runs:read"]

Non-goal for now:

TUI extensions
store/account/payment UX
open marketplace
web panels
OAuth provider ecosystem

Those are product features. 007 needs execution evidence first, not a plugin mall with better fonts.

Transport model

Keep the protocol transport-agnostic.

Linux/macOS:

KOMA-style Unix socket

Windows:

Named Pipe, e.g. \\.\pipe\o7-ext-<id>-<nonce>

Avoid loopback TCP unless there is a good reason. Named Pipes give local IPC, ACLs, and avoid turning extension IPC into yet another localhost/firewall incident report.

The envelope can stay conceptually identical across transports:

ExtMsg:
  Hello
  Call
  Result
  Health
  Notify

HostMsg:
  Welcome
  Reject
  Invoke
  Result
  Ping
  Shutdown
  Event

The host owns grants, dispatch, pending calls, timeout, lifecycle, and run-record persistence.

Sandboy integration

Every extension process should be launched through a Sandboy backend when a policy is attached.

o7 host
  reads extension manifest
  resolves grants
  resolves process policy
  launches extension through sandboy backend
  records sandbox report
  accepts protocol handshake only after launch boundary is established

Expected run-record artifacts:

runs/<target>/<run-id>/extensions/<extension-id>/
  manifest.normalized.json
  grants.json
  sandbox.json
  stdout.log
  stderr.log

For gate steps, reuse the same policy/report model already planned for GateStep.sandbox_policy:

[[gate]]
name = "windows-roslyn-tests"
cmd = "pwsh -File ./build/test-roslyn.ps1"
env = "windows"
timeout_sec = 600
sandbox_policy = "windows-worktree-no-secrets"

Windows backend shape

Current Sandboy is Linux-first: Landlock + seccomp. That should remain the Linux backend.

For Windows, do not try to "port Landlock". Use a separate backend behind the same policy/report contract:

sandboy-linux:
  Landlock + seccomp

sandboy-windows:
  Job Object
  Restricted Token
  Low Integrity / AppContainer-ish profile where feasible
  DACL-scoped worktree/temp dirs
  environment allowlist
  timeout / process-tree kill
  best-effort or explicit network status

The Windows backend must report what it actually enforced:

{
  "backend": "windows-job-restricted-token",
  "filesystem": "partial",
  "network": "not_enforced",
  "process_tree": "enforced",
  "env": "enforced",
  "timeout": "enforced"
}

Avoid boolean secure: true. That field is how software lies to itself before a breach report.

Acceptance criteria for a first slice

A realistic first slice does not need the whole extension system.

  1. Define protocol/manifest sketch in docs.
  2. Add explicit note that extensions are out-of-process sidecars, not in-process plugins.
  3. Define grants vs process sandbox as separate layers.
  4. Define Windows transport target as Named Pipes, not Unix socket.
  5. Define run-record artifacts for extension lifecycle.
  6. Keep implementation blocked behind existing Phase 1 work:
    • TaskContract
    • DiffPolicy
    • GateStep.timeout_sec
    • GateStep.sandbox_policy
    • sandboy run --report <json>

Proposed order

Phase 1:
  GateStep.sandbox_policy + timeout_sec
  sandboy run --report
  Linux gate wrapping

Phase 2:
  Windows sandboy backend design note
  Named Pipe transport note
  extension manifest/grants sketch

Phase 3:
  one sidecar extension prototype, likely reporter or judge-provider

Phase 4:
  sandboxed extension launch with run-record evidence

Why this belongs in 007

Koma's extension protocol is interesting because it treats extension integration as a supervised protocol boundary.

007 can do better for its niche by adding the missing execution boundary:

Koma-style sidecar protocol
+ 007-style task/run/gate/judge records
+ Sandboy process confinement
+ machine-readable evidence

That would keep 007 small while allowing Own.NET, OwnAudit, Sandboy, and future project-specific tooling to plug in without turning the core binary into a drawer full of special cases.

Activity

  1. PhysShell commented on Nov 20, 2026

    @PhysShell
    OwnerAuthor

    Golem donor: host-enforced capability attenuation for tool sidecars (20.11.2026)

    Research page · Golem permissions documentation.

    GOLEM-02 / CAPABILITY-ATTENUATION / KILL-FIRST as a potential test donor for this existing sidecar/host-grant boundary. Golem permission cards specify resource/recipient/operation/target, narrow derivation, revocation and upper-bound denials; host checks every tool/file/network/secret operation. Critical caveat: if no explicit initialCard, broad default permissions are assigned; presence of capability system does NOT imply least privilege default. Untrusted repo instructions must never upgrade sidecar authority.

    Negative tests: delegated card attempts to broaden parent, revoked/expired grants, unauthorized network host, workspace traversal/delete, secret handle vs reveal, unexpected tool invocation, prior revision/card during replay; check host denial and security receipt independently of model prompt. Observe approval handling for irreversible operations. A Go/OS sandbox with owner-scoped checks may suffice; do not copy card-wallet infrastructure unless it demonstrably closes a confirmed existing gap.

    GO only with independently reproduced bypass or materially simpler enforcement; NO-GO if existing Sandboy process boundary and explicit host grants cover same threat model. No new runtime dependency; Golem source server BUSL-1.1.

  2. PhysShell commented on Nov 20, 2026

    @PhysShell
    OwnerAuthor

    Raven donor: sandboxed Windows prefix, per-app layers and explicit file grants (20.11.2026)

    Research page · upstream · source tree · licenses.

    RAVEN-02 / PREFIX-ISOLATION / KILL-FIRST as a test donor for existing Sandboy sidecars/host grants, not a proposal to embed a Win32 runtime. Raven README documents per-prefix Windows C:/registry, snapshot before installer, per-application private layer for changes to foreign locations, explicit host file grants via file picker, denied sandbox.log and optional Linux Landlock. Source tree includes sandbox/confine/snapshot implementations and tests; no independent isolation certification.

    Run an isolated synthetic malicious guest + external Linux oracle: (1) app-owned vs foreign file writes and shared registry keys, (2) snapshot/restore and concurrent app state, (3) symlink/path traversal, TOCTOU rename after permission grant, (4) inherited file descriptors and child process, (5) host helper/file picker scope, (6) denied network access. Record before/after hash of host and prefix, actual observable side effects vs policy and log, exact SHA, kernel version and Landlock capability. Compare with existing namespace/overlayfs/Landlock and Sandboy baseline.

    GO: independently reproduce an actionable isolation failure or a simpler enforceable host-grant model. NO-GO: existing sandbox already covers threat model or Raven's app-layer complexity introduces unverified paths. No product runtime adoption or new CI; Linux host runtime GPL-3.0-or-later, guest adapters have separate licenses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions