diff --git a/src/validation/mongodb.rs b/src/validation/mongodb.rs index bb3da23..8577f41 100644 --- a/src/validation/mongodb.rs +++ b/src/validation/mongodb.rs @@ -94,8 +94,8 @@ fn is_local_host(h: &str) -> bool { const FAST_CONNECT_MS: u64 = 700; // direct single-host URIs const FAST_SELECT_MS: u64 = 300; const SRV_PARSE_MS: u64 = 2_000; // limit DNS resolution time -const SRV_CONNECT_MS: u64 = 2500; -const SRV_SELECT_MS: u64 = 2500; +const SRV_CONNECT_MS: u64 = 2500; +const SRV_SELECT_MS: u64 = 2500; /// Validates a MongoDB URI in ≤ 2 s. Returns `(bool, String)` where the /// boolean indicates success and the string provides a status message. diff --git a/src/validation/postgres.rs b/src/validation/postgres.rs index c262b30..3ce42b0 100644 --- a/src/validation/postgres.rs +++ b/src/validation/postgres.rs @@ -51,6 +51,7 @@ pub async fn validate_postgres(postgres_url: &str) -> Result<(bool, Vec) fn has_any_local_host(cfg: &Config) -> bool { cfg.get_hosts().iter().any(|h| match h { + #[cfg(unix)] Host::Unix(_) => true, // local unix socket Host::Tcp(s) => is_local_tcp_host(s), }) diff --git a/tests/int_rules_no_validated_findings.rs b/tests/int_rules_no_validated_findings.rs index 4c4cf19..bd0f4f7 100644 --- a/tests/int_rules_no_validated_findings.rs +++ b/tests/int_rules_no_validated_findings.rs @@ -15,7 +15,7 @@ fn scan_rules_has_no_validated_findings() -> Result<()> { Some(i) => i, None => return Ok(()), // no array found }; - + let mut depth = 0usize; let mut end = None; for (i, ch) in stdout.char_indices().skip(start) {