Fix 29 audit findings across all severity tiers
This commit is contained in:
@@ -61,7 +61,17 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
|
||||
if let Ok(results) = result {
|
||||
let total_cves: usize = results.iter().map(|r| r.total_cves()).sum();
|
||||
for r in &results {
|
||||
log::info!(
|
||||
"Security scan: appimage_id={} found {} CVEs",
|
||||
r.appimage_id, r.total_cves(),
|
||||
);
|
||||
}
|
||||
log::info!("Security scan complete: {} CVEs found across {} AppImages", total_cves, results.len());
|
||||
widgets::announce(
|
||||
&stack_refresh,
|
||||
&format!("Security scan complete: {} vulnerabilities found", total_cves),
|
||||
);
|
||||
|
||||
// Refresh the page content with updated data
|
||||
let new_content = build_report_content(&db_refresh);
|
||||
@@ -119,9 +129,14 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
filters.append(&json_filter);
|
||||
filters.append(&csv_filter);
|
||||
|
||||
let default_format = report::ReportFormat::Html;
|
||||
let initial_name = format!(
|
||||
"driftwood-security-report.{}",
|
||||
default_format.extension(),
|
||||
);
|
||||
let dialog = gtk::FileDialog::builder()
|
||||
.title("Export Security Report")
|
||||
.initial_name("driftwood-security-report.html")
|
||||
.initial_name(&initial_name)
|
||||
.filters(&filters)
|
||||
.default_filter(&html_filter)
|
||||
.modal(true)
|
||||
@@ -142,11 +157,8 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
.unwrap_or("html")
|
||||
.to_lowercase();
|
||||
|
||||
let format = match ext.as_str() {
|
||||
"json" => report::ReportFormat::Json,
|
||||
"csv" => report::ReportFormat::Csv,
|
||||
_ => report::ReportFormat::Html,
|
||||
};
|
||||
let format = report::ReportFormat::from_str(&ext)
|
||||
.unwrap_or(report::ReportFormat::Html);
|
||||
|
||||
btn_clone.set_sensitive(false);
|
||||
btn_clone.set_label("Exporting...");
|
||||
|
||||
Reference in New Issue
Block a user