Skip to content

Supply Chain Security (v0.60.0)

"Tensors you can ship through procurement." v0.60 layers 6 supply-chain controls on top of LoRA adapters so a security team can clear shipped weights for production.

soup adapters scan — spectral backdoor detector

Pure-numpy spectral analysis of LoRA weight matrices. Flags four patterns associated with weight-space trojans:

PatternWarnFail
Rank-1 dominance50×200×
Top singular value / energy≥ 75%≥ 95%
Frobenius outlier (σ)≥ 4σ≥ 8σ
NaN / Inf—any
bash
soup adapters scan ./my_adapter --format json | jq '.overall'
# "OK" | "WARN" | "FAIL"

Exit codes: 0 = OK, 1 = WARN (advisory), 3 = FAIL (CI gate).

soup adapters sign / verify — Merkle-root tamper detection

bash
soup adapters sign ./my_adapter --backend unsigned
# → ./my_adapter/.soup-signature.json

soup adapters verify ./my_adapter            # exit 1 on mismatch (lenient)
soup adapters verify ./my_adapter --strict   # exit 3 on mismatch (CI-strict)

The unsigned backend (default) computes a Merkle root over all adapter files for offline SHA-256 verification. ed25519 is live as of v0.71.2 — soup adapters sign --backend ed25519 --key <priv.pem> (or --generate-key, or SOUP_SIGNING_KEY) writes a real detached signature; soup adapters verify --public-key <trusted.pem> does a cryptographic verify that fails closed on any tamper or wrong key. sigstore (keyless OIDC, Fulcio and Rekor) is live as of v0.76.0; see Sigstore keyless signing below. Through v0.75.2 soup adapters sign --backend sigstore refused with exit 2 and soup attest emit --sign sigstore fell back to an unsigned statement and exited 0; neither is true any more (Governance has the attestation half).

soup adapters sign exits 2 for a refused argument (an unknown backend, --interactive-oidc without --backend sigstore, the [sigstore] extra missing, no ambient credential when the Sigstore trust root can be loaded) and 1 for a missing adapter directory or a signing service that failed at run time, which includes a trust root that cannot be loaded (for example offline), even when no credential is present either.

History:

From v0.71.2 to v0.75.0 the --public-key check could be walked straight past, and this page said otherwise. The trusted key was consulted only inside the ed25519 branch, so with --public-key trusted.pem a record carrying any other backend was never compared against it and verified with exit 0, even under --strict. An adapter re-signed with the default unsigned backend passed a check that was supposed to authenticate the signer, which is the failure the command exists to prevent. It is fixed in v0.75.1: with --public-key, a record whose backend is not ed25519 fails verification with a stated reason. Without --public-key nothing changed, and an unsigned record still verifies by Merkle root alone, as described above. If you gated a pipeline on --public-key, the gate was open; re-verify anything you accepted on an affected version.

Sigstore keyless signing (v0.76.0)

Install the extra: pip install "soup-cli[sigstore]" (sigstore>=4.4.0,<5.0.0; it is not part of [all]). Signing is keyless. It uses an ambient OIDC identity (for example GitHub Actions) to obtain a Fulcio certificate and submits to the Sigstore public-good Rekor log, so the signer's identity ends up in a public transparency-log entry. A browser sign-in is never opened implicitly on a headless run; pass --interactive-oidc to allow it.

bash
soup adapters sign ./my_adapter --backend sigstore
soup adapters verify ./my_adapter \
  --cert-identity 'https://github.com/acme/repo/.github/workflows/release.yml@refs/heads/main' \
  --cert-oidc-issuer 'https://token.actions.githubusercontent.com'

sign signs the Merkle root and stores the whole Sigstore bundle in .soup-signature.json: the signature field stays empty and sigstore_bundle holds the bundle. The same flag exists on soup attest emit --sign sigstore, which also needs --output; that command, its exit codes and the statement format are on the Governance page.

Verification is fail-closed and needs both values, supplied by you. --cert-identity and --cert-oidc-issuer are the policy you trust; the identity embedded in the bundle is not trusted on its own, because that would reduce authentication to self-consistency. A Sigstore record verified without both flags is reported invalid (exit 1, or 3 with --strict), either flag alone is a finding too, and --public-key with a Sigstore record fails because it requires an ed25519 signature. As with ed25519, a pass shows that the signer asserted this Merkle root; it does not show that the adapter is safe.

One difference between the two verify commands, so a CI gate does not misread it. soup attest verify gives a Sigstore verifier that is unavailable (for example the trust root cannot be fetched, or the extra is missing) its own exit 1 and a bad signature exit 3. soup adapters verify folds both into the same list of findings: a verifier outage and a forged signature both print a reason and exit 1 (3 with --strict). If you gate on that exit code, you cannot tell an outage from a bad signature without reading the printed reason. The argument and extra refusals on this page (exit 2 on sign, the missing-extra finding on verify, the attest verify exit codes) were run on the v0.76.0 CLI without the extra installed; the signing and the Fulcio and Rekor round trip were not, because that needs the extra and the network. Upstream's tests mock the signer and benchmarks/ has no end-to-end record, so read this as shipped in v0.76.0, not as validated.

Since v0.77.0 soup attest verify also reads a statement and a signature file saved with a UTF-8 byte-order mark; the check itself is unchanged.

soup adapters check-safetensors — refuse pickle at the boundary

bash
soup adapters check-safetensors ./my_adapter --strict && echo "SHIP IT"

Rejects any .bin, .pt, or pickle-format weights. The single biggest LoRA attack vector is pickle.load on hostile weights; --strict makes the CI gate hard. Since v0.78.0 soup ship applies the same refusal to --adapter and --base-adapter (exit 3, before any model loads): see A pickle adapter is refused.

Is the adapter alive: soup adapters check and audit

A different question from the backdoor scan: does the adapter do anything at all, and did the run that wrote it do what its config asked? soup adapters check reads the weights without PyTorch (since v0.77.0 without the safetensors package too, though it needs NumPy) and ends in one line, alive or inactive: <reason>; it refuses a weights file over 2 GiB before opening it, because it loads every tensor into memory. soup adapters audit --config soup.yaml compares what a finished run recorded in adapter_config.json with the config. Both are on Adapter check and audit, with their exit codes and limits. Since v0.77.1 a missing dependency is named instead of being reported as corrupt weights (#2141): the read-only adapter commands, scan and check among them, ask for NumPy (numpy package required; pip install "soup-cli[train]" (or pip install numpy), exit 1), and soup adapters merge and arithmetic ask for NumPy and safetensors. Through v0.77.0 the same missing package was reported as a problem with the weights.

License-conflict gate in soup adapters merge

bash
soup adapters merge a/ b/ c/ --output merged/ \
  --license mit --license apache-2.0 --license mit \
  --license-override "Approved by legal team 2026-05-20"

License compatibility is checked over 33 known licenses grouped into 7 kinds. Conflicting licenses require --license-override "<reason, ≥ 8 chars>" for audit.

Namespace-pin TOFU (anti-AI-Jacking)

Soup keeps a local trust-on-first-use pin of a Hugging Face repo's author, and only five paths consult it: soup spectrum scan <model-id>, soup probe sae-diff --auto-download, the base model of a stream_layers: true training run, since v0.76.0 a Hub id given as training.prm_reward (downloaded before training starts), and, since v0.77.0, the base model of soup merge --low-memory when the base is a Hub id rather than a local directory (only its *.safetensors and *.json files are fetched). All five download through Soup's own hub wrapper, which records (repo_id, author, created_at) in a SQLite store (~/.soup/namespace_pin.db; SOUP_NAMESPACE_PIN_DB moves it) the first time it sees a repo. A later download through that wrapper is refused if the author changed or if created_at changed in either direction (a pinned repo's creation time never legitimately changes, so any drift looks like a deleted-and-recreated repo).

This does not protect an ordinary training run. The base model that soup train (without stream_layers), chat, serve, merge (without --low-memory), export and infer load is fetched by transformers directly and is never checked, so a hijacked organization could still serve you altered weights through any of them. The check also fails open: if the Hub metadata cannot be fetched (offline, rate-limited) or the SQLite store cannot be read, the download goes ahead. And there is no CLI flag to approve an author change; the override exists only as the allow_namespace_shift keyword argument of the Python wrapper. If a hijacked base model is in your threat model, download the base once, check it, and point base at that local directory. The base revision that a v0.77.0 soup train records (see Experiment tracking) is a separate mechanism: it records which commit was loaded, not who owns the repo, and it does not extend the pin to soup train. The adapter merge that soup export runs loads the base at that recorded commit since v0.77.0, and since v0.77.2 so do both paths of soup merge (Export); that too is a revision, not an ownership check, and it does not change which loads the pin consults.

soup airgap-bundle — physical-media transfer

bash
soup airgap-bundle \
  --output secure-bundle.tar \
  --model ./llama3-8b-merged \
  --dataset ./prod-logs \
  --wheel ./wheelhouse \
  --bundle-size-cap 50

Packs model + datasets + wheels + kernels + manifest into a single tarball suitable for transfer through a data diode (physical-media / sneaker-net). Embeds a SHA-256 manifest per file. Refuses to build if total size > --bundle-size-cap (default 100 GiB).

Three details matter. --output is written as a plain, uncompressed tar whatever its extension, so name it .tar (a .tar.gz name produces a file that tar -xzf rejects as "not in gzip format"). --model, --dataset, --wheel and --kernel each take a directory (the last three are repeatable), and every path must sit under the working directory. Since v0.78.0 (#2453, fixed in #2568 by @Shubham-dev-stack) a missing path, or a file where a directory is expected, stops the command before any archive is built, with exit 1 and a line naming the path: model directory not found: nomodel, dataset path is not a directory: data.jsonl (the same two forms for --wheel and --kernel); nothing is written. A total over --bundle-size-cap exits 2, and since v0.78.0 (#2690, by @SID-6921) the size is read from each file's size on disk before the file is read, so an oversized file is refused at once instead of after a full hash. (Since closed in v0.78.0: on v0.77.2 a missing folder, or a single file passed to --dataset, was accepted. The command exited 0 and wrote a bundle whose manifest listed no files for it, with the summary panel still counting a file under Datasets.) If you built an air-gapped bundle on v0.77.2, the version checked, compare its Files count, or tar -tf secure-bundle.tar, with what you meant to carry across. --repro-receipt <json> embeds a receipt from soup train --repro-receipt, and is auto-detected from <model>/repro-receipt.json.

External programs run by an absolute path (v0.77.1)

Since v0.77.1 Soup starts the external programs it relies on by the absolute path it finds in an absolute PATH directory, not by bare name (#2205). Upstream's list includes git, ollama, docker, gh, nvidia-smi, the llama.cpp binaries, ssh and scp (the RunPod and Lambda controllers), the code-sandbox tools, accelerate for soup train --gpus and the soup adapters bisect --eval-command program. Empty and relative PATH entries (., bin) are not searched, and neither is the current directory. On Windows (#2213) Soup also leaves the current directory out of the program search, for itself and for the programs it starts, so that the program that runs is the one on PATH; it sets NoDefaultCurrentDirectoryInExePath=1 for itself when that variable is not set.

The visible effect is one thing: a tool that is found only in the current directory, or through a relative PATH entry, is no longer found. Put its directory on PATH as an absolute path, or give the tool's own path. Upstream's release notes file this under Security as tightening how external programs are started; no advisory comes with it, and upstream says upgrading is enough. The release page has the full list and the edge cases: External programs are started by an absolute path.

Crash bundles and .can files are redacted (v0.78.0)

A crash bundle (.crash) and a .can written by soup can pack or soup can fork are redacted before they are written (#2883, listed under Security in upstream's v0.78.0 changelog). URL userinfo and sensitive query parameters, common API-token shapes, Authorization and Bearer headers, JWTs, private-key blocks and values stored under credential-named config keys are replaced with <redacted>. Redaction is pattern-based and best-effort: read a bundle or a can before you share it. A crash bundle records counts only (a redaction object with values_redacted and a count per field: error_message, traceback, environment, metrics_tail, config), and a text that could not be redacted is stored as <redaction failed: text withheld>, never raw. soup can pack and soup can fork print the key paths they changed, never the values, so a can packed from a config that carried a credential holds <redacted> in its place. soup can publish warns about key paths that still look like credentials, and prints the warning before it checks for a Hub token. The commands and the refusal are on Soup Cans. Through v0.77.2 a crash bundle redacted a narrower set of token shapes, and a can carried its config as it was.

Cans and sandboxed code (v0.78.1)

Every command that reads a .can file checks the archive first. It refuses one name held twice (config.yaml and ./Config.yaml count as one), a link, a device, a member below a file, a name that climbs out of the can with .., and more than 10,000 members. The exit code is 1 (2 for soup loop replay --extract) and the message names the members (for too many members it names the limit). soup can run also refuses a can whose training output resolves outside the working directory. It still fetches data and trains on your machine, so read a can before you run it.

The sandbox for checked code (the RLVR code_exec scorer, the soup serve python and bash tools, the agent-eval and recipe runners) ends the processes that code started when a run times out, floods its output or exits: a process group on Linux and macOS, a job object on Windows. In upstream's words it "stays best-effort and is not a security boundary": a process that deliberately leaves its process group is not reached on Linux and macOS, and a Windows host that refuses job objects ends only the direct child. The v0.78.1 page has the details.

Reporting a vulnerability

This restates upstream's SECURITY.md at v0.78.0, which differs from v0.77.2 only in its Supported Versions section (its telemetry paragraph, which states that, as released, no telemetry is sent, is unchanged); that file is the authority if the two ever differ.

Supported versions. Security fixes are shipped for the latest published release, 0.78.x. 0.77.x also receives security fixes only, until 0.79.0 is released (upstream's date-free wording). Everything below 0.77 is unsupported, which includes 0.76.x, the last line that runs on Python 3.10 and exports AWQ or GPTQ: upstream says it gets no further security fixes after v0.78.0, so pip install "soup-cli[train]<0.77" and pip install "soup-cli[awq]<0.77" are paths on an unsupported line. A v0.75 install has no patched release to wait for either: pip install -U soup-cli. No advisory was announced in the release notes of v0.76.0, v0.76.1, v0.77.0, v0.77.1, v0.77.2, v0.78.0 or v0.78.1 (v0.77.0's release notes list six tightened behaviours under Security, v0.77.1's say it tightens how external programs are started, v0.77.2's say only that the release "includes security hardening fixes; details follow through the project's advisory process", and v0.78.0's list 3 entries, with "No advisory is published with it", and v0.78.1's list three security fixes). On 19 November 2026, the day after v0.78.0, upstream published three advisories for releases up to 0.77.2 that name 0.78.0 as the fixed version: they are in the list below. Of v0.78.0, upstream also says that a security review of the code merged for the release, run on 2026-11-17, recorded 9 findings (0 critical, 1 high, 1 medium, 7 low): 5 are fixed in the release and 4 are listed under its Known Limitations. The 0.75.1 and 0.75.2 fixes are carried in 0.76.0 and later, so a user still on 0.75.0 or 0.75.1 should upgrade, and a user on 0.77.2 or older needs 0.78.0 or later for the three newer ones.

How to report. Report privately, and do not open a public GitHub issue for anything security-sensitive. The preferred route is a private report through GitHub Security Advisories. If you cannot use GitHub, email team@trysoup.dev (the project address), or makazanalpamys@gmail.com (the maintainer's personal address) if that bounces. Do not report in Discord: it is a public channel. Include the affected version or versions and your platform, a minimal reproduction or proof of concept, and the impact you observed.

What to expect. Upstream aims to acknowledge a report within 5 business days and to ship a fix or mitigation for a confirmed, in-scope issue "as promptly as is practical". That is a target, not a service-level agreement, and no other deadline is promised. Disclosure is coordinated: once a fix is released the reporter is credited by name in the release notes, unless they ask for anonymity. There is no bug bounty and no monetary reward; the credit is the whole of what is offered.

Scope. The threat model assumes the operator runs Soup on their own machine with their own data. In scope, as representative examples:

  • path traversal or arbitrary file read or write from a user-supplied config, dataset or artifact path;
  • SSRF in the synthetic-data providers, the inference server, or the hub and endpoint validators;
  • command, Modelfile, Jinja chat-template, or systemd or launchd unit injection;
  • secret leakage in logs, crash bundles or generated artifacts;
  • sandbox escape in the RLVR code-execution reward path.

Out of scope: vulnerabilities in third-party model weights or datasets you choose to load; issues that require an already-compromised host; and the DNS and email configuration of trysoup.dev (a missing or permissive DMARC, SPF or DKIM record, and anything else a public DNS query establishes), which the project fixes but does not treat as a finding in Soup.

Advisories published so far, each with the page that says what changed and what to re-check:

Numbers

+152 new tests in v0.60.0. Security-fix coverage: 12 HIGH, 11 MEDIUM, 6 LOW.

See also

  • v0.77.1: data commands keep their input — the release that tightened how external programs are started.
  • Compliance pack — v0.71.35 puts signing, scanning and attestation on a HIPAA / SOC 2 / EU AI Act / SR 11-7 path.
  • Governance — v0.59 BOM + SLSA-3 + audit log.
  • Adapters — v0.57 diff / merge / blame / branch (the rest of the LoRA toolkit).
  • Adapter lifecycle (v0.67) — soup lock SHA256 closure makes signed + scanned adapter artifacts reproducible across the team; soup adapters pr puts review + signing on every adapter change.

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.