Skip to main content

ScopeReport

Struct ScopeReport 

Source
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: ContainmentClass

Strongest class any source asked for (manifest / workspace config / --containment).

§achieved_containment: ContainmentClass

Strongest class this host can actually back, derived from the tier probe alone.

§floor_met: bool

achieved_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 str

The probed host tier, as a stable wire name.

§filesystem_scope: Option<String>

capabilities.filesystem.scope, verbatim.

§workdir_exec: bool

capabilities.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: bool

capabilities.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§

Source§

impl ScopeReport

Source

pub fn render(&self) -> String

Human-readable rendering used by mur run --explain-scope without --json.

Trait Implementations§

Source§

impl Clone for ScopeReport

Source§

fn clone(&self) -> ScopeReport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScopeReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ScopeReport

Source§

impl PartialEq for ScopeReport

Source§

fn eq(&self, other: &ScopeReport) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ScopeReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ScopeReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more