Skip to main content

ReasonCode

Enum ReasonCode 

Source
pub enum ReasonCode {
Show 20 variants VerdictClean, VerdictRecommendedVersionNewer, VerdictAbandoned, VerdictLowTrust, VerdictCveFound, VerdictNotYetAssessed, VerdictDegradedStale, VerdictHasRemediation, VerdictKevListed, VerdictRansomwareListed, VerdictExploitationCritical, VerdictMalicious, VerdictObfuscated, VerdictDenyList, VerdictRangeNotResolved, ClientNetworkUnreachable, ClientAuthFailed, ClientBearerMissing, ClientRateLimited, RemediationNotFound,
}
Expand description

Canonical 15-value ReasonCode registry — Rust mirror of sdk-js v0.4.1 dist/reason-codes.js. Drift = CI failure.

Variants§

§

VerdictClean

§

VerdictRecommendedVersionNewer

§

VerdictAbandoned

§

VerdictLowTrust

§

VerdictCveFound

CLEANLIB-511 (B2) / 503: unified reason for a VECTOR_VERDICT CVE finding at LOW/MEDIUM/HIGH severity — retires the incoherent per-severity codes (VERDICT_CLEAN on LOW = “no findings”, VERDICT_ABANDONED on MEDIUM = “unmaintained”, VERDICT_LOW_TRUST on HIGH) which asserted facts unrelated to “has a CVE”. Severity is carried in rich_data.severity. VERDICT_ABANDONED stays reserved for the genuine abandonment_score signal (derive_status), VERDICT_EXPLOITATION_CRITICAL for CRITICAL.

§

VerdictNotYetAssessed

CLEANLIB S1 (cycle-22, closes PM 731999 §1): canonical reason for a not-yet-assessed package. INSUFFICIENT_DATA fails closed to WARN + VERDICT_NOT_YET_ASSESSED — replaces the cycle-21 D1 VERDICT_CLEAN placeholder (status-correct but reason-incoherent, Discipline #60).

§

VerdictDegradedStale

Server-side substrate freshness — substance-derived tier preserved, reason overridden to surface staleness. Distinct from client-side LIVE_DEGRADED cache-fallback (extension status bar; Cli7 offline mode).

§

VerdictHasRemediation

§

VerdictKevListed

§

VerdictRansomwareListed

CLEANLIB-176: package named in ransomware campaigns (CVE_FINDING_ON_RANSOMWARE source projection). Semantically distinct from KEV — a CVE can be ransomware-linked without being CISA-KEV-listed and vice-versa; conflating them defeats the 176 differentiation goal. Cross-SDK + Threat ratification PENDING (see CLEANLIB-176 comment 658233).

§

VerdictExploitationCritical

§

VerdictMalicious

CLEANLIB-176: confirmed/likely-malicious package (MALICIOUS_TRIAGE source projection — typosquat / backdoor / protestware). Distinct from VERDICT_EXPLOITATION_CRITICAL (a CVE being actively exploited): malicious means remove + audit + rotate, not upgrade. Cross-SDK + Threat ratification PENDING (see CLEANLIB-176 comment 658233).

§

VerdictObfuscated

§

VerdictDenyList

§

VerdictRangeNotResolved

CLEANLIB-518 (§3): the App could not resolve the requested semver range to a concrete version (source_state = RANGE_NOT_RESOLVED, CLEANLIB-513). Distinct from VERDICT_NOT_YET_ASSESSED — the package is not un-assessed, the range is unresolved, so the customer must pin a concrete version. Fixes the CLI banner↔body contradiction where a range-not-resolved verdict rendered the “❔ Not yet assessed” banner while the reasoning body said the opposite. Fails CLOSED to WARN (an unresolved range is not an ALLOW).

§

ClientNetworkUnreachable

§

ClientAuthFailed

§

ClientBearerMissing

§

ClientRateLimited

§

RemediationNotFound

Implementations§

Source§

impl ReasonCode

Source

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

Canonical wire-format string — what App emits + what every other SDK asserts on.

Trait Implementations§

Source§

impl Clone for ReasonCode

Source§

fn clone(&self) -> ReasonCode

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 ReasonCode

Source§

impl Debug for ReasonCode

Source§

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

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

impl<'de> Deserialize<'de> for ReasonCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ReasonCode

Source§

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

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

impl Eq for ReasonCode

Source§

impl Hash for ReasonCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ReasonCode

Source§

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

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 ReasonCode

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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