Skip to content

Commit 3232be7

Browse files
committed
fix(tests): finishing
1 parent 5410913 commit 3232be7

10 files changed

Lines changed: 5646 additions & 11 deletions

src/confidence_refinement.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl ConfidenceRefinementPhase {
369369
}
370370

371371
/// Analyze code context for vulnerability support/contradiction.
372-
fn analyze_code_context(&self, code: &str) -> ContextAnalysis {
372+
pub fn analyze_code_context(&self, code: &str) -> ContextAnalysis {
373373
let code_lower = code.to_lowercase();
374374

375375
// Patterns that support the vulnerability
@@ -487,7 +487,7 @@ impl Default for ConfidenceRefinementPhase {
487487
}
488488

489489
/// Helper struct for code context analysis.
490-
struct ContextAnalysis {
490+
pub struct ContextAnalysis {
491491
supports: bool,
492492
contradicts: bool,
493493
explanation: String,

src/report/aggregation.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl ReportAggregationPhase {
122122
}
123123

124124
/// Deduplicate findings by file path, line number, and CWE ID.
125-
fn deduplicate_findings(
125+
pub fn deduplicate_findings(
126126
&self,
127127
findings: Vec<VulnerabilityFinding>,
128128
) -> Vec<VulnerabilityFinding> {
@@ -152,7 +152,7 @@ impl ReportAggregationPhase {
152152
}
153153

154154
/// Calculate aggregate statistics from findings.
155-
fn calculate_statistics(&self, findings: &[VulnerabilityFinding]) -> AggregateStatistics {
155+
pub fn calculate_statistics(&self, findings: &[VulnerabilityFinding]) -> AggregateStatistics {
156156
let mut stats = AggregateStatistics {
157157
total_findings: findings.len(),
158158
..Default::default()
@@ -211,7 +211,7 @@ impl ReportAggregationPhase {
211211
}
212212

213213
/// Generate executive summary based on statistics and findings.
214-
fn generate_executive_summary(
214+
pub fn generate_executive_summary(
215215
&self,
216216
stats: &AggregateStatistics,
217217
findings: &[VulnerabilityFinding],
@@ -305,7 +305,10 @@ impl ReportAggregationPhase {
305305
}
306306

307307
/// Prioritize findings based on severity, confidence, and other factors.
308-
fn prioritize_findings(&self, findings: &[VulnerabilityFinding]) -> Vec<PrioritizedFinding> {
308+
pub fn prioritize_findings(
309+
&self,
310+
findings: &[VulnerabilityFinding],
311+
) -> Vec<PrioritizedFinding> {
309312
let mut scored: Vec<(usize, f32, String)> = findings
310313
.iter()
311314
.enumerate()

0 commit comments

Comments
 (0)