pub struct AppConfig {
pub matching: MatchingConfig,
pub output: OutputConfig,
pub filtering: FilterConfig,
pub behavior: BehaviorConfig,
pub graph_diff: GraphAwareDiffConfig,
pub rules: MatchingRulesPathConfig,
pub ecosystem_rules: EcosystemRulesConfig,
pub tui: TuiConfig,
pub enrichment: Option<EnrichmentConfig>,
}Expand description
Unified application configuration that can be loaded from CLI args or config files.
This is the top-level configuration struct that aggregates all configuration options. It can be constructed from CLI arguments, config files, or both (with CLI overriding file settings).
Fields§
§matching: MatchingConfigMatching configuration (thresholds, presets)
output: OutputConfigOutput configuration (format, file, colors)
filtering: FilterConfigFiltering options
behavior: BehaviorConfigBehavior flags
graph_diff: GraphAwareDiffConfigGraph-aware diffing configuration
rules: MatchingRulesPathConfigCustom matching rules configuration
ecosystem_rules: EcosystemRulesConfigEcosystem-specific rules configuration
tui: TuiConfigTUI-specific configuration
enrichment: Option<EnrichmentConfig>Enrichment configuration (OSV, etc.)
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn from_preset(preset: ConfigPreset) -> Self
pub fn from_preset(preset: ConfigPreset) -> Self
Create an AppConfig from a named preset.
Sourcepub fn security_preset() -> Self
pub fn security_preset() -> Self
Security-focused preset.
- Strict matching to avoid false negatives
- Fail on new vulnerabilities
- Enable typosquat detection
Sourcepub fn ci_cd_preset() -> Self
pub fn ci_cd_preset() -> Self
CI/CD pipeline preset.
- JSON output for machine parsing
- Fail on any changes
- Quiet mode to reduce noise
Sourcepub fn permissive_preset() -> Self
pub fn permissive_preset() -> Self
Permissive preset for messy SBOMs.
- Low matching threshold
- Include unchanged for full picture
- No fail modes
Sourcepub fn strict_preset() -> Self
pub fn strict_preset() -> Self
Strict preset for well-maintained SBOMs.
- High matching threshold
- Graph-aware diffing
- Detailed explanations available
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for AppConfig
impl JsonSchema for AppConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more