Expand description
Containment classes: what an operator declares versus what a host 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 starts from [
EnforcementTier], which is host-probed at launch time. [achieved_class_for_tier] takes nothing else — not the manifest, not the grant set — so no declaration can ever talk a host into reporting a class it cannot back. Exactly one manifest property may then talk a capsule down from that ceiling, and only downwards:capabilities.filesystem.workdir_exec: truecaps the result atContainmentClass::Advisory(see [achieved_containment_class]), because a capsule whose own workdir is executable has given up the claimscopedmakes. The cap is applied in a separate wrapper rather than inside [achieved_class_for_tier] precisely so the “no declaration raises a class” property stays a property of one small, pure function.
ContainmentClass::Sealed is reachable exactly when [EnforcementTier::KernelSealed] is:
a Linux host with a usable Landlock ABI, AppArmor out of the way of unprivileged user
namespaces, and a namespace probe that really created one. See crate::sealed for the
mechanism and for the 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§
- 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. - Filesystem
Boundary Report - What the filesystem mechanism this session installs does not protect, in words an operator can act on.
- Peer
Files Report - The declared
exports.peer_filesblock as it appears in aScopeReport. - 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. - 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.
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.
Functions§
- check_
containment_ floor - The refusal gate:
Ok(())when the host’sachievedclass 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_
achieved_ containment - Probes this host and reports the strongest class it can actually provide.
- detect_
sealed_ blocker - Which single mechanism keeps this host below
sealed, orNonewhen nothing does, 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. - explain_
scope - Builds a
ScopeReportforpolicyagainst this host, withdeclaredas the already- combined floor. Takes onecrate::sandbox::HostProbe, so the tier, the blocker and the grant it reports all describe one host at one moment. - 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_
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.