Stella Ops — Developer Guide: Deterministic Replay

Purpose

Deterministic Replay ensures any past scan can be re-executed byte-for-byte, producing identical SBOM, Findings, and VEX results, cryptographically verifiable for audits or compliance.

Replay is the foundation for:

  • Audit proofs (exact past state reproduction)
  • Diff analysis (feeds, policies, tool versions)
  • Cross-region verification (same outputs on different hosts)
  • Long-term cryptographic trust (re-sign with new crypto profiles)

Core Concepts

TermDescription
Replay ManifestImmutable JSON describing all inputs, tools, env, and outputs of a scan.
InputBundleSnapshot of feeds, rules, policies, and toolchain binaries used.
OutputBundleSBOM, Findings, VEX, and logs from a completed scan.
Layer MerklePer-layer hash tree for precise deduplication and drift detection.
DSSE EnvelopeDigital signature wrapper for each attestation (SBOM, Findings, Manifest, etc.).

What to Freeze

CategoryExample ContentsRequired in Manifest
SubjectOCI image digest, per-layer Merkle roots
OutputsSBOM, Findings, VEX, logs (content hashes)
ToolchainSbomer, Scanner, Vexer binaries + versions + SHA256
Feeds/VEX sourcesFull or pruned snapshot with Merkle proofs
Policy BundleLattice rules, mutes, trust profiles, thresholds
EnvironmentOS, arch, locale, TZ, deterministic seed, runtime flags
Reachability EvidenceCallgraphs (graphs[]), runtime traces (runtimeTraces[]), analyzer/version hashes
Crypto ProfileAlgorithm suites (FIPS, GOST, SM, eIDAS)

Replay Modes

ModePurposeInput VariationExpected Output
Strict ReplayAudit proofNoneBit-for-bit identical
What-If ReplayChange impact analysisOne dimension (feeds/tools/policy)Deterministic diff

Example:


stella replay manifest.json --strict
stella replay manifest.json --what-if --vary=feeds


Developer Responsibilities

ModuleRole
Scanner.WebServiceCapture full input set and produce Replay Manifest + DSSE sigs.
SbomerGenerate deterministic SBOM; normalize ordering and JSON formatting.
Vexer/ExcititorApply lattice and mutes from policy bundle; record gating logic.
Feedser/ConcelierFreeze and export feed snapshots or Merkle proofs.
AuthorityManage signer keys and crypto profiles; issue DSSE envelopes.
CLIProvide scan --record, replay, verify, diff commands.

Workflow

  1. stella scan image:tag --record out/
    • Generates Replay Manifest, InputBundle, OutputBundle, DSSE sigs.
    • Captures reachability graphs/traces (if enabled) and references them via reachability.graphs[] + runtimeTraces[].
  2. stella verify manifest.json
    • Validates hashes, signatures, and completeness.
  3. stella replay manifest.json --strict
    • Re-executes in sealed mode; expect byte-identical results.
  4. stella replay manifest.json --what-if --vary=feeds
    • Runs with new feeds; diff is attributed to feeds only.
  5. stella diff manifestA manifestB
    • Attribute differences by hash comparison.

Storage

  • Mongo collections
    • replay_runs: manifest + DSSE envelopes + status
    • bundles: content-addressed (input/output/rootpack)
    • subjects: OCI digests, Merkle roots per layer
    • reachability_facts: graph & runtime trace references tied to scan subjects
  • File store
    • Bundles stored as <sha256>.tar.zst

Developer Checklist

  • [ ] All inputs (feeds, policies, tools, env) hashed and recorded.
  • [ ] JSON normalization: key order, number format, newline mode.
  • [ ] Random seed = H(scan.id || MerkleRootAllLayers).
  • [ ] Clock fixed to scan.time unless policy requires “now”.
  • [ ] DSSE multi-sig supported (FIPS + regional).
  • [ ] Manifest signed + optionally anchored to Rekor ledger.
  • [ ] Replay comparison mode tested across x64/arm64.

References

See also:

  • DETERMINISTIC_REPLAY.md — detailed manifest schema & CLI examples.
  • ../docs/CRYPTO_SOVEREIGN_READY.md — RootPack and dual-signature handling.