File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1726,14 +1726,16 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
17261726 exit ( 1 ) ;
17271727 }
17281728
1729- // Initialize audit coordinator
1730- let audit_coordinator = AuditCoordinator :: new ( ) ;
1731-
1732- // Generate audit report
1729+ // Generate audit report - handle test mode first
17331730 let report = if test_mode {
17341731 println ! ( "🧪 Generating test audit report..." ) ;
1732+ // Create audit coordinator only for test report generation - no diagnostics
1733+ let audit_coordinator = AuditCoordinator :: new ( ) ;
17351734 audit_coordinator. create_test_audit_report ( )
17361735 } else {
1736+ // Initialize audit coordinator and run full audit
1737+ let audit_coordinator = AuditCoordinator :: new ( ) ;
1738+
17371739 // Run security audit
17381740 match audit_coordinator. run_security_audit ( ) . await {
17391741 Ok ( report) => report,
@@ -1768,6 +1770,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
17681770 let typst_path = Path :: new ( output_dir) . join ( format ! ( "osvm_audit_report_{}.typ" , timestamp) ) ;
17691771 let pdf_path = Path :: new ( output_dir) . join ( format ! ( "osvm_audit_report_{}.pdf" , timestamp) ) ;
17701772
1773+ // Create audit coordinator for document generation
1774+ let audit_coordinator = AuditCoordinator :: new ( ) ;
1775+
17711776 match format. as_str ( ) {
17721777 "typst" | "both" => {
17731778 if let Err ( e) = audit_coordinator. generate_typst_document ( & report, & typst_path) {
Original file line number Diff line number Diff line change @@ -495,9 +495,10 @@ impl AuditCoordinator {
495495 references : vec ! [ "https://cwe.mitre.org/data/definitions/200.html" . to_string( ) ] ,
496496 } ) ;
497497
498+ // Use hardcoded system info to avoid triggering diagnostics
498499 let system_info = SystemInfo {
499- rust_version : "rustc 1.87.0" . to_string ( ) ,
500- solana_version : Some ( "solana-cli 2.2.7" . to_string ( ) ) ,
500+ rust_version : "rustc 1.87.0 (example) " . to_string ( ) ,
501+ solana_version : Some ( "solana-cli 2.2.7 (example) " . to_string ( ) ) ,
501502 os_info : "Linux x86_64" . to_string ( ) ,
502503 architecture : "x86_64" . to_string ( ) ,
503504 dependencies : {
You can’t perform that action at this time.
0 commit comments