pub struct SecurityAnalyzer { /* private fields */ }
Expand description
Security analyzer for code analysis
Implementations§
Source§impl SecurityAnalyzer
impl SecurityAnalyzer
pub fn new() -> Self
Sourcepub fn calculate_cvss_score(
&self,
pattern: &VulnerabilityPattern,
context: Option<&str>,
) -> CvssScore
pub fn calculate_cvss_score( &self, pattern: &VulnerabilityPattern, context: Option<&str>, ) -> CvssScore
Calculate CVSS score for a vulnerability
Sourcepub fn analyze_content_with_location(
&self,
content: &str,
file_path: Option<&str>,
vulnerability_types: &[String],
severity_threshold: &str,
) -> Result<Vec<SecurityVulnerability>>
pub fn analyze_content_with_location( &self, content: &str, file_path: Option<&str>, vulnerability_types: &[String], severity_threshold: &str, ) -> Result<Vec<SecurityVulnerability>>
Analyze content for security vulnerabilities with enhanced reporting
Sourcepub fn analyze_content(
&self,
content: &str,
vulnerability_types: &[String],
severity_threshold: &str,
) -> Result<Vec<SecurityVulnerability>>
pub fn analyze_content( &self, content: &str, vulnerability_types: &[String], severity_threshold: &str, ) -> Result<Vec<SecurityVulnerability>>
Analyze content for security vulnerabilities (legacy method for compatibility)
Sourcepub fn get_security_recommendations(
&self,
vulnerabilities: &[SecurityVulnerability],
) -> Vec<String>
pub fn get_security_recommendations( &self, vulnerabilities: &[SecurityVulnerability], ) -> Vec<String>
Get security recommendations based on vulnerabilities with OWASP mapping
Sourcepub fn generate_security_report(
&self,
vulnerabilities: &[SecurityVulnerability],
) -> Value
pub fn generate_security_report( &self, vulnerabilities: &[SecurityVulnerability], ) -> Value
Generate comprehensive security report
Sourcepub fn detect_injection_vulnerabilities(
&self,
content: &str,
) -> Result<Vec<Value>>
pub fn detect_injection_vulnerabilities( &self, content: &str, ) -> Result<Vec<Value>>
Analyze for specific vulnerability patterns
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecurityAnalyzer
impl RefUnwindSafe for SecurityAnalyzer
impl Send for SecurityAnalyzer
impl Sync for SecurityAnalyzer
impl Unpin for SecurityAnalyzer
impl UnwindSafe for SecurityAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more