syncable_cli/analyzer/security/
mod.rs

1//! # Security Analysis Module
2//! 
3//! Modular security analysis with language-specific analyzers for better threat detection.
4//! 
5//! This module provides a layered approach to security analysis:
6//! - Core security patterns (generic)
7//! - Language-specific analyzers (JS/TS, Python, etc.)
8//! - Framework-specific detection
9//! - Context-aware severity assessment
10
11use thiserror::Error;
12
13pub mod config;
14pub mod core;
15pub mod patterns;
16pub mod turbo;
17
18pub use core::{SecurityAnalyzer, SecurityReport, SecurityFinding, SecuritySeverity, SecurityCategory};
19pub use turbo::{TurboSecurityAnalyzer, TurboConfig, ScanMode};
20pub use patterns::SecretPatternManager;
21pub use config::SecurityAnalysisConfig;
22
23
24
25#[derive(Debug, Error)]
26pub enum SecurityError {
27    #[error("Security analysis failed: {0}")]
28    AnalysisFailed(String),
29    
30    #[error("Pattern compilation error: {0}")]
31    PatternError(#[from] regex::Error),
32    
33    #[error("IO error: {0}")]
34    Io(#[from] std::io::Error),
35    
36    #[error("JavaScript security analysis error: {0}")]
37    JavaScriptError(String),
38}