Analyze Codee reports over time and generate interactive HTML visualizations.
This script analyzes multiple Codee reports, tracking how checker findings evolve over time. It supports both JSON and HTML report formats and generates an interactive HTML dashboard with three charts:
- Total Findings Over Time: Line chart showing total findings per report
- Findings by Checker: Line chart for each unique checker type found
- Findings by Priority Level: Line chart grouped by L1/L2/L3/L4 priority
- Python 3.10+
- pandas
pip install pandaspython analyze_codee_reports.py <input_directory> <output_directory>The script automatically detects the input format:
** Codee JSON Reports** (from codee checks --json):
- Searches recursively for
*.jsonfiles - Example directory structure:
reports/ ├── screening-1.json ├── screening-2.json └── subdir/ └── screening-3.json
Codee HTML Reports (from codee --html):
- Searches recursively for
report.jsfiles - When HTML reports are found, the generated dashboard includes links to open each original report
- Example directory structure:
reports/ ├── run-2024-01-01/ │ ├── report.js │ └── ... └── run-2024-02-01/ ├── report.js └── ...
The generated HTML dashboard includes:
- Interactive charts: Hover for tooltips, click on points to open original reports
- Summary cards: Show report count, unique checkers found, and the total findings from the latest report
- Links section: Table with links to open each original HTML report
- Responsive design: Works on desktop and mobile
- No external dependencies: Uses Chart.js from CDN (internet required for first load)
Shows the sum of all checker findings for each report over time. Click on any point to open the original report (if available).
Displays each unique checker type (e.g., PWR007, PWR068) as a separate line, allowing you to see which specific checkers contribute to findings.
Groups findings by their severity level:
- L1 (Red): High priority
- L2 (Orange): Medium priority
- L3 (Green): Low priority
- L4 (Light Green): Very-low priority
- Ensure your input directory contains valid report files
- For JSON: look for
*.jsonfiles - For HTML: look for directories containing
report.js
- One or more files are corrupted
- The script will skip these files and continue
- Some files may be missing the timestamp field
- The script will skip these files and continue