stella explain - Block Explanation Commands

Audience: developers and release managers who hit a blocked artifact and need to know exactly which gate stopped it, why, and how to prove or reproduce the decision.

Overview

The stella explain command group explains why an artifact is blocked by policy gates — delivering explainability with proof, not narrative.

When an artifact is blocked, stella explain produces a deterministic trace with referenced evidence artifacts, enabling:


Commands

stella explain block

Explain why an artifact was blocked by policy gates.

Usage:

stella explain block <digest> [options]

Arguments:

Options:

OptionAliasDescriptionDefault
--format <format>-fOutput format: table, json, markdowntable
--show-evidence-eInclude full evidence artifact detailsfalse
--show-trace-tInclude policy evaluation tracefalse
--replay-token-rInclude replay token in outputfalse
--output <path>-oWrite to file instead of stdoutstdout
--offlineQuery local verdict cache onlyfalse

Output Formats

Table Format (Default)

Human-readable format optimized for terminal display:

Artifact: sha256:abc123def456789012345678901234567890123456789012345678901234
Status: BLOCKED

Gate: VexTrust
Reason: Trust score below threshold (0.45 < 0.70)
Suggestion: Obtain VEX statement from trusted issuer or add issuer to trust registry

Evidence:
  [VEX   ] vex:sha256:de...23  vendor-x      2026-01-15T10:00:00Z
  [REACH ] reach:sha256...56   static        2026-01-15T09:55:00Z

Replay: stella verify verdict --verdict urn:stella:verdict:sha256:abc123:v2.3.0:1737108000

JSON Format

Machine-readable format for CI/CD integration:

{
  "artifact": "sha256:abc123def456789012345678901234567890123456789012345678901234",
  "status": "BLOCKED",
  "gate": "VexTrust",
  "reason": "Trust score below threshold (0.45 < 0.70)",
  "suggestion": "Obtain VEX statement from trusted issuer or add issuer to trust registry",
  "evaluationTime": "2026-01-15T10:30:00+00:00",
  "policyVersion": "v2.3.0",
  "evidence": [
    {
      "type": "VEX",
      "id": "vex:sha256:def456789abc123",
      "source": "vendor-x",
      "timestamp": "2026-01-15T10:00:00+00:00",
      "retrieveCommand": "stella evidence get vex:sha256:def456789abc123"
    },
    {
      "type": "REACH",
      "id": "reach:sha256:789abc123def456",
      "source": "static-analysis",
      "timestamp": "2026-01-15T09:55:00+00:00",
      "retrieveCommand": "stella evidence get reach:sha256:789abc123def456"
    }
  ],
  "replayCommand": "stella verify verdict --verdict urn:stella:verdict:sha256:abc123:v2.3.0:1737108000"
}

Markdown Format

Suitable for embedding in GitHub issues, PR comments, or documentation:

## Block Explanation

**Artifact:** `sha256:abc123def456789012345678901234567890123456789012345678901234`
**Status:** BLOCKED

### Gate Decision

| Property | Value |
|----------|-------|
| Gate | VexTrust |
| Reason | Trust score below threshold (0.45 < 0.70) |
| Suggestion | Obtain VEX statement from trusted issuer or add issuer to trust registry |
| Policy Version | v2.3.0 |

### Evidence

| Type | ID | Source | Timestamp |
|------|-----|--------|-----------|
| VEX | `vex:sha256:de...23` | vendor-x | 2026-01-15 10:00 |
| REACH | `reach:sha256...56` | static-analysis | 2026-01-15 09:55 |

### Verification

```bash
stella verify verdict --verdict urn:stella:verdict:sha256:abc123:v2.3.0:1737108000

---

## Examples

### Basic Block Explanation

```bash
# Get basic explanation of why an artifact is blocked
stella explain block sha256:abc123def456789012345678901234567890123456789012345678901234

JSON Output for CI/CD

# Get JSON output for parsing in CI/CD pipeline
stella explain block sha256:abc123... --format json --output block-reason.json

# Parse in CI/CD
GATE=$(jq -r '.gate' block-reason.json)
REASON=$(jq -r '.reason' block-reason.json)
echo "Blocked by $GATE: $REASON"

Full Explanation with Evidence and Trace

# Get complete explanation with all details
stella explain block sha256:abc123... \
  --show-evidence \
  --show-trace \
  --replay-token \
  --format table

Markdown for PR Comment

# Generate markdown for GitHub PR comment
stella explain block sha256:abc123... --format markdown --output comment.md

# Use with gh CLI
gh pr comment 123 --body-file comment.md

Retrieve Evidence Artifacts

# Get explanation
stella explain block sha256:abc123... --show-evidence

# Retrieve specific evidence artifacts
stella evidence get vex:sha256:def456789abc123
stella evidence get reach:sha256:789abc123def456

Verify Deterministic Replay

# Get replay token
REPLAY=$(stella explain block sha256:abc123... --format json | jq -r '.replayCommand')

# Execute replay verification
eval $REPLAY

Exit Codes

CodeMeaning
0Artifact is NOT blocked (all gates passed)
1Artifact IS blocked (one or more gates failed)
2Error (artifact not found, API error, etc.)

CI/CD Integration:

# Fail pipeline if artifact is blocked
if ! stella explain block sha256:abc123... --format json > /dev/null 2>&1; then
  EXIT_CODE=$?
  if [ $EXIT_CODE -eq 1 ]; then
    echo "ERROR: Artifact is blocked by policy"
    stella explain block sha256:abc123... --format markdown
    exit 1
  else
    echo "ERROR: Could not retrieve block status"
    exit 2
  fi
fi

Evidence Types

The explain block command returns evidence artifacts that contributed to the gate decision:

TypeDescriptionSource
VEXVEX (Vulnerability Exploitability eXchange) statementVEX issuers, vendor security teams
REACHReachability analysis resultStatic analysis, call graph analysis
SBOMSoftware Bill of MaterialsSBOM generators, build systems
SCANVulnerability scan resultScanner service
ATTESTAttestation documentAttestor service, SLSA provenance
POLICYPolicy evaluation resultPolicy engine

Determinism Guarantee

All output from stella explain block is deterministic:

  1. Same inputs produce identical outputs - Given the same artifact digest and policy version, the output is byte-for-byte identical
  2. Evidence is sorted - Evidence artifacts are sorted by timestamp (ascending)
  3. Trace is sorted - Evaluation trace steps are sorted by step number
  4. Timestamps use ISO 8601 - All timestamps use ISO 8601 format with UTC offset
  5. JSON uses canonical ordering - JSON properties are ordered consistently

This enables:


Troubleshooting

Artifact Not Found

Error: Artifact sha256:abc123... not found in registry or evidence store.

Causes:

Solutions:

# Verify artifact exists
stella image inspect sha256:abc123...

# Scan the artifact
stella scan docker://myregistry/myimage@sha256:abc123...

Not Blocked

Artifact sha256:abc123... is NOT blocked. All policy gates passed.

This means the artifact passed all policy evaluations. Exit code will be 0.

API Error

Error: Policy service unavailable

Solutions:

# Check connectivity
stella doctor --check check.policy.connectivity

# Use offline mode if available
stella explain block sha256:abc123... --offline

See Also