pub struct ScopeReport {Show 14 fields
pub declared_containment: ContainmentClass,
pub achieved_containment: ContainmentClass,
pub floor_met: bool,
pub shortfall_reason: Option<String>,
pub enforcement_tier: &'static str,
pub filesystem_scope: Option<String>,
pub workdir_exec: bool,
pub network_allow: Vec<String>,
pub unix_sockets: bool,
pub shell_allow: Vec<String>,
pub spawn_allow: Vec<String>,
pub env_allow: Vec<String>,
pub interpreter_runtime_grants: Vec<String>,
pub staged_runtime_grants: Vec<String>,
}Expand description
Read-only answer to “what would this capsule actually be allowed to do on this host?”.
Built from the already-parsed CapabilityPolicy plus one host tier probe. Nothing here
stages artifacts, touches a registry, creates a workdir or resolves DNS — it is a diagnostic,
so it reports even when Self::floor_met is false.
Fields§
§declared_containment: ContainmentClassStrongest class any source asked for (manifest / workspace config / --containment).
achieved_containment: ContainmentClassStrongest class this host can actually back, derived from the tier probe alone.
floor_met: boolachieved_containment >= declared_containment. false means mur run would refuse.
shortfall_reason: Option<String>The missing mechanism when floor_met is false; absent otherwise.
enforcement_tier: &'static strThe probed host tier, as a stable wire name.
filesystem_scope: Option<String>capabilities.filesystem.scope, verbatim.
workdir_exec: boolcapabilities.filesystem.workdir_exec. Always present (never skipped when false), so a
consumer can tell “declared false” from “this runtime predates the key” by the field’s
presence rather than by its value.
true is the only manifest declaration that lowers Self::achieved_containment, which is
why it is reported next to the grants rather than buried: reading achieved: advisory on a
Landlock-capable host makes sense only alongside it.
network_allow: Vec<String>capabilities.network.allow, verbatim — declared destinations, not resolved IPs.
unix_sockets: boolcapabilities.network.unix_sockets.
shell_allow: Vec<String>capabilities.shell.allow, verbatim.
spawn_allow: Vec<String>capabilities.spawn.allow, verbatim.
env_allow: Vec<String>capabilities.env.allow, verbatim.
interpreter_runtime_grants: Vec<String>Every host directory a capabilities.shell.interpreter_runtime grant opens, rendered as
<binary>: <dir>[ (list_dir)]. These are the paths outside the workdir that stay
reachable even at scoped.
staged_runtime_grants: Vec<String>Every capabilities.shell.staged_runtime grant, rendered as
<binary>: <source_path> (pin: <pin>). These are host runtime trees a sealed capsule
asks to have bind-mounted read-only into its composed root.
Reported whatever the floor and whatever this host can back — a capsule that declares a
staged runtime and cannot run here is exactly the case an operator is inspecting when they
reach for --explain-scope, so hiding the grant behind a met floor would blank out the
diagnostic in the one case it is for.
Implementations§
Trait Implementations§
Source§impl Clone for ScopeReport
impl Clone for ScopeReport
Source§fn clone(&self) -> ScopeReport
fn clone(&self) -> ScopeReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScopeReport
impl Debug for ScopeReport
impl Eq for ScopeReport
Source§impl PartialEq for ScopeReport
impl PartialEq for ScopeReport
Source§impl Serialize for ScopeReport
impl Serialize for ScopeReport
impl StructuralPartialEq for ScopeReport
Auto Trait Implementations§
impl Freeze for ScopeReport
impl RefUnwindSafe for ScopeReport
impl Send for ScopeReport
impl Sync for ScopeReport
impl Unpin for ScopeReport
impl UnsafeUnpin for ScopeReport
impl UnwindSafe for ScopeReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more