Convert Grype vulnerability scan results into interactive HTML reports.
- Generate standalone HTML reports from Grype JSON output
- Interactive filtering by severity and package name
- Expandable vulnerability details
- No external dependencies - everything is self-contained in a single HTML file
- Mobile-friendly responsive design
- Clean, modern interface using system fonts
- Color-coded severity indicators
- Detailed vulnerability information including:
- Package details
- Vulnerability IDs
- Severity levels
- Fix versions
- Related vulnerability descriptions
- Reference URLs
Grype is a vulnerability scanner from Anchore that can analyze various artifacts, including container images and filesystems. While Grype supports multiple output formats, including JSON and table formats, some users need to share results in a more accessible format.
This tool bridges that gap by converting Grype's JSON output into interactive HTML reports that can be easily shared, viewed in any web browser, and optionally converted to PDF.
# Clone the repository
git clone https://github.com/popey/grype2html
cd grype2html
# Make the script executable
chmod +x grype2html.py
grype2html can be used in a pipeline with Grype:
# Scan an image and generate HTML report
grype alpine:latest -o json | ./grype2html.py
# Scan a directory and generate HTML report
grype /path/to/dir -o json | ./grype2html.py
# Scan from a Grype JSON file
cat grype-results.json | ./grype2html.py
The script will generate an HTML file with a timestamp in the filename (e.g., grype_20250210T225647.html
).
- Total number of vulnerabilities
- Breakdown by severity
- Target information
- Grype version information
- Filter vulnerabilities by severity (Critical, High, Medium, Low)
- Search/filter by package name
- Expandable details for each vulnerability
- Package name and version
- Vulnerability ID
- Severity (color-coded)
- Available fix versions
- Detailed vulnerability descriptions
- Reference URLs
- Python 3.6 or later
- Input must be valid Grype JSON output
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- Anchore for creating Grype
- TheGr8CodeWarrior for suggesting this improvement in r/homelab. See also Grype issue 2199.