Skip to content

Include scan duration/completion time in scan metadata and reports #25

@techmore

Description

@techmore

Implement comprehensive scan duration tracking and enhanced summary banner with key metrics.

Combined Requirements (Issues #25 + #27 + UI Cleanup):

Duration Tracking:

  • Record scan start and end times in metadata.json
  • Calculate and store scan duration (seconds + formatted)
  • Include duration in HTML/PDF reports
  • Display duration in scan history and UI

Enhanced Summary Banner:

  • Create prominent post-scan banner with comprehensive metrics
  • Display: hosts discovered, subnet size, average ping times, CVE/exploit counts, scan duration
  • Use visual indicators for critical information
  • Position banner after scan completion with auto-hide option

UI Cleanup - Recovered Scan Card:

  • Remove 'Run New Scan' button/option from the historical data recovery banner
  • The recovered scan card should only display historical data without scan initiation options
  • Maintain clear distinction between historical view and active scanning

Implementation Details:

  • Modify save_scan_metadata() in app.py to accept start/end times and calculate duration
  • Add duration fields to metadata JSON structure
  • Create new Socket.IO event for scan summary data
  • Implement banner HTML/CSS in templates/index.html
  • Add statistics calculation from nmap XML results
  • Update report generation to include duration in headers
  • Remove scan initiation elements from historical data banner

Current State:

  • Duration calculated but not saved in metadata
  • Basic feedback messages only, no comprehensive banner
  • Reports lack duration information
  • Historical scan card may include inappropriate scan options
  • No post-scan summary with key metrics

Benefits:

  • Complete scan performance tracking
  • Immediate user insights post-scan
  • Better historical analysis capabilities
  • Cleaner UI with appropriate historical vs active scan separation
  • Enhanced user experience with comprehensive summaries

Location: app.py (metadata + stats calc), templates/index.html (banner + historical card cleanup), report generation functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions