Skip to main content

Readiness

Enum Readiness 

Source
pub enum Readiness {
    Ready,
    AssetsNotProvisioned,
    BinaryNotFound,
}
Expand description

Whether one analyzer can actually be run on this host, as one word.

Three states rather than a bool, because the two things a host run needs have different remedies and only one of them is Roteiro’s to perform (issue #464):

statewhat is missingthe fix
readynothing
assets-not-provisioneda pinned asset, or its bytes no longer matchroteiro security prefetch
binary-not-foundthe analyzer’s own program, on PATHan install; Roteiro never does this

§Precedence, and why both facts are still reported

A host can be missing both. This names the asset side first, because that is the step Roteiro can take and the one a caller should take first — but a one-word verdict that names one blocker would send a caller round twice, so AnalyzerCoverage carries assets_provisioned and missing_programs alongside it. Both are always present; this is a summary of them, never a substitute.

§What “on this host” excludes, and it is not a caveat on the word

The sandboxed backend runs the analyzer inside a digest-pinned OCI image (ADR-0014/ADR-0019), which supplies the program — so binary-not-found does not block a sandboxed run, and it is the only state where the two backends disagree. This says nothing about sandbox readiness: it does not inspect the local image store, and reporting a sandbox verdict it has not checked would be issue #464 committed a second time. security run still refuses, naming what is missing, when the sandbox cannot run.

Variants§

§

Ready

Every pinned asset is provisioned and verified, and every program this analyzer needs is on PATH.

§

AssetsNotProvisioned

A pinned asset is absent, or its bytes no longer match the recorded digest. Fixed by roteiro security prefetch.

§

BinaryNotFound

The assets are fine and the analyzer’s own program is not on PATH. Fixed by installing it — which Roteiro will not do. This is the same fact SubprocessError::BinaryNotFound reports, found before a run rather than during one.

Implementations§

Source§

impl Readiness

Source

pub fn as_str(self) -> &'static str

The token this serialises as, for a caller that renders it as text.

Trait Implementations§

Source§

impl Clone for Readiness

Source§

fn clone(&self) -> Readiness

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 Copy for Readiness

Source§

impl Debug for Readiness

Source§

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

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

impl Eq for Readiness

Source§

impl PartialEq for Readiness

Source§

fn eq(&self, other: &Readiness) -> 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 Readiness

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 Readiness

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

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, 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> 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.