Smart-Diff CLI Reference

Audience: DevOps engineers, release operators, and CI authors comparing successive builds of a container image. Scope: The stella smart-diff command group — analyzing the material risk delta between two artifacts and verifying or replaying the resulting report.

Overview

Smart-Diff analyzes the changes between two container image versions to surface material risk changes — not raw findings churn. It detects reachability shifts, VEX status changes, binary hardening regressions, and intelligence-signal updates (such as new KEV entries), and ranks them by priority.

Commands

stella smart-diff

Compare two artifacts and report material risk changes.

stella smart-diff [OPTIONS]

Required Options

OptionDescription
--base <ARTIFACT>Base artifact (image digest, SBOM path, or purl)
--target <ARTIFACT>Target artifact to compare against base

Output Options

OptionDescriptionDefault
--output <PATH>Output file pathstdout
--output-format <FMT>Output format: json, yaml, table, sariftable
--output-dir <DIR>Output directory for bundle format-
--include-proofsInclude proof ledger in outputfalse
--include-evidenceInclude raw evidence datafalse
--prettyPretty-print JSON/YAML outputfalse

Analysis Options

OptionDescriptionDefault
--rules <PATH>Custom detection rules filebuilt-in
--config <PATH>Scoring configuration filedefault config
--tier <TIER>Filter by evidence tier: imported, executed, tainted_sinkall
--min-priority <N>Minimum priority score (0-1)0.0
--include-unchangedInclude unchanged findingsfalse

Feed Options

OptionDescriptionDefault
--feed-snapshot <HASH>Use specific feed snapshotlatest
--offlineRun in offline modefalse
--feed-dir <PATH>Local feed directory-

Examples

Basic Comparison

# Compare two image versions
stella smart-diff \
  --base registry.example.com/app:v1.0.0 \
  --target registry.example.com/app:v1.1.0

# Output:
# Smart-Diff Report: app:v1.0.0 → app:v1.1.0
# ═══════════════════════════════════════════
#
# Summary:
#   Total Changes: 5
#   Risk Increased: 2
#   Risk Decreased: 3
#   Hardening Regressions: 1
#
# Material Changes:
# ┌─────────────────┬──────────────────┬──────────┬──────────┐
# │ Vulnerability   │ Component        │ Change   │ Priority │
# ├─────────────────┼──────────────────┼──────────┼──────────┤
# │ CVE-2024-1234   │ lodash@4.17.20   │ +reach   │ 0.85     │
# │ CVE-2024-5678   │ requests@2.28.0  │ +kev     │ 0.95     │
# │ CVE-2024-9999   │ urllib3@1.26.0   │ -reach   │ 0.60     │
# └─────────────────┴──────────────────┴──────────┴──────────┘

SARIF Output for CI/CD

# Generate SARIF for GitHub Actions
stella smart-diff \
  --base app:v1.0.0 \
  --target app:v1.1.0 \
  --output-format sarif \
  --output results.sarif

Filtered Analysis

# Only show high-priority changes
stella smart-diff \
  --base app:v1 \
  --target app:v2 \
  --min-priority 0.7 \
  --output-format json

# Only tainted_sink tier findings
stella smart-diff \
  --base app:v1 \
  --target app:v2 \
  --tier tainted_sink

Export with Proofs

# Full export with proof bundle
stella smart-diff \
  --base app:v1 \
  --target app:v2 \
  --output-dir ./smart-diff-export \
  --include-proofs \
  --include-evidence

# Creates:
# ./smart-diff-export/
# ├── manifest.json
# ├── diff-results.json
# ├── proofs/
# └── evidence/

Offline Mode

# Use local feeds only
STELLAOPS_OFFLINE=true stella smart-diff \
  --base sbom-v1.json \
  --target sbom-v2.json \
  --feed-dir /opt/stellaops/feeds

stella smart-diff show

Display results from a saved smart-diff report.

stella smart-diff show [OPTIONS] <INPUT>

Options

OptionDescriptionDefault
--format <FMT>Output format: table, json, yamltable
--filter <EXPR>Filter expression (e.g., priority>=0.8)-
--sort <FIELD>Sort field: priority, vuln, componentpriority
--limit <N>Maximum results to showall

Example

# Show top 5 highest priority changes
stella smart-diff show \
  --sort priority \
  --limit 5 \
  smart-diff-report.json

stella smart-diff verify

Verify a smart-diff report’s proof bundle.

stella smart-diff verify [OPTIONS] <INPUT>

Options

OptionDescriptionDefault
--proof-bundle <PATH>Proof bundle pathinferred
--public-key <PATH>Public key for signature verification-
--strictFail on any warningfalse

Example

# Verify report integrity
stella smart-diff verify \
  --proof-bundle ./proofs \
  --public-key /path/to/key.pub \
  smart-diff-report.json

# Output:
# ✓ Manifest hash verified: sha256:abc123...
# ✓ Proof ledger valid (45 nodes)
# ✓ Root hash matches
# ✓ Signature valid (key: CN=scanner.stellaops.io)

stella smart-diff replay

Re-run smart-diff with a different feed or config.

stella smart-diff replay [OPTIONS] <SCAN-ID>

Options

OptionDescriptionDefault
--feed-snapshot <HASH>Use specific feed snapshotlatest
--config <PATH>Different scoring configoriginal
--dry-runPreview without savingfalse

Example

# Replay with new feed
stella smart-diff replay \
  --feed-snapshot sha256:abc123... \
  scan-12345678

# Preview impact of config change
stella smart-diff replay \
  --config strict-scoring.json \
  --dry-run \
  scan-12345678

Exit Codes

CodeMeaning
0Success, no material changes
1Success, material changes found
2Success, hardening regressions found
3Success, KEV additions found
10Invalid arguments
11Artifact not found
12Feed not available
20Verification failed
99Internal error

Environment Variables

VariableDescription
STELLAOPS_OFFLINERun in offline mode
STELLAOPS_FEED_DIRLocal feed directory
STELLAOPS_CONFIGDefault config file
STELLAOPS_OUTPUT_FORMATDefault output format

Configuration File

# ~/.stellaops/smart-diff.yaml
defaults:
  output_format: json
  include_proofs: true
  min_priority: 0.3

scoring:
  reachability_flip_up_weight: 1.0
  kev_added_weight: 1.5
  hardening_regression_weight: 0.8

rules:
  custom_path: /path/to/custom-rules.json