diff --git a/src/analyzer/config/json_config.rs b/src/analyzer/config/json_config.rs index ec269961..b00a8447 100644 --- a/src/analyzer/config/json_config.rs +++ b/src/analyzer/config/json_config.rs @@ -4,7 +4,6 @@ use rustc_hash::FxHashMap; use serde::Deserialize; #[derive(Deserialize, Debug)] -#[serde(deny_unknown_fields)] pub struct JsonConfig { #[serde(default)] pub ignore_files: Vec, @@ -24,7 +23,7 @@ pub struct JsonConfig { pub struct JsonSecurityConfig { pub ignore_files: Vec, pub ignore_sink_files: FxHashMap>, - pub max_depth: u8, + pub max_depth: Option, } pub(crate) fn read_from_file(path: &Path) -> Result> { diff --git a/src/analyzer/config/mod.rs b/src/analyzer/config/mod.rs index dfd209cc..f28eec97 100644 --- a/src/analyzer/config/mod.rs +++ b/src/analyzer/config/mod.rs @@ -167,7 +167,7 @@ impl Config { ) }) .collect(); - self.security_config.max_depth = json_config.security_analysis.max_depth; + self.security_config.max_depth = json_config.security_analysis.max_depth.unwrap_or(40); Ok(()) }