8000 GitHub - gkhays/py-docker-trivy: Scan an SBOM using the Trivy Docker container
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gkhays/py-docker-trivy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evaluate an SBOM

Given an SBOM, scan it for CVEs.

trivy sbom sbom.json

Getting Started

Prerequisites

The following tools are required.

Building

Sync dependencies and update lockfile.

uv sync

Usage

The module expects an SBOM file in CycloneDX format, saved in the scans folder relative to this project. The resulting scan will emit a JSON file named scan.json, located in the same folder.

uv run main.py

Results

2025-05-28 16:41:59,008 - trivy_docker - INFO - Starting py-docker-trivy!
✅ Docker is running.
Docker version: 27.5.1
2025-05-28 16:41:59,715 - trivy_docker - INFO - Image aquasec/trivy pulled successfully.
2025-05-28 16:41:59,715 - trivy_docker - INFO - Mounting host directory D:\Users\ghays\poc\py-docker-trivy\scans to container path /mnt/scans
2025-05-28 16:42:00,102 - trivy_docker - INFO - Container 9d16408fd836acee6ab367a95a0489303ce485acb61ec704b92989a857dd3a5c started with command: sbom /mnt/scans/sbom.json --format json --output /mnt/scans/scan.json --quiet
✅ Container executed successfully.

References

About

Scan an SBOM using the Trivy Docker container

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0