use std::path::{Path, PathBuf};
use serde::{Deserialize, Serialize};
use super::finding::SastFinding;
use crate::security::vulnerability::Severity;
pub trait SastScanner: Send + Sync {
fn name(&self) -> &str;
fn supported_languages(&self) -> &[&str];
fn is_available(&self) -> bool;
fn scan(
&self,
path: &Path,
files: &[PathBuf],
options: &SastScanOptions,
) -> Result<Vec<SastFinding>, String>;
fn install_hint(&self) -> String;
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SastScanOptions {
pub severity_threshold: Option<Severity>,
pub config_path: Option<PathBuf>,
pub rules: Vec<String>,
pub exclude: Vec<String>,
pub verbose: bool,
}