Governance & Provenance (v0.59.0)
Procurement-ready ML compliance from a single CLI. v0.59 ships 4 governance surfaces that previously required a stack of SaaS tools and a security team: CycloneDX/SPDX BOM emitter, in-toto / SLSA-3 attestation, HIPAA / SOC2 audit log, and EU AI Act Annex XI/XII auto-documentation.
soup bom emit — ML Bill of Materials
Generates machine-learning Bills of Material in CycloneDX 1.6 (with ML-BOM extension) or SPDX 2.3 AI-profile formats — or both in a single invocation.
soup bom emit \
--name llama3-8b-finetuned --version 1.0.0 \
--base-model meta-llama/Llama-3.1-8B-Instruct \
--base-sha abc123...def456 \
--config-sha 789def...012abc \
--data-sha 456ghi...789jkl \
--task sft --license apache-2.0 \
--format both --output ./manifests/llama3-bomAtomic file write (tempfile.mkstemp + os.replace) with symlink rejection (TOCTOU defense). --format=both produces <prefix>.cdx.json and <prefix>.spdx.json side by side.
Since v0.73.3, --attach-to-registry <id> registers what it wrote as a bom artifact on that entry, so soup card links it in the card's artifact table for free. Those were the two compliance documents soup card existed to publish and could not reach, because the registry had no such artifact kinds. The flag needs --output (omitting it is a usage error, exit 2), and a lookup or attachment failure exits non-zero after leaving the emitted files on disk. With --format both, both files are attached.
soup attest emit — SLSA-3 in-toto attestations
Per-stage attestation aligned with SLSA-3 (Supply-chain Levels for Software Artifacts) and in-toto.
soup attest emit --stage train \
--subject adapter.safetensors --sha abc123...xyz789 \
--builder soup-cli \
--invocation "soup train --config soup.yaml" \
--sign unsigned --output ./attestations/train.json--attach-to-registry <id> works here too, as an attestation artifact, and a signed statement attaches its detached .sig sidecar alongside, so the card links every file a verifier needs (v0.73.3).
Stages: extract / train / eval / export / publish. Backends: unsigned (default — tamper-detectable via SHA-256); ed25519 is live as of v0.71.2 ([sign] extra; soup attest verify <statement> --signature <sig> does a canonical-JSON cryptographic verify). Sigstore keyless stays infra-blocked (needs an OIDC provider + Fulcio/Rekor).
soup audit-log — HIPAA/SOC2 audit trail
Every command execution records timestamp, command-line, exit code, operator identity, and host into ~/.soup/audit.jsonl (or $SOUP_AUDIT_LOG_PATH). PII fields are redacted before write.
# Tail the most recent 100 records (rich table)
soup audit-log tail --limit 100
# Raw JSONL for piping
soup audit-log tail --limit 50 --json
# Rotate at a 500 MB cap
soup audit-log rotate --cap-mb 500Turning it off
It is on by default for every command, so the opt-out belongs next to the feature rather than three pages away:
soup --no-audit-log train --config soup.yaml # global flag, before the subcommand
SOUP_NO_AUDIT_LOG=1 soup train --config soup.yamlBoth suppress the one-line record entirely. $SOUP_AUDIT_LOG_PATH is the third control, and it moves the file rather than silencing it, which is what you want when the default location is the problem and the record is not.
EU AI Act Annex XI/XII
soup train ships two new flags that emit the documentation required by the EU AI Act:
soup train --config soup.yaml \
--annex-xi ./docs/annex-xi.md \
--repro-receipt ./receipts/repro.jsonThe reproducibility receipt captures every seed, kernel version, library version, and dataset hash needed to reproduce the run under SR 11-7 model-risk-management standards.
CO₂ energy tracking schema
Energy is tracked by the CLI, not by a config block: soup train --track-energy (with --energy-country) records consumption offline via codecarbon, and soup bom emit --energy folds the measurement into the BOM and the Annex XI doc. There is no co2: key in soup.yaml, and no live grid-intensity lookup.
Numbers
+93 new tests in v0.59.0 (9193 → 9286).
See also
- Compliance pack — v0.71.35 wraps these commands into a regime-shaped workflow (
soup init --template,soup card,soup ci init). - Supply-chain security — v0.60 LoRA backdoor scanner, Merkle signing, air-gap bundles.
- Registry — every BOM and attestation can be attached as an artifact.
- Pre-flight & tooling (v0.64) —
soup license-advisor --target b2c|defense|embeddedreturns ok/warn/block per (license, deploy-target, MAU) and composes with the v0.59 license-matrix onsoup adapters merge. - Adapter lifecycle (v0.67) —
soup lockSHA256(base \|\| dataset \|\| env) closure makes governance artifacts reproducible across teams.
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.