Skip to main content

rotaryoss_scanner/
rules.rs

1use std::path::PathBuf;
2
3use serde::{Deserialize, Serialize};
4
5/// Configuration for the health check rules.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ScanConfig {
8    /// Maximum age in days before a secret is flagged as stale.
9    pub max_age_days: u64,
10
11    /// Days before max_age to start warning.
12    pub warning_threshold_days: u64,
13
14    /// Project root to scan for secret key references.
15    /// When set, enables the "unreferenced secret" check.
16    #[serde(default)]
17    pub project_root: Option<PathBuf>,
18}
19
20impl Default for ScanConfig {
21    fn default() -> Self {
22        Self {
23            max_age_days: 90,
24            warning_threshold_days: 75,
25            project_root: None,
26        }
27    }
28}