pub struct AnalysisOptions {
pub offline: bool,
pub policy: Option<Policy>,
pub source_path: Option<PathBuf>,
pub advisory_db_path: Option<PathBuf>,
pub yanked: BTreeSet<String>,
pub metadata: BTreeMap<String, CrateMetadata>,
pub trusted_owners: BTreeMap<String, Vec<String>>,
pub generated_at: Option<String>,
}Expand description
Options controlling a single analysis run.
Fields§
§offline: boolDisable any network access. Cached advisory data is still used if present.
policy: Option<Policy>Optional parsed policy. When None, the built-in balanced profile applies.
source_path: Option<PathBuf>A directory of unpacked crate sources used for static signal collection
(fixtures or a vendored/registry src tree). Read-only.
advisory_db_path: Option<PathBuf>Explicit RustSec advisory database directory. When unset and not offline, the default cache directory is consulted (missing is non-fatal).
yanked: BTreeSet<String>Set of name@version identifiers known to be yanked from the registry.
The core never talks to the network; the caller (CLI) gathers this set (e.g. from the crates.io sparse index) and injects it here. This keeps the analysis library trivially auditable as network- and process-free.
metadata: BTreeMap<String, CrateMetadata>Per-crate registry metadata keyed by name@version, gathered by the CLI
(crates.io API) and injected. Empty when --online-metadata is off. Feeds
the freshness/trust signals and corroborates the typosquat heuristic.
trusted_owners: BTreeMap<String, Vec<String>>Previously-trusted crates.io owner logins per crate name, loaded from a
committed rustinel-trust.toml baseline. When a crate’s current owners
(from CrateMetadata::owners) differ from this baseline, rustinel flags
the change — the maintainer-takeover vector behind the xz and event-stream
attacks, which a database-only scanner cannot see. Empty when no baseline.
generated_at: Option<String>Timestamp to embed in the report. None produces deterministic output.
Implementations§
Source§impl AnalysisOptions
impl AnalysisOptions
pub fn source_root(&self) -> Option<PathBuf>
Trait Implementations§
Source§impl Clone for AnalysisOptions
impl Clone for AnalysisOptions
Source§fn clone(&self) -> AnalysisOptions
fn clone(&self) -> AnalysisOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more