name: "Scan Analysis"
category: operational  # Period-bound: shows scan activity within the specified time window
description: "Analyze scan throughput, durations, failures, and queue status"
template: "scan_analysis.html"
execution_order: 10  # Runs first - fetches scans that other reports reuse

query:
  endpoint: "/public/v0/scans"
  params:
    sort: "created:asc"
    limit: 100

project_list_query:
  endpoint: "/public/v0/projects"
  params:
    limit: 10000
    archived: false

transform_function: scan_analysis_transform

output:
  formats: ["csv", "xlsx", "html"]
  charts:
    - name: "scan_throughput"
      chart: line
      title: "Scan Throughput Over Time"
      description: "Number of scans started and completed per day"
    
    - name: "scan_durations"
      chart: bar
      title: "Average Scan Duration by Day" 
      description: "Average scan duration in minutes for completed scans"
    
    - name: "failure_rate"
      chart: bar
      title: "Scan Success vs Failure Rate"
      description: "Success rate percentage and failure counts by day"
      
    - name: "scan_types"
      chart: pie
      title: "Scan Type Distribution"
      description: "Distribution of scan types (SCA, SAST, CONFIG)"
    
    - name: "failure_types"
      chart: pie
      title: "Failure Type Distribution"
      description: "Distribution of failed scans by scan type"
    
    - name: "queue_vs_processing"
      chart: bar
      title: "Active Scan Status Analysis"
      description: "Average time scans spend in INITIAL vs STARTED status by day"
  
  table: true
  slide_title: "Scan Operations Analysis" 