A vulnerability scan diffing command-line tool for container images and SBOMs
Project description
Diffused CLI
Command-line interface for the Diffused vulnerability scanning and diffing library. This tool provides an easy-to-use interface for comparing container images and SBOMs (Software Bill of Materials) to track security improvements and regressions.
Features
- 🔍 Container Image Comparison: Compare vulnerabilities between different container image versions
- 📊 SBOM Diffing: Direct comparison of SPDX-JSON formatted SBOMs (Trivy only)
- 📄 Multiple Output Formats: Support for both rich text and JSON output
- 🎨 Rich Terminal Output: Beautiful, colored output for better readability
Installation
Prerequisites
- Install the scanner:
- Trivy: Follow the official Trivy installation guide
- RHACS: Follow the official roxctl installation guide
- Python Environment: Ensure Python 3.12+ is installed
From Source
# Install the library
pip install -e ./diffused
# Install the CLI
pip install -e ./diffusedcli
From PyPI
pip install diffusedcli
Usage
Compare Container Images
# Basic vulnerability diff between two container images
diffused image-diff -p ubuntu:20.04 -n ubuntu:22.04
# Use ACS scanner
diffused --scanner acs image-diff -p nginx:1.20 -n nginx:1.21
# Get detailed information about each vulnerability
diffused image-diff -p nginx:1.20 -n nginx:1.21 --all-info
# Save output to JSON file
diffused image-diff -p app:v1.0 -n app:v2.0 --output json --file report.json
Compare SBOMs
# Compare two SBOM files
diffused sbom-diff -p previous.json -n current.json
# Get detailed vulnerability information
diffused sbom-diff -p old-sbom.json -n new-sbom.json --all-info
# Export to file with rich formatting
diffused sbom-diff -p v1-sbom.json -n v2-sbom.json --file vulnerability-report.txt
CLI Commands and Options
For more information on commands and options, use the --help option.
Commands
| Command | Description |
|---|---|
image-diff |
Show the vulnerability diff between two container images |
sbom-diff |
Show the vulnerability diff between two SBOMs |
Global Options
| Option | Short | Description | Default |
|---|---|---|---|
--scanner |
-s |
Scanner to use (acs, trivy) |
trivy |
--all-info |
-a |
Show detailed vulnerability information | False |
--output |
-o |
Output format (rich, json) |
rich |
--file |
-f |
Output file (use - for stdout) |
- |
--help |
-h |
Show help message | - |
image-diff Options
| Option | Short | Description | Required |
|---|---|---|---|
--previous-image |
-p |
Previous container image URL | Yes |
--next-image |
-n |
Next container image URL | Yes |
sbom-diff Options
| Option | Short | Description | Required |
|---|---|---|---|
--previous-sbom |
-p |
Previous SBOM file path | Yes |
--next-sbom |
-n |
Next SBOM file path | Yes |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diffused_cli-0.1.0.tar.gz.
File metadata
- Download URL: diffused_cli-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c37a3dfa9897412fbcbed1a156b47d6503e9512ca16f61fb1aeea75212baa73d
|
|
| MD5 |
f4ac99dbe5f5084ebc022c939b510332
|
|
| BLAKE2b-256 |
c2f7760cfb7b26a31dbdec63891f08ba78ccc4463700687ae6faf7e05c4aa176
|
Provenance
The following attestation bundles were made for diffused_cli-0.1.0.tar.gz:
Publisher:
release.yml on konflux-ci/diffused
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffused_cli-0.1.0.tar.gz -
Subject digest:
c37a3dfa9897412fbcbed1a156b47d6503e9512ca16f61fb1aeea75212baa73d - Sigstore transparency entry: 573160985
- Sigstore integration time:
-
Permalink:
konflux-ci/diffused@7aed7eed8b4829ebccd7b5f53bd1f6f3f14c4b5f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/konflux-ci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7aed7eed8b4829ebccd7b5f53bd1f6f3f14c4b5f -
Trigger Event:
push
-
Statement type:
File details
Details for the file diffused_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: diffused_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
832dfb36e68bc2d026e58f3fd107e2d65dde35960e0d6c05dadf1681ca43bad0
|
|
| MD5 |
2c1e7bfe5049715084accea08375fd3d
|
|
| BLAKE2b-256 |
b9064a8f9d8238712f9d30e371005c708143a067c03cf9b5d6d596ac6c674316
|
Provenance
The following attestation bundles were made for diffused_cli-0.1.0-py3-none-any.whl:
Publisher:
release.yml on konflux-ci/diffused
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffused_cli-0.1.0-py3-none-any.whl -
Subject digest:
832dfb36e68bc2d026e58f3fd107e2d65dde35960e0d6c05dadf1681ca43bad0 - Sigstore transparency entry: 573161129
- Sigstore integration time:
-
Permalink:
konflux-ci/diffused@7aed7eed8b4829ebccd7b5f53bd1f6f3f14c4b5f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/konflux-ci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7aed7eed8b4829ebccd7b5f53bd1f6f3f14c4b5f -
Trigger Event:
push
-
Statement type: