From odh-ai-helpers
Compares CVE vulnerabilities between two OCI container images using Trivy, generating reports on fixed CVEs, new CVEs, common issues, and security posture changes. Useful for auditing image upgrades.
npx claudepluginhub opendatahub-io/ai-helpers --plugin odh-ai-helpersThis skill is limited to using the following tools:
This skill compares CVE vulnerabilities between two OCI container images and generates detailed reports showing which CVEs were fixed and which new CVEs were introduced.
Scans container images and Dockerfiles for vulnerabilities, misconfigurations, and compliance using Trivy, Grype, Snyk, and Hadolint. Generates reports with remediation steps and CI/CD integration.
Scans container images, dependencies (Go, Python, Node.js, Java), filesystems, and IaC (Terraform, Kubernetes, Dockerfile) for CVEs, misconfigurations using Trivy. Generates SBOMs, SARIF for CI/CD.
Scans Docker images with Trivy for vulnerabilities in OS packages, dependencies, misconfigurations, secrets, and licenses. Useful for CI/CD pipelines, security audits, and container assessments.
Share bugs, ideas, or general feedback.
This skill compares CVE vulnerabilities between two OCI container images and generates detailed reports showing which CVEs were fixed and which new CVEs were introduced.
When a user asks to compare CVEs between container images or analyze security differences:
Check and install required dependencies:
./scripts/manage_deps.sh
This script checks for trivy, jq, and skopeo, and automatically installs any missing tools to a temporary directory if needed.
Run the CVE comparison script with two container image references:
./scripts/check_cves.sh <base_image> <target_image> [output_directory]
Analyze the generated output files:
The script generates the following files in the output directory (default: ./cve-reports/):
fixed_cves.txt: CVEs that existed in the base image but are fixed in the target imagenew_cves.txt: New CVEs that appear in the target image but weren't in the base imagecommon_cves.txt: CVEs that exist in both imagessummary.txt: High-level summary with counts and statistics<image_name>_<digest>.json: Complete vulnerability scans for each image (filenames include image name and first 12 characters of digest, e.g., python-3.11_a1b2c3d4e5f6.json)Interpret the results for the user:
./scripts/check_cves.sh registry.io/app:v1.0 registry.io/app:v1.1
Interpretation: Compare CVEs between version 1.0 and 1.1, identifying security improvements and any regressions.
./scripts/check_cves.sh quay.io/myapp:latest quay.io/myapp:dev ./security-audit
Interpretation: Generate comparison reports in a custom directory for documentation or CI/CD integration.
./scripts/check_cves.sh docker.io/library/python:3.11 docker.io/library/python:3.12
Interpretation: Analyze security differences between Python base image versions.
# Method 1: Using auth.json file (Recommended)
REGISTRY_AUTH_FILE=/home/default/containers/auth.json \
./scripts/check_cves.sh private-registry.io/app:v1 private-registry.io/app:v2
# Method 2: Using environment variables
TRIVY_USERNAME=myuser TRIVY_PASSWORD=mypass \
./scripts/check_cves.sh private-registry.io/app:v1 private-registry.io/app:v2
# Method 3: Trivy automatically uses podman credentials from ${XDG_RUNTIME_DIR}/containers/auth.json
podman login private-registry.io
./scripts/check_cves.sh private-registry.io/app:v1 private-registry.io/app:v2
# Method 4: For non-SSL registries
TRIVY_NON_SSL=true REGISTRY_AUTH_FILE=/home/default/containers/auth.json \
./scripts/check_cves.sh insecure-registry.io/app:v1 insecure-registry.io/app:v2
Interpretation: Trivy can authenticate to private registries using the REGISTRY_AUTH_FILE environment variable pointing to your auth.json, or using TRIVY_USERNAME/TRIVY_PASSWORD environment variables, or existing podman credentials.
Based on the comparison, provide guidance:
This skill requires the following tools to be installed:
If the dependency check fails:
./scripts/manage_deps.sh first to check and install trivy, jq, and skopeoIf the comparison script fails:
TRIVY_USERNAME/TRIVY_PASSWORD environment variables, or login with podman login <registry>TRIVY_NON_SSL=true for insecure registriesThis skill works well with: