Skip to main content

Facts

Struct Facts 

Source
pub struct Facts {
Show 17 fields pub analyzed_version: Option<String>, pub latest_published: Option<DateTime<Utc>>, pub releases_last_year: Option<u32>, pub total_versions: Option<u32>, pub deprecated: bool, pub deprecated_reason: Option<String>, pub archived: bool, pub licenses: Vec<String>, pub vulns: Vec<Vuln>, pub repo: Option<String>, pub stars: Option<u64>, pub open_issues: Option<u64>, pub scorecard_maintained: Option<f64>, pub scorecard_overall: Option<f64>, pub top_contributor_share: Option<f64>, pub maintainers: Vec<String>, pub has_install_script: bool,
}
Expand description

Everything deprot learned about one dependency. Populated by the collector from public data sources; all fields are optional so the engine degrades gracefully when a source is unavailable (e.g. no auth, offline, or the package has no linked repository).

Fields§

§analyzed_version: Option<String>

The concrete version these facts describe (the version deprot chose to analyze).

§latest_published: Option<DateTime<Utc>>

When the most recent release was published (drives the staleness signal).

§releases_last_year: Option<u32>

Number of releases published in the trailing 12 months (drives the cadence signal).

§total_versions: Option<u32>

Total number of published versions ever.

§deprecated: bool

The registry has marked this version (or package) deprecated.

§deprecated_reason: Option<String>

Reason string attached to the deprecation, if any.

§archived: bool

The source repository is archived (read-only / abandoned upstream).

§licenses: Vec<String>

SPDX-ish license identifiers reported for the analyzed version.

§vulns: Vec<Vuln>

Known vulnerabilities affecting the analyzed version.

§repo: Option<String>

Canonical source repository (e.g. github.com/lodash/lodash), if known.

§stars: Option<u64>

Repository star count, if known.

§open_issues: Option<u64>

Open issue count, if known.

§scorecard_maintained: Option<f64>

OpenSSF Scorecard “Maintained” check (0–10), if available.

§scorecard_overall: Option<f64>

OpenSSF Scorecard aggregate score (0–10), if available.

§top_contributor_share: Option<f64>

Fraction (0.0–1.0) of recent commits authored by the single most active contributor. High concentration = high bus-factor / capture risk. Optional (needs a GitHub token).

§maintainers: Vec<String>

Registry maintainer/owner identities (email or login). Populated only in --deep mode.

§has_install_script: bool

The package runs an install/pre/post-install script (npm) — a code-execution vector.

Implementations§

Source§

impl Facts

Source

pub fn is_unresolved(&self) -> bool

Whether the collector obtained no registry data for this package — an unknown or typosquatted name, a registry 404, or a failed/offline lookup. The collector always sets total_versions (and usually latest_published) the moment it reaches the registry, so both being absent means we never got a usable response.

Scoring uses this to avoid presenting an unassessed package as healthy: absence of data is not absence of risk.

Trait Implementations§

Source§

impl Clone for Facts

Source§

fn clone(&self) -> Facts

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 Facts

Source§

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

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

impl Default for Facts

Source§

fn default() -> Facts

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Facts

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 Serialize for Facts

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

Auto Trait Implementations§

§

impl Freeze for Facts

§

impl RefUnwindSafe for Facts

§

impl Send for Facts

§

impl Sync for Facts

§

impl Unpin for Facts

§

impl UnsafeUnpin for Facts

§

impl UnwindSafe for Facts

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, 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.