@@ -153,7 +153,7 @@ fn format_security_table(
153153 output. push_str ( & format_security_findings_box ( security_report, path) ) ;
154154 output. push_str ( & format_gitignore_legend ( ) ) ;
155155 } else {
156- output. push_str ( & format_no_findings_box ( ) ) ;
156+ output. push_str ( & format_no_findings_box ( security_report . files_scanned ) ) ;
157157 }
158158
159159 // Recommendations
@@ -176,13 +176,7 @@ fn format_security_summary_box(
176176 TurboSecuritySeverity :: Info => "blue" ,
177177 } ) , true ) ;
178178 score_box. add_line ( "Total Findings:" , & security_report. total_findings . to_string ( ) . cyan ( ) , true ) ;
179-
180- // Analysis scope
181- let config_files = security_report. findings . iter ( )
182- . filter_map ( |f| f. file_path . as_ref ( ) )
183- . collect :: < std:: collections:: HashSet < _ > > ( )
184- . len ( ) ;
185- score_box. add_line ( "Files Analyzed:" , & config_files. max ( 1 ) . to_string ( ) . green ( ) , true ) ;
179+ score_box. add_line ( "Files Scanned:" , & security_report. files_scanned . to_string ( ) . green ( ) , true ) ;
186180 score_box. add_line ( "Scan Mode:" , & format ! ( "{:?}" , scan_mode) . green ( ) , true ) ;
187181
188182 format ! ( "\n {}\n " , score_box. draw( ) )
@@ -402,10 +396,16 @@ fn format_gitignore_legend() -> String {
402396 format ! ( "\n {}\n " , legend_box. draw( ) )
403397}
404398
405- fn format_no_findings_box ( ) -> String {
399+ fn format_no_findings_box ( files_scanned : usize ) -> String {
406400 let mut no_findings_box = BoxDrawer :: new ( "Security Status" ) ;
407- no_findings_box. add_value_only ( & "✅ No security issues detected" . green ( ) ) ;
408- no_findings_box. add_value_only ( "💡 Regular security scanning recommended" ) ;
401+ if files_scanned == 0 {
402+ no_findings_box. add_value_only ( & "⚠️ No files were scanned" . yellow ( ) ) ;
403+ no_findings_box. add_value_only ( "This may indicate that all files were filtered out or the scan failed." ) ;
404+ no_findings_box. add_value_only ( "💡 Try running with --mode thorough or --mode paranoid for a deeper scan" ) ;
405+ } else {
406+ no_findings_box. add_value_only ( & "✅ No security issues detected" . green ( ) ) ;
407+ no_findings_box. add_value_only ( "💡 Regular security scanning recommended" ) ;
408+ }
409409 format ! ( "\n {}\n " , no_findings_box. draw( ) )
410410}
411411
0 commit comments