Docs / Embedding and internals

Dependency security

The release gate runs python3 tools/check-security.py, using cargo-audit and the RustSec database. Install the auditor with cargo install cargo-audit --version 0.22.2 --locked. New advisories fail the check. Python is development tooling; it is excluded from the published Rust package.

The 2026-10-23 audit updated rustls to 0.23.46, rustls-webpki to 0.103.16, webpki-roots to 1.0.10 and Tokio to 1.53.3. These cover the reported TLS/certificate advisories and Tokio's reported unsoundness. The optional benchmark profiler is updated to pprof 0.15.0.

Seven remaining advisory matches have narrow exceptions in tools/security-exceptions.json, reviewed on 2026-10-23 and due for review by 2027-01-21:

Dependency and advisoryReviewed exposure
zip 8.6.0: 0367, 0368, 0369, 0429Optional model โ†’ Candle 0.11.0. These affect ZIP extraction to files, permissions and symlinks (0429: extract sizing a symlink target from its declared size). Affordance's CPU loader accepts .safetensors and calls VarBuilder::from_mmaped_safetensors; it does not invoke ZIP, pickle or NumPy loaders or archive extraction. Candle's dependency cannot be upgraded to patched zip 9 within its published constraint.
quick-xml 0.26.0: 0194, 0195Optional profile โ†’ pprof 0.15.0 โ†’ inferno 0.11.21. These affect XML reading, duplicate-attribute checking and namespace allocation. Our benchmark programs call Report::flamegraph on profiler-generated data. Inferno writes SVG using quick_xml::Writer; this path does not parse XML or use NsReader.
paste 1.0.15: 0436An unmaintained build-time procedural macro in the optional Candle dependency tree. This is a maintenance exception; there is no patched release to select.

These are exceptions for Affordance's reviewed uses, not claims that those dependencies are fixed or safe for arbitrary use. The check verifies exact versions and registry checksums, hashes the reviewed CPU loader and profiler callsites, rejects newly introduced direct uses of affected APIs, and expires the review. Changed dependency boundaries or callsites require another review; the guard is not a formal whole-program reachability proof. Remove exceptions when upstream publishes compatible fixes.

On 2026-10-29 the boot, fleet and turn benchmarks moved template selection into model bindings. The profiler calls and data sources above were unchanged; their reviewed file hashes were refreshed after checking those configuration-only diffs. Dependency pins and review expiry stay the same.

For a reproducible local run with an already fetched database:

sh
CARGO_AUDIT=/path/to/cargo-audit \
AFFORDANCE_RUSTSEC_DB=/path/to/advisory-db AFFORDANCE_SECURITY_OFFLINE=1 ./tools/check.sh

Ordinary release checks fetch the current database. The offline options are for local reproduction; an old database cannot establish the absence of newly published advisories.

Source: docs/SECURITY.md, about 2 minutes to read.