Skip to content

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 19:29
· 118 commits to main since this release

Controls guaranteed in this release (v0.5.1)

Sandboxed live discovery (Legislator)

generate-policy --live-discovery now executes the target server inside the OS sandbox by default instead of bare on the host:

  • The probe runs with a private TMPDIR cwd, no ambient environment inheritance, and no network; fs grants are scoped to the verified image, the interpreter's install prefix (resolved and argv0 spellings, including venv pyvenv.cfg home bases), node_modules ancestor roots, PATH-resolved helper prefixes, /etc/ssl/**, and a /dev/null write — matching the documented runtime profiles
  • The probe's syscall surface follows the documented interpreter baselines (uname, eventfd2, timerfd_*, socketpair, …), so Node's uv_loop_init and CPython startup work under seccomp
  • --unsafe-unsandboxed-discovery is the documented opt-out (implies --live-discovery, ambient environment); --self-test never uses it
  • Carve walks run on the blocking pool under a shared deadline; a timed-out or failed walk refuses the spawn with an Inconclusive verdict — discovery never proceeds unguarded
  • Argument-derived carve roots skip option tokens and expand around reserved secret names (.env, .ssh, .gnupg, .aws) into per-entry grants with the excluded paths recorded as denied

Pinned workloads / verifier

  • entrypoint-hash pinned scripts now launch by their real path instead of a snapshot spelling — Node ESM servers with relative imports and node_modules ancestor walks run under the pin on all three OSes, closing the v0.5.0 limitation. The executable keeps its snapshot exec (memfd/staged/share-mode handle); server.connected distinguishes exe_exec=fd|staged from entrypoint_exec=path
  • On the namespaced route init re-reads the pinned object through the held descriptor, re-hashes it against the manifest digest, and bind-mounts the verified bytes over the payload path — the verify→exec window is closed in-namespace, not just narrowed
  • fs grants rooted under a masked tree (/run, and /tmp when the resolv.conf bridge needs it) or on filesystems Landlock cannot mediate (WSL drvfs/9p) refuse before spawn with the cause named — dead policy never reaches launch
  • Windows holds the share-mode pin for the entire session, blocking a payload swap outright

Policy

  • policy version=3: allow sides compose additively (union) across extends/include/when/profile/server-defaults layers; a block opts back into v2 replacement with replace=#true. defaults.syscalls gains deny entries that deny-wins prune everywhere (aliases share the syscall number — a denied fork closes clone); a tool may name multiple profiles; bare allow none=#true requires replace=#true. The spawn execve gate requires a literal execve grant. v1/v2 documents keep their semantics, guarded at parse, schema, and validation
  • policy resolve --version-diff reports each effective field the rule change moves; check replays the load under v3 and reports an informational migration member (unchanged/fields_differ/simulation_failed) — status, reason_code, and the exit code never move
  • // REVIEW markers carry kinds (header, schema-unsupported, blocked-capability, unbound-tool, hash-pin-host, regenerate-on-update, unbound-workload, runtime-seed) with per-kind remediation in check output and in generated drafts
  • generate-policy seeds runtime fs/environment defaults for interpreted workloads — interpreter prefix, venv/pyvenv.cfg home validated against a real base install, package trees — plus the interpreter seccomp baseline, marked runtime-seed REVIEW
  • defaults.environment names absent from the parent environment (or holding a dangling absolute path) surface as names-only diagnostics on launch.env, server.connected (env_missing=/env_path_missing=), and stderr — never values, never a refusal

Auditor

  • The session call tally (per-tool calls and denials) is bounded by entry-count and byte budgets with truncated flags; the denial tally counts target-policy denials only. The launch report forwards the tally and correction candidates
  • The tools/list verified-set recheck and the child write hold one epoch so the gate cannot flip mid-write; the epoch-held write is bounded (5s) and poisons the stdin writer on timeout — a stalled write can no longer deadlock the session
  • A 16 MiB shared budget bounds retained tools/list page bytes in both the discovery accumulator and the Auditor relay — page/frame caps alone no longer admit unbounded tool definitions
  • tools_list.filtered now records outcome=success (a filtered list is a successful shaped response); blocked verification records are committed instead of dropped
  • Init-order denials name the offending direction to the peer
  • tools/call refusals for unadvertised names stay membership-blind on the wire but audit as authorization denials
  • js_bind: TypeScript return-type annotations in arrow heads parse, keyword matching is whole-identifier, dynamic child_process re-aliases resolve as unresolved, ...rest imports bind as namespaces — a semicolon-free arrow can no longer steal the next declaration's body; Python tool registrations report output-cap truncation

Audit

  • Schema "2.0": every record carries a session_id unique within the same millisecond; policy.loaded orders session_id before the percent-encoded source so byte-budget truncation cannot clip the identifier; secret_overlay=false is recorded when the overlay is off; allow_replaceable_paths:true is recorded when the opt-out env is set
  • SIGUSR1 reopens a live file sink — logrotate coexistence on Unix
  • The audit sink pins its parent directory and re-verifies the leaf name still names the opened file before committing durable acknowledgments — entry-swap attacks surface as audit failures

Linux / namespaced

  • CLONE_NEWPID is probed at selection and pidns is reported as measured evidence; /proc remount readiness is probed so auto no longer selects a route that fails at init
  • DNS-gate bind races are retried; SCM_RIGHTS cmsg is validated before the fd read; deny-wins is enforced across seccomp layers and an execve deny is refused under allow_degraded

Security hardening (fail-closed)

  • Trusted policy sources: the root document and every file it reaches (extends/include ancestors, @file schemas) must sit on owned, write-restricted, replacement-resistant paths on every launch route — replaceable sources refuse. MCP_WRIT_ALLOW_REPLACEABLE_PATHS is the documented opt-out, is recorded on the launch report, and marks the gate unverified in plan
  • Descendant teardown: a supervised launch refuses without a kernel-enforced teardown path; setsid/pgid escapees are attributed by a per-launch lineage tag and killed via a pre-kill descendant snapshot plus the subreaper orphan sweep — sibling sessions' children are never signaled; releasing a child handle sweeps its descendants
  • Guard environment variables (MCP_WRIT_*) are stripped from workload environments; share roots are bounded by a registry; malformed CNAME/DNAME targets fail closed
  • Driver/helper resolution is pinned to administrator-owned objects with fail-closed re-verification; handle-pinned reads stay within a canonical root; group-writable components are refused; inode ctime is pinned; exec duplicates use F_DUPFD_CLOEXEC
  • Mach-O executable sections are bounded and coalesced; the discovery tmpdir is created exclusively at 0700
  • DNS: authority/additional section names are judged against explicit deny rules only — delegation NS/glue outside the allowlist mints no grants but no longer refuses the response; revalidation races and unjudged sections fail closed
  • Release authorization: the workflow's release-gate job requires the tag commit reachable from the default branch and a pusher holding admin/maintain

CLI

  • <subcommand> --help now shows that subcommand's options instead of the sibling list; stray sibling tokens route to the correct parser

Compatibility / migration

  • Audit schema 2.0: session_id added to every record; policy.loaded token order changed; source percent-encoded — update external log parsers
  • --live-discovery is sandboxed by default; pass --unsafe-unsandboxed-discovery to restore ambient execution
  • Policies reachable through replaceable paths now refuse — CI/shared workspaces need MCP_WRIT_ALLOW_REPLACEABLE_PATHS=1, which is always reported
  • entrypoint-hash launches by real path: on the native POSIX and Windows routes the verify→exec window narrows to the pre-spawn path re-check (Windows additionally holds the share-mode pin); only the namespaced bind-mount closes it entirely
  • v3 composition is opt-in; v1/v2 semantics are unchanged and check's migration preview is informational

Validation

release-preflight.sh still gates the tag on six workflows at the exact commit. New coverage: pinned Node entrypoint e2e with an ESM relative import (initialize + tools/list under the pin on all three OSes), env-gap diagnostics, v3 migration preview, cgroup-v2 delegation plus capability probes on hosted runners, and trusted-source DACL fixtures.

Remaining limitations

  • entrypoint-hash: on POSIX-native and Windows the verify→exec window narrows to the pre-spawn path re-check; only the namespaced bind-mount removes it
  • v3 migration is preview-only — no generate-policy output switch yet; drafts still emit v2-style documents
  • The discovery sandbox covers the interpreted runtimes exercised in CI (Node, Python, Go fixture); loaders outside the documented runtime surface may still need --unsafe-unsandboxed-discovery
  • ebpf-run/macos-proxy-run remain opt-in PoCs; namespaced-run stays poc in the capability matrix
  • namespaced: names sharing an IP are indistinguishable; DoH via an allowed destination and DoT remain structural limits; link-local v6 is refused; external v6 needs host reachability
  • Windows unchanged: no destination pinning under AppContainer, psec conditional, os.fs = unknown by default
  • Landlock ABI < 6 → AF_UNIX/signal not_applied; path unix= needs ABI ≥ 9
  • Kernel-internal denials remain unobservable (file_denied/process_denied stay reserved event types)
  • defaults.environment gaps are diagnosed, not auto-corrected
  • SECURITY.md is not yet published; the six release workflows run on manual dispatch
  • TOCTOU between RPC checks and internal server behavior remains a design boundary; SIGKILL can lose the audit tail — use --audit-sync