Skip to main content

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

  1. Install the scanner:
    1. Trivy: Follow the official Trivy installation guide
    2. RHACS: Follow the official roxctl installation guide
  2. Python Environment: Ensure Python 3.9+ 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 (fixed vulnerabilities)
diffused image-diff -p ubuntu:20.04 -n ubuntu:22.04

# Report vulnerabilities newly introduced in the next image
diffused image-diff -p ubuntu:20.04 -n ubuntu:22.04 --show new

# Report both fixed and new vulnerabilities
diffused image-diff -p ubuntu:20.04 -n ubuntu:22.04 --show all

# Use ACS scanner
diffused --scanner acs image-diff -p nginx:1.20 -n nginx:1.21

# 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 (fixed vulnerabilities)
diffused sbom-diff -p previous.json -n current.json

# Report vulnerabilities newly introduced in the next SBOM
diffused sbom-diff -p previous.json -n current.json --show new

# Report both fixed and new vulnerabilities with detailed information
diffused sbom-diff -p previous.json -n current.json --show all --all-info

# 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
--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
--show Which vulnerabilities to report (fixed, new, all) No (default fixed)
--output -o Output format (rich, json) rich
--file -f Output file (use - for stdout) -

sbom-diff Options

Option Short Description Required
--previous-sbom -p Previous SBOM file path Yes
--next-sbom -n Next SBOM file path Yes
--all-info -a Show detailed vulnerability information (SBOM only) False
--show Which vulnerabilities to report (fixed, new, all) No (default fixed)
--output -o Output format (rich, json) rich
--file -f Output file (use - for stdout) -

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diffused_cli-0.4.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffused_cli-0.4.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file diffused_cli-0.4.0.tar.gz.

File metadata

  • Download URL: diffused_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for diffused_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9d135977e085f01f879cc6a2563b01ce1e829cb451460407b34b113c46e78535
MD5 c4f002c48e8417df16462b6ba1551ac7
BLAKE2b-256 e9377160b3af1ef2c5005691c4c9f84d97de39cd10081358e8dc57a772e75320

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffused_cli-0.4.0.tar.gz:

Publisher: release.yml on konflux-ci/diffused

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diffused_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: diffused_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for diffused_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0950a3b94349040ce28dc6f1f25a18ad5443efc57cb524e94ca65fe1e334f1
MD5 0209bd87f62fdf82f8a34d9ed1a26507
BLAKE2b-256 743f66ecd30254630f0b368a730c1907df841875a4a30405ef652e9878af5c59

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffused_cli-0.4.0-py3-none-any.whl:

Publisher: release.yml on konflux-ci/diffused

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page