#[non_exhaustive]pub struct ShadowConfig {Show 13 fields
pub enabled: bool,
pub aggressiveness: u8,
pub llm_review_enabled: bool,
pub sandbox_enabled: bool,
pub shadow_model: String,
pub temperature: f32,
pub max_tokens: i32,
pub auto_heal_threshold: Option<HealThreshold>,
pub sandbox_image: String,
pub sandbox_ttl_secs: u64,
pub sandbox_min_code_len: usize,
pub max_input_len: usize,
pub config_path: Option<PathBuf>,
}Expand description
Configuration for the Shadow red-teaming engine.
Can be loaded from a JSON file or constructed programmatically.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolMaster enable/disable.
aggressiveness: u81 = static only, 2 = static + LLM, 3 = static + LLM + sandbox.
llm_review_enabled: boolWhether to run the LLM adversarial reviewer.
sandbox_enabled: boolWhether to attempt sandbox execution (requires Docker/Podman).
shadow_model: StringOllama model for the Shadow reviewer.
temperature: f32Temperature for the Shadow LLM (low = deterministic threat analysis).
max_tokens: i32Max tokens for Shadow LLM response.
auto_heal_threshold: Option<HealThreshold>Severity threshold for auto-healing. None = healing disabled.
sandbox_image: StringDocker image for sandbox execution.
sandbox_ttl_secs: u64TTL in seconds before sandbox container is force-killed.
sandbox_min_code_len: usizeMinimum code block size (chars) to trigger sandbox analysis.
max_input_len: usizeMaximum characters of output to send to LLM reviewer.
config_path: Option<PathBuf>Path to config file. If None, uses default location.
Implementations§
Source§impl ShadowConfig
impl ShadowConfig
Trait Implementations§
Source§impl Clone for ShadowConfig
impl Clone for ShadowConfig
Source§fn clone(&self) -> ShadowConfig
fn clone(&self) -> ShadowConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more