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):
| state | what is missing | the fix |
|---|---|---|
ready | nothing | — |
assets-not-provisioned | a pinned asset, or its bytes no longer match | roteiro security prefetch |
binary-not-found | the analyzer’s own program, on PATH | an 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§
Trait Implementations§
impl Copy for Readiness
impl Eq for Readiness
impl StructuralPartialEq for Readiness
Auto Trait Implementations§
impl Freeze for Readiness
impl RefUnwindSafe for Readiness
impl Send for Readiness
impl Sync for Readiness
impl Unpin for Readiness
impl UnsafeUnpin for Readiness
impl UnwindSafe for Readiness
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.