Expand description
Containment classes: what an operator declares versus what a session actually achieves.
The two directions are deliberately kept apart:
- The declared floor (
murmur_artifact::ContainmentClass) is a requirement, combined from the manifest, the workspace config and--containmentby taking the strongest (seemurmur_artifact::effective_containment_floor). - The achieved class is the class of the tier the session’s commands run on. That tier,
and the class read off it, are one
ContainmentDecision, made once per session from oneHostProbereading and the declared floor. The host’s tier is a ceiling the declaration can only lower: a capsule declaring less thansealedon a sealed-capable host runs on [EnforcementTier::KernelFull] and achievesscoped, and no declaration raises a tier above what the host backs. [achieved_class_for_tier] takes nothing but a tier, so no declaration can talk a tier into reporting a class it does not back. Two capsule-side facts then cap the class atContainmentClass::Advisorywithout changing the tier:capabilities.filesystem.workdir_exec: trueand a runtime directory inside the workdir (see [achieved_containment_class]).
What the host could back for a capsule declaring sealed is reported separately, as
ContainmentDecision::host_containment, and decides nothing.
ContainmentClass::Sealed is reachable exactly when [EnforcementTier::KernelSealed] is
applied: a Linux host with a usable Landlock ABI and a namespace probe that really built the
composed root inside the capsule’s network namespace, and a capsule declaring sealed. See
crate::sealed for the mechanism and for the crate::sealed::SealedBlocker taxonomy that
turns “not sealed here” into a specific command an operator can run.
The shortfall reason for sealed is therefore mechanism-specific, not a fixed string: a
host missing the AppArmor profile and a container missing CAP_SYS_ADMIN both fail to reach
sealed, but they are fixed in completely different places, and a refusal that cannot tell
them apart is a refusal an operator cannot act on.
Structs§
- Containment
Decision - A session’s containment, decided once: the tier its commands run on and the class that tier achieves for this capsule.
- Declared
Needs Report - One element of
ScopeReport::declared_needs: what one artifact’s needs for one program resolved to. Every key is always serialized. - Doctor
DirReports - What
doctor_runtime_dirreports. - Exports
Files Report - The declared
exports.filesblock as it appears in aScopeReport— and therefore inmur run --explain-scope --jsonand intrace.jsonl’ssession_start.effective_grants. - Extra
Root Report - One extra root as
PreopenReport::extra_rootscarries it. Every key is always present. - Filesystem
Boundary Report - What the filesystem mechanism this session installs does not protect, in words an operator can act on.
- Granted
Need Report - A granted need: its label (
library libm.so.6,program_folder .) and each path, rendered<path>for a file and<path> (list_dir)for a directory. - Images
Report - The
Imagesblock of the scope report: the limits on images a tool returns or an A2A message carries. - Missing
Need Report - A missing need: its label and why it is not granted.
- Peer
Files Report - The declared
exports.peer_filesblock as it appears in aScopeReport. - Pinned
Program Report - One element of
ScopeReport::pinned_programs: which copy of a program a tool pins a download of the session runs.pathis absent formissing,urlandsha256are present only forpinned, andreasononly formissing. - Preopen
Report - One artifact’s resolved WASI preopen as it appears in a
ScopeReport— and therefore inmur run --explain-scope, inmur doctor, and intrace.jsonl’ssession_start.effective_grants. - Route
Inputs - What
route_tabledecides presence from, gathered byRouteInputs::new. - Route
Report - One row of
ScopeReport::routes: whether this capsule has the route, and what holds it. - Runtime
DirReport - What the session’s runtime directory, or its records directory, is to the capsule’s commands —
--explain-scope’sRuntime directoryandRecords directoryblocks,session_start.effective_grants.runtime_dirand.records_dirandmur doctor’s sections, all from [runtime_dir_report] and [records_dir_report]. - Scope
Report - Read-only answer to “what would this capsule actually be allowed to do on this host?”.
- State
Store Report - One artifact’s durable state grant as it appears in a
ScopeReport. - Temp
DirReport - The session’s temporary folder, and whether a literal
/tmpreaches it —--explain-scope’sTemporary folderblock,session_start.effective_grants.temp_dirandmur doctor’s section, all from [temp_dir_report]. Field names are the JSON keys. - Unconfined
Report - What an unconfined session’s subprocesses run as:
ScopeReport::unconfined.
Enums§
- Filesystem
Restriction - What the filesystem mechanism this session installs restricts, as a stable wire name.
- Preopen
Surface - The filesystem surface one artifact’s guest is preopened into, as a stable wire name.
- Route
- One route a capsule can run code on, as
RouteReport::routenames it. - Runtime
DirReach - How one artifact reaches the runtime directory, as
PreopenReport::runtime_dir_reachcarries it. - Shortfall
Cause - Why a containment floor is unmet, which decides what an operator is told to change: a host that cannot back the class, or one of the two capsule-side causes no host can fix.
Constants§
- HOST_
PROCESS_ MECHANISM - The
mechanismof aRouteReportwhose route the session’s class does not cover: the code runs as part of themurprocess, or as a child it starts outside the class. - UNCONFINED_
APPLIES_ TO - The subprocess routes an unconfined session runs as the operator, as
UnconfinedReport::applies_tonames them.
Functions§
- applied_
mechanism - The wire name of the tier a shell command of a capsule declaring
declaredruns under on the hostproberead:ContainmentDecision::enforcement_tier, which is whatShellEnforcement::resolveinstalls for every subprocess. Spelled asScopeReport::enforcement_tierspells a tier. - attach_
extra_ roots - Every report that reaches the runtime directory given
roots, the session’s extra roots (crate::guest_roots::extra_guest_roots).stage_session,mur run --explain-scopeandmur doctorall call it, so the three agree. - check_
containment_ floor - The refusal gate:
Ok(())when the session’sachievedclass (ContainmentDecision::achieved) meets or exceeds thedeclaredfloor,RuntimeError::ContainmentFloorUnmetotherwise. - containment_
shortfall_ reason - Why
achievedfalls short ofdeclared, naming the missing mechanism rather than the missing class.Nonewhen the floor is met. - detect_
containment_ decision - Probes this host once and decides for a capsule declaring
declared, with neither capsule-side cap, returning the probe’s sealed shortfall beside it. - detect_
sealed_ shortfall - Why this host cannot back
sealed, orNonewhen nothing keeps it below, from a reading taken here. - detect_
userns_ grant - Where this host’s unprivileged-user-namespace permission comes from, or
Noneoff Linux, where the question has no answer rather than a negative one. - doctor_
runtime_ dir mur doctor’sRuntime directory,Records directoryandTemporary foldersections for a capsule declaringdeclared, run fromworkdir: the same [runtime_dir_report], [records_dir_report] and [temp_dir_report] on the tierprobe’sContainmentDecisionapplies, its ruleset ABI and mount namespace, or whyHOMEcannot hold them.- explain_
scope - Builds a
ScopeReportforpolicyagainst this host, withdeclaredas the already- combined floor. Takes onecrate::sandbox::HostProbe, so the tier, the shortfall and the grant it reports all describe one host at one moment. - install_
from_ places ScopeReport::install_fromforpolicy: empty without an install grant.- read_
only_ advisory_ for - The allowlisted binaries a declared
capabilities.filesystem.read_onlyis only advisory against: those whose own file I/O the dispatch-time write-intent analyser cannot read, inshell_alloworder. - render_
images - The
Imagesblock ofmur run --explain-scope. Starts with a blank line and ends with a newline. - render_
install - The
install skill,install toolandinstall fromlines of the scope report: which skills and tools a pull may install,<none>for a list the capsule left empty, and the places it may install them from (install from: storesorinstall from: stores, sources), printed only for a capsule holding an install grant. - render_
parent_ workdir - The
Parent work folderblock ofmur run --explain-scope, for a delegated child whose work folder started as a copy of its parent’s. Starts with a blank line and ends with a newline. - render_
read_ only - The
read_onlyblock of the scope report: the declared paths, then one line saying whether the protection is enforced for every readable call or advisory against a named binary. - render_
records_ dir - The
Records directoryblock of--explain-scopeandmur doctor, onrender_runtime_dir’s terms. Ends with a newline. - render_
routes - The
Routesblock--explain-scopeandmur doctorprint: one line per route, saying whether the capsule has it and what holds it, with an uncovered present route’s note under it. Starts withRoutesand ends with a newline. - render_
runtime_ dir - The
Runtime directoryblock of--explain-scopeandmur doctor: its path, and whether the capsule’s commands can change it. Ends with a newline. - render_
temp_ dir - The
Temporary folderblock of--explain-scopeandmur doctor: its path, the value ofTMPDIR, and whether a literal/tmpreaches it. Ends with a newline. - route_
table - The route table: one
RouteReportperRoute::ALLentry, in that order, for a capsule withinputswhose session installs the tier namedenforcement_tier. - uncovered_
route_ warning - The
W-SEC-034message for a capsule declaringdeclaredwithroutes, orNonewhen it does not fire: below ascopedfloor, or when no present route lies outside the class. - warn_
on_ uncovered_ routes - Prints
W-SEC-034whenuncovered_route_warningfires: to stderr, and to the session’s bootstrap log whenbootstrap_lognames a records directory. The one emitter the launch andmur doctor(withNone) both call.